al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.61k stars 659 forks source link

UI更新设备列表/添加账户提示:该小米账户下没有设备 #1943

Open cloudicen opened 2 days ago

cloudicen commented 2 days ago

Device model / 设备型号

*

Component version / 插件版本

0.7.22

HA core version / HA版本

2024.11.1

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

某次停电后所有通过[Xiaomi Miot Auto]添加的设备全部离线。UI页面更新设备列表时提示该小米账户下没有设备

查看日志发现所有API调用均返回 {"code":0,"message":"invalid signature"}

Entity attributes / 实体属性

无实体

Home Assistant Logs / 系统日志

2024-11-12 21:53:38.107 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/typelist: {"code":0,"message":"invalid signature"} 2024-11-12 21:53:39.610 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/scene/history: {"code":0,"message":"invalid signature"} 2024-11-12 21:53:53.105 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/typelist: {"code":0,"message":"invalid signature"} 2024-11-12 21:53:54.280 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/scene/history: {"code":0,"message":"invalid signature"} 2024-11-12 21:54:08.107 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/typelist: {"code":0,"message":"invalid signature"} 2024-11-12 21:54:09.275 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/scene/history: {"code":0,"message":"invalid signature"} 2024-11-12 21:54:13.498 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} 2024-11-12 21:54:13.545 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"} 2024-11-12 21:54:13.546 WARNING (MainThread) [custom_components.xiaomi_miot] None device in xiaomi cloud: ***

alexing0805 commented 2 days ago

同样问题,突然这样 日志记录器: homeassistant.const 来源: helpers/deprecation.py:222 首次出现: 00:54:48 (6 次总计出现) 上次记录: 00:54:49

STATE_ALARM_ARMED_AWAY was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.11. Use AlarmControlPanelState.ARMED_AWAY instead, please report it to the author of the 'xiaomi_miot' custom integration STATE_ALARM_ARMED_HOME was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.11. Use AlarmControlPanelState.ARMED_HOME instead, please report it to the author of the 'xiaomi_miot' custom integration STATE_ALARM_ARMED_NIGHT was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.11. Use AlarmControlPanelState.ARMED_NIGHT instead, please report it to the author of the 'xiaomi_miot' custom integration STATE_ALARM_DISARMED was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.11. Use AlarmControlPanelState.DISARMED instead, please report it to the author of the 'xiaomi_miot' custom integration STATE_ALARM_TRIGGERED was used from xiaomi_miot, this is a deprecated constant which will be removed in HA Core 2025.11. Use AlarmControlPanelState.TRIGGERED instead, please report it to the author of the 'xiaomi_miot' custom integration

此错误来自自定义集成。

日志记录器: custom_components.xiaomi_miot 来源: custom_components/xiaomi_miot/init.py:300 集成: Xiaomi Miot Auto (文档, 问题) 首次出现: 00:54:49 (2 次总计出现) 上次记录: 01:01:30

None device in xiaomi cloud:

此错误来自自定义集成。

日志记录器: custom_components.xiaomi_miot.core.xiaomi_cloud 来源: custom_components/xiaomi_miot/core/xiaomi_cloud.py:762 集成: Xiaomi Miot Auto (文档, 问题) 首次出现: 00:54:49 (17 次总计出现) 上次记录: 01:14:46

Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"}

2024-11-13 01:49:29.600 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} 2024-11-13 01:49:29.629 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"} 2024-11-13 02:43:45.659 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} 2024-11-13 02:43:45.679 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"} 2024-11-13 02:43:51.811 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} 2024-11-13 02:43:51.833 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"} 2024-11-13 06:31:44.247 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/message/v2/check_new_msg: {"code":0,"message":"invalid signature"} 2024-11-13 06:31:44.268 WARNING (MainThread) [custom_components.xiaomi_miot.core.xiaomi_cloud] Error while executing request to https://api.io.mi.com/app/v2/homeroom/gethome_merged: {"code":0,"message":"invalid signature"}

chliny commented 2 days ago

同样遇到

al-one commented 1 day ago

尝试删除.storage/xiaomi_miot/auth-xxxx-cn.json文件后,通过集成选项重新登陆插件

jesson20121020 commented 1 day ago

尝试删除.storage/xiaomi_miot/auth-xxxx-cn.json文件后,通过集成选项重新登陆插件

试过了, 还是有一样的问题

cloudicen commented 1 day ago

尝试删除.storage/xiaomi_miot/auth-xxxx-cn.json文件后,通过集成选项重新登陆插件

试过了, 还是有一样的问题

我这边用这个方法解决了,但是我是直接把整个集成删了之后,清理这里说的文件,再重新添加的

jesson20121020 commented 1 day ago

感谢,确实可以, 刚试了下, 不用删集成, 直接删了上面的文件, 重启下HA就好了