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

zhimi.airp.cpa4 Integration broken, leads to Device Reboot #834

Closed w-marco closed 2 years ago

w-marco commented 2 years ago

Hi, when trying to integrate my Air Purifier4 Compact (zhimi.airp.cpa4), the device reboots as soon as the integration tries to pull data from it. then the HASS log shows this:

Xiaomi Miot(zhimi.airp.cpa4): Got MiioException while fetching the state: Unable to discover the device 192.168.30.11, mapping: {'air_purifier.on': {'siid': 2, 'piid': 1}, 'air_purifier.fault': {'siid': 2, 'piid': 2}, 'air_purifier.mode': {'siid': 2, 'piid': 4}, 'aqi.aqi_updata_heartbeat': {'siid': 11, 'piid': 4}, 'custom_service.moto_speed_rpm': {'siid': 9, 'piid': 1}, 'custom_service.country_code': {'siid': 9, 'piid': 10}, 'custom_service.favorite_level': {'siid': 9, 'piid': 11}, 'filter_used_time_dbg-9-12': {'siid': 9, 'piid': 12}, 'screen.brightness': {'siid': 13, 'piid': 2}, 'physical_controls_locked': {'siid': 8, 'piid': 1}, 'alarm': {'siid': 6, 'piid': 1}, 'filter.filter_life_level': {'siid': 4, 'piid': 1}, 'filter.filter_used_time': {'siid': 4, 'piid': 3}, 'filter.filter_left_time': {'siid': 4, 'piid': 4}, 'environment.pm2_5_density': {'siid': 3, 'piid': 4}}, max_properties: 8/15

If I disable the integration the device runs fine for hours, so its definitely a bug in the integration. maybe it tries to pull wrong data ?

w-marco commented 2 years ago

After more investigation: with python-miio the device also reboots when querying it. I believe this was a bug with the device itself (either mine specifically or the release of software I was on) and probably has nothing to do with the integration directly, so I'll close this for now. I also sent back the device since it was too loud for my taste and replaced it with an air purifier 4 lite, which works flawlessly with this integration.