Skip to content

Miio Xiaomi Air Purifier availability blinking ({'code': -9999, 'message': 'user ack timeout'}) and Unable to discover a device at address #757

@mrfoxbit

Description

@mrfoxbit

My device is Xiaomi Air Purifier 3 (zhimi.airpurifier.ma4), python-miio 0.5.2.1

image

It just doesn't respond very often.

2020-07-04 17:48:52 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
2020-07-04 18:24:04 ERROR (SyncWorker_10) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 18:24:04 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 18:39:28 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
2020-07-04 19:03:17 ERROR (SyncWorker_9) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 19:03:17 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 19:05:21 ERROR (SyncWorker_14) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 19:05:21 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 19:21:22 ERROR (SyncWorker_4) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 19:21:22 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 20:26:52 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
2020-07-04 20:39:16 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
2020-07-04 20:51:18 ERROR (SyncWorker_13) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 20:51:18 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:01:02 ERROR (SyncWorker_16) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 21:01:02 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:22:13 ERROR (SyncWorker_7) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 21:22:13 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:25:19 ERROR (SyncWorker_5) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 21:25:19 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:39:46 ERROR (SyncWorker_9) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 21:39:46 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:51:14 ERROR (SyncWorker_10) [miio.miioprotocol] Unable to discover a device at address 192.168.100.227
2020-07-04 21:51:14 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: Unable to discover the device 192.168.100.227
2020-07-04 21:52:02 ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}

I uesd miiocli --debug airpurifiermiot --ip <ip> --token <token> status and this is result (sometime it show: Unable to discover the device 192.168.100.227)

INFO:miio.cli:Debug mode active
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x10\x16\xdf\xcd\x00\x11\xdbp' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x10\x16\xdf\xcd' (total 4)
            ts = 1970-01-14 13:04:48
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 1016dfcd with ts: 1970-01-14 13:04:48, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:192.168.100.227:54321 >>: {'id': 1, 'method': 'get_properties', 'params': [{'did': 'power', 'siid': 2, 'piid': 2}, {'did': 'fan_level', 'siid': 2, 'piid': 4}, {'did': 'mode', 'siid': 2, 'piid': 5}, {'did': 'humidity', 'siid': 3, 'piid': 7}, {'did': 'temperature', 'siid': 3, 'piid': 8}, {'did': 'aqi', 'siid': 3, 'piid': 6}, {'did': 'filter_life_remaining', 'siid': 4, 'piid': 3}, {'did': 'filter_hours_used', 'siid': 4, 'piid': 5}, {'did': 'buzzer', 'siid': 5, 'piid': 1}, {'did': 'buzzer_volume', 'siid': 5, 'piid': 2}, {'did': 'led_brightness', 'siid': 6, 'piid': 1}, {'did': 'led', 'siid': 6, 'piid': 6}, {'did': 'child_lock', 'siid': 7, 'piid': 1}, {'did': 'favorite_level', 'siid': 10, 'piid': 10}, {'did': 'favorite_rpm', 'siid': 10, 'piid': 7}]}
DEBUG:miio.miioprotocol:192.168.100.227:54321 (ts: 1970-01-14 13:04:49, id: 1) << {'id': 1, 'result': [{'did': 'power', 'siid': 2, 'piid': 2, 'code': 0, 'value': False}, {'did': 'fan_level', 'siid': 2, 'piid': 4, 'code': 0, 'value': 2}, {'did': 'mode', 'siid': 2, 'piid': 5, 'code': 0, 'value': 2}, {'did': 'humidity', 'siid': 3, 'piid': 7, 'code': 0, 'value': 67}, {'did': 'temperature', 'siid': 3, 'piid': 8, 'code': 0, 'value': 28.5}, {'did': 'aqi', 'siid': 3, 'piid': 6, 'code': 0, 'value': 4}, {'did': 'filter_life_remaining', 'siid': 4, 'piid': 3, 'code': 0, 'value': 82}, {'did': 'filter_hours_used', 'siid': 4, 'piid': 5, 'code': 0, 'value': 613}, {'did': 'buzzer', 'siid': 5, 'piid': 1, 'code': 0, 'value': False}, {'did': 'buzzer_volume', 'siid': 5, 'piid': 2, 'code': -4001}, {'did': 'led_brightness', 'siid': 6, 'piid': 1, 'code': 0, 'value': 1}, {'did': 'led', 'siid': 6, 'piid': 6, 'code': 0, 'value': True}, {'did': 'child_lock', 'siid': 7, 'piid': 1, 'code': 0, 'value': False}, {'did': 'favorite_level', 'siid': 10, 'piid': 10, 'code': 0, 'value': 10}, {'did': 'favorite_rpm', 'siid': 10, 'piid': 7, 'code': 0, 'value': 1600}], 'exe_time': 260}
DEBUG:miio.miioprotocol:192.168.100.227:54321 >>: {'id': 2, 'method': 'get_properties', 'params': [{'did': 'motor_speed', 'siid': 10, 'piid': 8}, {'did': 'use_time', 'siid': 12, 'piid': 1}, {'did': 'purify_volume', 'siid': 13, 'piid': 1}, {'did': 'average_aqi', 'siid': 13, 'piid': 2}, {'did': 'filter_rfid_tag', 'siid': 14, 'piid': 1}, {'did': 'filter_rfid_product_id', 'siid': 14, 'piid': 3}, {'did': 'app_extra', 'siid': 15, 'piid': 1}]}
DEBUG:miio.miioprotocol:192.168.100.227:54321 (ts: 1970-01-14 13:04:50, id: 2) << {'id': 2, 'result': [{'did': 'motor_speed', 'siid': 10, 'piid': 8, 'code': 0, 'value': 0}, {'did': 'use_time', 'siid': 12, 'piid': 1, 'code': 0, 'value': 2192400}, {'did': 'purify_volume', 'siid': 13, 'piid': 1, 'code': 0, 'value': 85696}, {'did': 'average_aqi', 'siid': 13, 'piid': 2, 'code': 0, 'value': 21}, {'did': 'filter_rfid_tag', 'siid': 14, 'piid': 1, 'code': 0, 'value': '81:66:6a:da:85:a:4'}, {'did': 'filter_rfid_product_id', 'siid': 14, 'piid': 3, 'code': 0, 'value': '0:0:30:33'}, {'did': 'app_extra', 'siid': 15, 'piid': 1, 'code': 0, 'value': 0}], 'exe_time': 280}
Power: off
AQI: 4 μg/m³
Average AQI: 21 μg/m³
Humidity: 67 %
Temperature: 28.5 °C
Fan Level: 2
Mode: OperationMode.Favorite
LED: True
LED brightness: LedBrightness.Dim
Buzzer: False
Buzzer vol.: None
Child lock: False
Favorite level: 10
Filter life remaining: 82 %
Filter hours used: 613
Use time: 2192400 s
Purify volume: 85696 m³
Motor speed: 0 rpm
Filter RFID product id: 0:0:30:33
Filter RFID tag: 81:66:6a:da:85:a:4
Filter type: FilterType.Regular

Originally posted by @hoangtuit in #577 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions