『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
楼主: demacia

[智能音箱] HAVCS (ha 2023.5.2) 接入小度踩坑

[复制链接]

25

主题

224

帖子

1032

积分

金牌会员

007潜水了

Rank: 6Rank: 6

积分
1032
金钱
808
HASS币
0
 楼主| 发表于 2023-9-28 14:57:17 | 显示全部楼层
hale_han 发表于 2023-7-24 15:58
楼主办法是正确可行的,但升级最新HASS  2023.7.2后不太好用了,小度语音控制都还可以进行开和关,但就是报 ...

控制报错,还有可能就是登陆过期了,如果是这种情况,去小度平台跳你的ha在登陆试试。

ha每次更新都很慌。就怕一堆报错
回复

使用道具 举报

1

主题

14

帖子

52

积分

注册会员

Rank: 2

积分
52
金钱
38
HASS币
0
发表于 2023-10-6 20:56:17 | 显示全部楼层
研究一个星期了,还是用不了
回复

使用道具 举报

25

主题

224

帖子

1032

积分

金牌会员

007潜水了

Rank: 6Rank: 6

积分
1032
金钱
808
HASS币
0
 楼主| 发表于 2023-10-6 21:08:57 | 显示全部楼层
wyzxzx 发表于 2023-10-6 20:56
研究一个星期了,还是用不了

公网
小度技能控制
ha日志
配置
这几个都检查过了没
回复

使用道具 举报

1

主题

14

帖子

52

积分

注册会员

Rank: 2

积分
52
金钱
38
HASS币
0
发表于 2023-10-6 21:32:05 | 显示全部楼层
本帖最后由 wyzxzx 于 2023-10-6 21:39 编辑
demacia 发表于 2023-10-6 21:08
公网
小度技能控制
ha日志

全都检查了。都没有问题。只有一个401错误。
2023-10-06 21:02:37.324 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration xiaomi_miot which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-06 21:02:37.327 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration ha_file_explorer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-06 21:02:37.332 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration havcs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-06 21:02:37.335 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-06 21:02:37.337 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration bemfa which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-10-06 21:03:04.279 WARNING (MainThread) [custom_components.havcs] [init] Data in your config entry is going to override your configuration.yaml: {'platform': ['dueros'], 'http': {'clients': {'dueros': 'https://xiaodu-dbp.baidu.com'}, 'ha_url': 'https://ha_zx_***.**china.vip'}, 'setting': {}, 'device_config': 'ui'}
2023-10-06 21:03:04.311 INFO (MainThread) [custom_components.havcs] [init] havcs enable "http mode"
2023-10-06 21:03:04.320 DEBUG (MainThread) [custom_components.havcs] [init] havcs only run in http mode, skip mqtt initialization
2023-10-06 21:03:04.322 DEBUG (MainThread) [custom_components.havcs] [init] ha_url = https://ha_zx_***.**china.vip, base_url = http://172.168.0.21:8123
2023-10-06 21:03:04.322 INFO (MainThread) [custom_components.havcs] [init] havcs initialization finished.
2023-10-06 21:03:04.333 INFO (MainThread) [custom_components.havcs] loading settings from file
2023-10-06 21:03:04.354 DEBUG (MainThread) [custom_components.havcs] [post-task] load new platform entry set()
2023-10-06 21:03:04.355 DEBUG (MainThread) [custom_components.havcs] [post-task] remove old platform entry set()
2023-10-06 21:03:04.382 ERROR (MainThread) [custom_components.havcs] [post-task] Unable to import havcs.dueros, cannot import name 'AsyncTrackStates' from 'homeassistant.helpers.state' (/usr/src/homeassistant/homeassistant/helpers/state.py)
2023-10-06 21:03:04.389 INFO (MainThread) [custom_components.havcs] loading device info from file
2023-10-06 21:03:04.389 DEBUG (MainThread) [custom_components.havcs.http] [http] check accessibility from local, base_url = https://ha_zx_***.**china.vip
2023-10-06 21:03:07.837 DEBUG (MainThread) [custom_components.havcs.http] [http][check] aouth service is running: url = https://ha_zx_***.**china.vip/havcs/auth/authorize, status = 401


回复

使用道具 举报

25

主题

224

帖子

1032

积分

金牌会员

007潜水了

Rank: 6Rank: 6

积分
1032
金钱
808
HASS币
0
 楼主| 发表于 2023-10-7 09:30:43 | 显示全部楼层
wyzxzx 发表于 2023-10-6 21:32
全都检查了。都没有问题。只有一个401错误。

小度技能平台上面验证登录ha成功了吗
401报错就是登录的时候包的错误?
回复

使用道具 举报

0

主题

27

帖子

147

积分

注册会员

Rank: 2

积分
147
金钱
120
HASS币
0
发表于 2023-10-31 00:48:10 | 显示全部楼层
2023-10-31 00:46:18.749 DEBUG (MainThread) [custom_components.havcs.http] [http][auth] request headers : <CIMultiDictProxy('Connection': 'close', 'Host': 'nas.immix.top:8123', 'X-Real-IP': '172.17.0.4', 'X-Forwarded-For': '172.17.0.4', 'X-Forwarded-Proto': 'https', 'Content-Length': '354', 'Accept': '*/*', 'Content-Type': 'application/x-www-form-urlencoded')>
2023-10-31 00:46:18.749 DEBUG (MainThread) [custom_components.havcs.http] [http][auth] request data : client_id=https%3A%2F%2Fxiaodu-dbp.baidu.com&grant_type=authorization_code&client_secret=8BwMXtjEcN28&redirect_uri=https%3A%2F%2Fxiaodu-dbp.baidu.com%2Fsaiya%2Fauth%2Fe55e8207745df854902d6cd3038333a6&dueros_uid=81fbaac577a421798da172958308ccda&open_id=156e56699034b69055193cf8df17b6521950388864a34eac960affda9c311261&code=392dff3f6d8f4063abbe4ff9cdc51b21
2023-10-31 00:46:18.749 DEBUG (MainThread) [custom_components.havcs.http] [http][auth] request query : client_id=https%3A%2F%2Fxiaodu-dbp.baidu.com&grant_type=authorization_code&client_secret=8BwMXtjEcN28&redirect_uri=https%3A%2F%2Fxiaodu-dbp.baidu.com%2Fsaiya%2Fauth%2Fe55e8207745df854902d6cd3038333a6&dueros_uid=81fbaac577a421798da172958308ccda&open_id=156e56699034b69055193cf8df17b6521950388864a34eac960affda9c311261&code=392dff3f6d8f4063abbe4ff9cdc51b21
2023-10-31 00:46:18.749 DEBUG (MainThread) [custom_components.havcs.http] [http][auth] forward request: data = {'client_id': 'https://xiaodu-dbp.baidu.com', 'grant_type': 'authorization_code', 'client_secret': '8BwMXtjEcN28', 'redirect_uri': 'https://xiaodu-dbp.baidu.com/saiya/auth/e55e8207745df854902d6cd3038333a6', 'dueros_uid': '81fbaac577a421798da172958308ccda', 'open_id': '156e56699034b69055193cf8df17b6521950388864a34eac960affda9c311261', 'code': '392dff3f6d8f4063abbe4ff9cdc51b21'}
2023-10-31 00:46:18.751 ERROR (MainThread) [custom_components.havcs.http] [http][auth] fail to get token, access https://nas.immix.top:8123/auth/token in local network: Traceback (most recent call last):
  File "/config/custom_components/havcs/http.py", line 220, in post
    with async_timeout.timeout(5, loop=self._hass.loop):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: timeout() got an unexpected keyword argument 'loop'



这个知道为什么嘛
回复

使用道具 举报

25

主题

224

帖子

1032

积分

金牌会员

007潜水了

Rank: 6Rank: 6

积分
1032
金钱
808
HASS币
0
 楼主| 发表于 2023-10-31 09:08:39 | 显示全部楼层
czou 发表于 2023-10-31 00:48
这个知道为什么嘛

估计又是版本不兼容
回复

使用道具 举报

0

主题

27

帖子

147

积分

注册会员

Rank: 2

积分
147
金钱
120
HASS币
0
发表于 2023-10-31 09:17:47 | 显示全部楼层
demacia 发表于 2023-10-31 09:08
估计又是版本不兼容

你们什么版本的,我直接用的最新

Home Assistant 2023.10.5
前端版本: 20231005.0 - latest
回复

使用道具 举报

25

主题

224

帖子

1032

积分

金牌会员

007潜水了

Rank: 6Rank: 6

积分
1032
金钱
808
HASS币
0
 楼主| 发表于 2023-10-31 10:08:14 | 显示全部楼层
czou 发表于 2023-10-31 09:17
你们什么版本的,我直接用的最新

Home Assistant 2023.10.5

可以参考下这个
https://github.com/cnk700i/havcs/issues/51

回复

使用道具 举报

0

主题

27

帖子

147

积分

注册会员

Rank: 2

积分
147
金钱
120
HASS币
0
发表于 2023-10-31 11:03:28 | 显示全部楼层
demacia 发表于 2023-10-31 10:08
可以参考下这个
https://github.com/cnk700i/havcs/issues/51

可以了,厉害,但是reload失败,授权能成功,还需要改吗
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 20:53 , Processed in 0.078009 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表