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.7k stars 663 forks source link

路由重启后,设备实体不可用 #1852

Open yantuo opened 2 months ago

yantuo commented 2 months ago

Device model / 设备型号

yeelink.light.ceil38 & yeelink.light.ceil32

Component version / 插件版本

0.7.20

HA core version / HA版本

Integration version:2.0.1 Frontend version: 20240903140523

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

路由重启后,之前连接的灯具实体就不可用了,在Xiaomi Miot Auto面板删除实体后,接着输入小米账号重新添加,实体可以添加成功,但是实体仍不可用,最后发现,得在米家app里面把灯具删除后,重新在米家app添加到重新添加灯具,这个时候在Xiaomi Miot Auto面板选上更新设备列表,更新完后,这个时候 实体回复可用的状态。虽然不会经常性的重启路由器,但感觉还是太麻烦了。有没有就算是重启路由器,还是可以自己连接的办法 (补充:1.灯具IP和设备实际IP一致 2. WiFi设备已通过路由器为设备设置固定IP 3.家里有两个路由器,mesh方式组网,所以所有的设备都在一个ip段)

Entity attributes / 实体属性

实体:
light.yeelink_ceil32_4fc4_light
餐厅的灯 Light

状态:
unavailable 

属性:
min_color_temp_kelvin: 2702
max_color_temp_kelvin: 6493
min_mireds: 154
max_mireds: 370
effect_list: Day, Night
supported_color_modes: color_temp
friendly_name: 餐厅的灯 Light
supported_features: 36

Home Assistant Logs / 系统日志

书房的灯(yeelink.light.ceil38): Got MiioException while fetching the state: Unable to discover the device 192.168.31.151, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.mode': {'siid': 2, 'piid': 2}, 'light.brightness': {'siid': 2, 'piid': 3}, 'light.color_temperature': {'siid': 2, 'piid': 5}, 'light.flow': {'siid': 2, 'piid': 6}, 'light.flex_switch': {'siid': 2, 'piid': 8}, 'yeelight.init_power_opt': {'siid': 4, 'piid': 1}, 'yeelight.save_state': {'siid': 4, 'piid': 2}, 'yeelight.cron_get': {'siid': 4, 'piid': 5}, 'yeelight.night_time': {'siid': 4, 'piid': 6}}, max_properties: 10/10 主卧的灯(yeelink.light.ceil38): Got MiioException while fetching the state: Unable to discover the device 192.168.31.244, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.mode': {'siid': 2, 'piid': 2}, 'light.brightness': {'siid': 2, 'piid': 3}, 'light.color_temperature': {'siid': 2, 'piid': 5}, 'light.flow': {'siid': 2, 'piid': 6}, 'light.flex_switch': {'siid': 2, 'piid': 8}, 'yeelight.init_power_opt': {'siid': 4, 'piid': 1}, 'yeelight.save_state': {'siid': 4, 'piid': 2}, 'yeelight.cron_get': {'siid': 4, 'piid': 5}, 'yeelight.night_time': {'siid': 4, 'piid': 6}}, max_properties: 10/10 餐厅的灯(yeelink.light.ceil32): Got MiioException while fetching the state: Unable to discover the device 192.168.31.167, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.mode': {'siid': 2, 'piid': 2}, 'light.brightness': {'siid': 2, 'piid': 3}, 'light.color_temperature': {'siid': 2, 'piid': 5}, 'light.flow': {'siid': 2, 'piid': 6}}, max_properties: 8/5 客厅的灯(yeelink.light.ceil32): Got MiioException while fetching the state: Unable to discover the device 192.168.31.164, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.mode': {'siid': 2, 'piid': 2}, 'light.brightness': {'siid': 2, 'piid': 3}, 'light.color_temperature': {'siid': 2, 'piid': 5}, 'light.flow': {'siid': 2, 'piid': 6}}, max_properties: 8/5 次卧的灯(yeelink.light.ceil38): Got MiioException while fetching the state: Unable to discover the device 192.168.31.98, mapping: {'light.on': {'siid': 2, 'piid': 1}, 'light.mode': {'siid': 2, 'piid': 2}, 'light.brightness': {'siid': 2, 'piid': 3}, 'light.color_temperature': {'siid': 2, 'piid': 5}, 'light.flow': {'siid': 2, 'piid': 6}, 'light.flex_switch': {'siid': 2, 'piid': 8}, 'yeelight.init_power_opt': {'siid': 4, 'piid': 1}, 'yeelight.save_state': {'siid': 4, 'piid': 2}, 'yeelight.cron_get': {'siid': 4, 'piid': 5}, 'yeelight.night_time': {'siid': 4, 'piid': 6}}, max_properties: 10/10

al-one commented 2 months ago
yantuo commented 2 months ago

尝试在只开一台路由器的情况下能不能复现 ,这种情况没试,直接尝试给灯具断电(长按凌动开关),发现可以恢复