banto6 / haier

海尔智能家居设备接入HomeAssistant
Apache License 2.0
626 stars 124 forks source link

登录成功,但没有发现实体 #180

Closed snowyang228 closed 2 months ago

snowyang228 commented 2 months ago

前言

问题描述 获取到refreshToken且登录成功,但提示“没有设备或实体"。 日志提示未通过token验证,但可以登录,说明refreshToken没有问题。

环境信息:

设备信息

错误日志 2024-09-26 09:31:34.189 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration haier 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

2024-09-26 09:31:35.341 DEBUG (MainThread) [custom_components.haier] token is valid 2024-09-26 09:31:35.585 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Haier: ** for haier Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/haier/init.py", line 34, in async_setup_entry devices = await client.get_devices() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/haier/core/client.py", line 121, in get_devices self._assert_response_successful(content) File "/config/custom_components/haier/core/client.py", line 400, in _assert_response_successful raise HaierClientException('接口返回异常: ' + resp['retInfo']) custom_components.haier.core.client.HaierClientException: 接口返回异常: Token不是由此应用创建,未通过token验证

banto6 commented 2 months ago

需小程序的refreshToken

snowyang228 commented 1 month ago

需小程序的refreshToken

需是通过windows端口抓包小程序获取到的refreshToken,还是退出后再抓才得到的。