Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 miio2miot 本地接入设备出现BUG时无法正确处理 #854

Closed
Scribing opened this issue Oct 25, 2022 · 1 comment
Closed

使用 miio2miot 本地接入设备出现BUG时无法正确处理 #854

Scribing opened this issue Oct 25, 2022 · 1 comment

Comments

@Scribing
Copy link

设备型号 zhimi.airpurifier.v1
设备固件 1.4.0@MC200
本地局域网接入

现象
此设备有时候会出现一种异常情况,表现为网络连接还存在,但是发送任何miio控制消息都无法响应,同时米家app也无法控制
使用hass原生miio可以在异常情况出现时设备状态更新为 unavailable ,但是本插件仅在日志中报错,没有更新设备状态
最后手动给设备断电,插件才更新设备状态为 unavailable

部分日志 每30秒出现一轮, 50分钟报错100轮

2022-10-24 22:24:39.197 WARNING (MainThread) [homeassistant.helpers.entity] Update of fan.zhimi_v1_8878_air_purifier is taking over 10 seconds
2022-10-24 22:24:49.244 ERROR (SyncWorker_6) [miio.miioprotocol] Got error when receiving: timed out
2022-10-24 22:24:49.245 ERROR (SyncWorker_6) [custom_components.xiaomi_miot.core.miio2miot] zhimi.airpurifier.v1: Got MiioException: No response from the device while get_properties(['mode', 'aqi', 'filter1_life', 'led', 'buzzer', 'bright', 'motor1_speed', 'led_b', 'motor2_speed', 'purify_volume'])
2022-10-24 22:25:09.199 WARNING (MainThread) [homeassistant.helpers.entity] Update of fan.zhimi_v1_8878_air_purifier is taking over 10 seconds
2022-10-24 22:25:19.258 ERROR (SyncWorker_2) [miio.miioprotocol] Got error when receiving: timed out
2022-10-24 22:25:19.259 ERROR (SyncWorker_2) [custom_components.xiaomi_miot.core.miio2miot] zhimi.airpurifier.v1: Got MiioException: No response from the device while get_properties(['mode', 'aqi', 'filter1_life', 'led', 'buzzer', 'bright', 'motor1_speed', 'led_b', 'motor2_speed', 'purify_volume'])
2022-10-24 22:25:39.203 WARNING (MainThread) [homeassistant.helpers.entity] Update of fan.zhimi_v1_8878_air_purifier is taking over 10 seconds
2022-10-24 22:25:49.249 ERROR (SyncWorker_7) [miio.miioprotocol] Got error when receiving: timed out
2022-10-24 22:25:49.250 ERROR (SyncWorker_7) [custom_components.xiaomi_miot.core.miio2miot] zhimi.airpurifier.v1: Got MiioException: No response from the device while get_properties(['mode', 'aqi', 'filter1_life', 'led', 'buzzer', 'bright', 'motor1_speed', 'led_b', 'motor2_speed', 'purify_volume'])
@Scribing
Copy link
Author

尝试将

ret = 'Unable to discover the device' in err

改为
ret = 'Unable to discover the device' in err or 'No response from the device' in err

实机测试数日,设备失控后可正常掉线,未出现其他异常

al-one added a commit that referenced this issue Oct 31, 2022
@al-one al-one closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants