Core: Power status for Xiamio Socket chuangmi.plug.v3 shown as always on

Created on 9 Feb 2020  路  13Comments  路  Source: home-assistant/core

The problem


I'm using 2 of the Xiaomi socket Version chuangmi.plug.v3. Since some time, I guess it started with HA Version 0.100, the sockets power status is not working properly in HA anymore. The status shows always powered on even if the plug is turn off. (manually or via the Xiaomi app). When I switch it off in HA the status in HA changes back to on after a few seconds. (Plug stays off).

Environment


Home Assistant 0.105.2 running in HASS.io on Ubuntu VM

  • Home Assistant release with the issue: 0.105.2
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.): Hass.io on Ubuntu VM
  • Integration causing this issue:
  • Link to integration documentation on our website:
    https://www.home-assistant.io/integrations/switch.xiaomi_miio/

Problem-relevant configuration.yaml

  • platform: xiaomi_miio
    name: Desk light office
    host: 10.10.10.22
    token: xxxxxxxxxxxxxxxxxxxxxxxx
    model: chuangmi.plug.v3

Traceback/Error logs


Additional information

xiaomi_miio stale

Most helpful comment

Any Update? I got still the same behavior with Version 0.107.7

All 13 comments

Hey there @rytilahti, @syssi, mind taking a look at this issue as its been labeled with a integration (xiaomi_miio) you are listed as a codeowner for? Thanks!

Please add these lines to your configuration.yaml

logger:
  default: warn
  logs:
    miio: debug
    homeassistant.components.xiaomi_miio.switch: debug

Restart HA and toggle the switch (1. via the MiHome app, 2. via HA). Please provide your home-assistant.log. You should see something like this:

2020-02-09 17:57:56 DEBUG (SyncWorker_1) [miio.device] Discovered 034b38dd with ts: 1970-01-01 00:09:52, token: b'b051cd86f85996283d82ccf9d27bd2db'
2020-02-09 17:57:56 DEBUG (SyncWorker_1) [miio.device] 192.168.130.57:54321 >>: {'id': 102, 'method': 'get_prop', 'params': ['power', 'temperature']}
2020-02-09 17:57:57 DEBUG (SyncWorker_1) [miio.device] 192.168.130.57:54321 (ts: 1970-01-01 00:09:52, id: 102) << {'result': ['off', 36], 'id': 102}
2020-02-09 17:57:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=36, load_power=None, wifi_led=None>
2020-02-09 17:58:00 DEBUG (SyncWorker_9) [miio.device] 192.168.130.57:54321 >>: {'id': 103, 'method': 'set_power', 'params': ['on']}
2020-02-09 17:58:00 DEBUG (SyncWorker_9) [miio.device] 192.168.130.57:54321 (ts: 1970-01-01 00:09:56, id: 103) << {'result': ['ok'], 'id': 103}
2020-02-09 17:58:00 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok']
2020-02-09 17:58:02 DEBUG (SyncWorker_1) [miio.device] 192.168.130.57:54321 >>: {'id': 104, 'method': 'set_power', 'params': ['off']}
2020-02-09 17:58:02 DEBUG (SyncWorker_1) [miio.device] 192.168.130.57:54321 (ts: 1970-01-01 00:09:57, id: 104) << {'result': ['ok'], 'id': 104}
2020-02-09 17:58:02 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok']

Thanks for the quick response.
Here the Log output. The Socket is IP 10.10.10.22
I turned it on and off in the Mi APP. No state change in HA.
Then I turned it off in HA and after a few seconds the change changed to on again (socket off)
I turned it off in HA again and before it switched back to on automatically i turned it on in HA. (socket turn on)

You can ignore Device 10.10.10.51 as it's currently not connected

2020-02-10 09:44:14 DEBUG (SyncWorker_9) [miio.device] Discovered 0723a5b5 with ts: 1970-01-20 13:14:33, token: b'ffffffffffffffffffffffffffffffff'
2020-02-10 09:44:14 DEBUG (SyncWorker_9) [miio.device] 10.10.10.43:54321 >>: {'id': 118, 'method': 'get_power', 'params': []}
2020-02-10 09:44:15 DEBUG (SyncWorker_9) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 13:14:33, id: 118) << {'id': 118, 'result': [0], 'exe_time': 80}
2020-02-10 09:44:15 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=26, load_power=0.0, wifi_led=True>
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 49, 'method': 'get_status', 'params': []}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 49) << {'result': [{'msg_ver': 8, 'msg_seq': 999, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 49}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 50, 'method': 'get_consumable', 'params': []}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 50) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 50}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 51, 'method': 'get_clean_summary', 'params': []}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 51) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 51}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 52, 'method': 'get_clean_summary', 'params': []}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 52) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 52}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 53, 'method': 'get_clean_record', 'params': [1581231248]}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 53) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 53}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 >>: {'id': 54, 'method': 'get_dnd_timer', 'params': []}
2020-02-10 09:44:20 DEBUG (SyncWorker_0) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:20, id: 54) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 54}
2020-02-10 09:44:23 WARNING (Thread-40) [pyShelly] Error, 401 Unauthorized
2020-02-10 09:44:27 WARNING (Poll) [pyShelly] Error, 401 Unauthorized
2020-02-10 09:44:37 DEBUG (SyncWorker_6) [miio.device] 10.10.10.35:54321 >>: {'id': 13, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']}
2020-02-10 09:44:37 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 >>: {'id': 114, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']}
2020-02-10 09:44:37 DEBUG (SyncWorker_6) [miio.device] 10.10.10.35:54321 (ts: 1970-01-15 18:02:32, id: 13) << {'result': ['off', 0, None, None, None, 'idle', None, 91, 288, None, 0, 0, None, 3500, 'on'], 'id': 13}
2020-02-10 09:44:37 DEBUG (SyncWorker_6) [miio.device] 10.10.10.35:54321 >>: {'id': 14, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']}
2020-02-10 09:44:37 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 (ts: 1970-02-14 22:23:06, id: 114) << {'result': ['off', 0, None, None, None, 'idle', None, 80, 686, None, 0, 0, None, 3500, 'on'], 'id': 114}
2020-02-10 09:44:37 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 >>: {'id': 115, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']}
2020-02-10 09:44:37 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 (ts: 1970-02-14 22:23:06, id: 115) << {'result': [10, 190, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 115}
2020-02-10 09:44:37 DEBUG (SyncWorker_6) [miio.device] 10.10.10.35:54321 (ts: 1970-01-15 18:02:32, id: 14) << {'result': [10, 107, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 14}
2020-02-10 09:44:38 WARNING (Thread-42) [pyShelly] Error, 401 Unauthorized
2020-02-10 09:44:39 DEBUG (SyncWorker_8) [miio.device] 10.10.10.32:54321 >>: {'id': 12, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']}
2020-02-10 09:44:39 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 >>: {'id': 12, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']}
2020-02-10 09:44:39 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 >>: {'id': 120, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-02-10 09:44:39 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 >>: {'id': 119, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-02-10 09:44:39 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 >>: {'id': 19, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-02-10 09:44:39 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 >>: {'id': 13, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']}
2020-02-10 09:44:39 DEBUG (SyncWorker_3) [miio.device] 10.10.10.32:54321 >>: {'id': 13, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']}
2020-02-10 09:44:39 DEBUG (SyncWorker_8) [miio.device] 10.10.10.32:54321 (ts: 1970-02-14 21:58:05, id: 12) << {'result': [False, False, 39], 'id': 12}
2020-02-10 09:44:39 DEBUG (SyncWorker_8) [miio.device] 10.10.10.48:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['power', 'temperature']}
2020-02-10 09:44:39 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 (ts: 1970-02-14 21:34:21, id: 12) << {'result': [True, True, 46], 'id': 12}
2020-02-10 09:44:39 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 20, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-02-10 09:44:39 DEBUG (SyncWorker_3) [miio.device] 10.10.10.32:54321 (ts: 1970-02-14 21:58:06, id: 13) << {'result': [False, False, 39], 'id': 13}
2020-02-10 09:44:39 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 (ts: 1970-02-14 21:34:21, id: 13) << {'result': [True, True, 46], 'id': 13}
2020-02-10 09:44:39 DEBUG (SyncWorker_8) [miio.device] 10.10.10.48:54321 (ts: 1970-02-01 15:39:21, id: 7) << {'result': ['off', 22], 'id': 7}
2020-02-10 09:44:39 DEBUG (SyncWorker_3) [miio.device] 10.10.10.30:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['power', 'temperature']}
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=39, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=46, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (SyncWorker_3) [miio.device] 10.10.10.30:54321 (ts: 1970-01-03 21:41:36, id: 7) << {'result': ['off', 22], 'id': 7}
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=39, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=46, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=22, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=22, load_power=None, wifi_led=None>
2020-02-10 09:44:39 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 02:22:02, id: 19) << {'id': 19, 'result': ['off', True, 32, 'on'], 'exe_time': 340}
2020-02-10 09:44:39 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 13:14:57, id: 120) << {'id': 120, 'result': ['off', True, 26, 'on'], 'exe_time': 330}
2020-02-10 09:44:39 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 >>: {'id': 20, 'method': 'get_power', 'params': []}
2020-02-10 09:44:39 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 >>: {'id': 121, 'method': 'get_power', 'params': []}
2020-02-10 09:44:39 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 13:14:58, id: 119) << {'id': 119, 'result': ['off', True, 26, 'on'], 'exe_time': 330}
2020-02-10 09:44:39 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 >>: {'id': 120, 'method': 'get_power', 'params': []}
2020-02-10 09:44:39 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 02:22:02, id: 20) << {'id': 20, 'result': ['off', True, 32, 'on'], 'exe_time': 340}
2020-02-10 09:44:39 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 21, 'method': 'get_power', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 13:14:58, id: 121) << {'id': 121, 'result': [0], 'exe_time': 80}
2020-02-10 09:44:40 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=26, load_power=0.0, wifi_led=True>
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 55, 'method': 'get_status', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 55) << {'result': [{'msg_ver': 8, 'msg_seq': 1003, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 55}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 56, 'method': 'get_consumable', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 56) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 56}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 57, 'method': 'get_clean_summary', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 57) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 57}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 58, 'method': 'get_clean_summary', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 58) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 58}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 59, 'method': 'get_clean_record', 'params': [1581231248]}
2020-02-10 09:44:40 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 13:14:58, id: 120) << {'id': 120, 'result': [0], 'exe_time': 80}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 59) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 59}
2020-02-10 09:44:40 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=26, load_power=0.0, wifi_led=True>
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 >>: {'id': 60, 'method': 'get_dnd_timer', 'params': []}
2020-02-10 09:44:40 DEBUG (SyncWorker_7) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 01:44:40, id: 60) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 60}
2020-02-10 09:44:40 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 02:22:03, id: 20) << {'id': 20, 'result': [0], 'exe_time': 80}
2020-02-10 09:44:40 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=32, load_power=0.0, wifi_led=True>
2020-02-10 09:44:40 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 02:22:03, id: 21) << {'id': 21, 'result': [0], 'exe_time': 80}
2020-02-10 09:44:40 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=32, load_power=0.0, wifi_led=True>
2020-02-10 09:44:44 ERROR (SyncWorker_2) [miio.device] Unable to discover a device at address 10.10.10.51
2020-02-10 09:44:44 ERROR (MainThread) [homeassistant.components.xiaomi_miio.switch] Got exception while fetching the state: Unable to discover the device 10.10.10.51
2020-02-10 09:44:44 ERROR (SyncWorker_1) [miio.device] Unable to discover a device at address 10.10.10.51
2020-02-10 09:44:44 ERROR (MainThread) [homeassistant.components.xiaomi_miio.switch] Got exception while fetching the state: Unable to discover the device 10.10.10.51
2020-02-10 09:44:54 WARNING (Thread-44) [pyShelly] Error, 401 Unauthorized
2020-02-10 09:45:01 DEBUG (SyncWorker_3) [miio.device] 10.10.10.44:54321 >>: {'id': 61, 'method': 'get_status', 'params': []}
2020-02-10 09:45:03 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 >>: {'id': 22, 'method': 'set_power', 'params': ['off']}
2020-02-10 09:45:03 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 02:22:26, id: 22) << {'code': 0, 'id': 22, 'result': ['ok'], 'exe_time': 60}
2020-02-10 09:45:03 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok']
2020-02-10 09:45:06 DEBUG (SyncWorker_3) [miio.device] Retrying with incremented id, retries left: 3
2020-02-10 09:45:06 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-02-10 09:45:06 DEBUG (SyncWorker_3) [miio.device] Got a response: Container:

Could you provide the firmware version of your chuangmi plug? It's part of your home-assistant.log (at the top).

Here the complete Log.

In the Mi Home App the Firmware Version 2.0.6_0012 is shown and it says it's up to date.

2020-02-10 18:26:40 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for shelly which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2020-02-10 18:26:40 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2020-02-10 18:26:48 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for unifigateway which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 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\x03\xd8/b^A/\xec' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x03\xd8/b' (total 4) ts = 2020-02-10 10:26:52 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) 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] 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\x00\x0fe\x12\x00\x13\xed\x07' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\x0fe\x12' (total 4) ts = 1970-01-16 02:44:23 offset1 = 0 offset2 = 16 length = 16 checksum = b'\xfb0c\x1c\x8d[E(\x19\x90\xcd\x97H\xfd\x19P' (total 16) 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] Discovered 03d82f62 with ts: 2020-02-10 10:26:52, token: b'ffffffffffffffffffffffffffffffff' 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] Discovered 000f6512 with ts: 1970-01-16 02:44:23, token: b'fb30631c8d5b45281990cd9748fd1950' 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 1, 'method': 'get_status', 'params': []} 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 1) << {'result': [{'msg_ver': 8, 'msg_seq': 2504, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 1} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 2, 'method': 'get_consumable', 'params': []} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 2) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 2} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 3, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 3) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 3} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 4, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 4) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 4} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 5, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 5) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 5} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 >>: {'id': 6, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:26:52 DEBUG (SyncWorker_4) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:26:52, id: 6) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 6} 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:44:23, id: 1) << {'result': ['off', 0, None, None, None, 'idle', None, 91, 288, None, 0, 0, None, 3500, 'on'], 'id': 1} 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] 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\x00\x08\x11\xa9\x00;\xb7,' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\x08\x11\xa9' (total 4) ts = 1970-02-15 07:05:16 offset1 = 0 offset2 = 16 length = 16 checksum = b"\xdfz\xe4\xfc\xbfe\xf5\x10G'\x86\xfa\r\xfc\xfbJ" (total 16) 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] Discovered 000811a9 with ts: 1970-02-15 07:05:16, token: b'df7ae4fcbf65f510472786fa0dfcfb4a' 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:05:17, id: 1) << {'result': ['off', 0, None, None, None, 'idle', None, 80, 686, None, 0, 0, None, 3500, 'on'], 'id': 1} 2020-02-10 18:26:52 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:44:23, id: 2) << {'result': [10, 14, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 2} 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:26:52 DEBUG (SyncWorker_0) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:05:17, id: 2) << {'result': [10, 0, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 2} 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.48 (token 98764...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.52 (token 1eb57...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.22 (token dbfe3...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.51 (token 81514...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.32 (token 41cb8...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.43 (token 643fc...) 2020-02-10 18:26:53 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 10.10.10.30 (token aa084...) 2020-02-10 18:26:53 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds. 2020-02-10 18:26:53 DEBUG (SyncWorker_6) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:53 DEBUG (SyncWorker_6) [miio.device] 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\x05\x80Y\xef\x00 ?\xb0' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x05\x80Y\xef' (total 4) ts = 1970-01-25 11:04:16 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) 2020-02-10 18:26:53 DEBUG (SyncWorker_6) [miio.device] Discovered 058059ef with ts: 1970-01-25 11:04:16, token: b'ffffffffffffffffffffffffffffffff' 2020-02-10 18:26:53 DEBUG (SyncWorker_9) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:53 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:26:53 DEBUG (SyncWorker_9) [miio.device] 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\x05\x80Y\xef\x00 ?\xb0' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x05\x80Y\xef' (total 4) ts = 1970-01-25 11:04:16 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) 2020-02-10 18:26:53 DEBUG (SyncWorker_9) [miio.device] Discovered 058059ef with ts: 1970-01-25 11:04:16, token: b'ffffffffffffffffffffffffffffffff' 2020-02-10 18:26:53 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:26:54 DEBUG (SyncWorker_8) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_8) [miio.device] 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\x03&\x11\xd0\x00*5\x8d' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x03&\x11\xd0' (total 4) ts = 1970-02-02 00:23:41 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-02-10 18:26:54 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:16, id: 1) << {'id': 1, 'result': ['off', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:26:54 DEBUG (SyncWorker_5) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 >>: {'id': 3, 'method': 'get_power', 'params': []} 2020-02-10 18:26:54 DEBUG (SyncWorker_4) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_1) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:17, id: 2) << {'id': 2, 'result': ['off', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:26:54 DEBUG (SyncWorker_7) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_0) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:54 DEBUG (SyncWorker_8) [miio.device] Discovered 032611d0 with ts: 1970-02-02 00:23:41, token: b'00000000000000000000000000000000' 2020-02-10 18:26:54 DEBUG (SyncWorker_2) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] 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\x00\xafE-\x00;\xb1e' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xafE-' (total 4) ts = 1970-02-15 06:40:37 offset1 = 0 offset2 = 16 length = 16 checksum = b'A\xcb\x89`\x81\xe3o\xa3\r\xab?\xe9\x9c\n\x90\x04' (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] Discovered 00af452d with ts: 1970-02-15 06:40:37, token: b'41cb896081e36fa30dab3fe99c0a9004' 2020-02-10 18:26:55 DEBUG (SyncWorker_1) [miio.device] 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\x00\xaf\xea\xe4\x00\x00\x02K' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xaf\xea\xe4' (total 4) ts = 1970-01-01 00:09:47 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x81QN\x19\xaa\x16\x18\x8fl\xbd\xaf\x18\x95\xf6}\xe8' (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_7) [miio.device] 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\x00\xaf\xea\xe4\x00\x00\x02K' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xaf\xea\xe4' (total 4) ts = 1970-01-01 00:09:47 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x81QN\x19\xaa\x16\x18\x8fl\xbd\xaf\x18\x95\xf6}\xe8' (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_0) [miio.device] 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\x00\xafE-\x00;\xb1e' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xafE-' (total 4) ts = 1970-02-15 06:40:37 offset1 = 0 offset2 = 16 length = 16 checksum = b'A\xcb\x89`\x81\xe3o\xa3\r\xab?\xe9\x9c\n\x90\x04' (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 >>: {'id': 4, 'method': 'get_power', 'params': []} 2020-02-10 18:26:55 DEBUG (SyncWorker_4) [miio.device] 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\x00\xaf\xe6\x9e\x00;\xab\xb3' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xaf\xe6\x9e' (total 4) ts = 1970-02-15 06:16:19 offset1 = 0 offset2 = 16 length = 16 checksum = b"\x1e\xb5p\x07\xfc'\xd6\x14\x9b\xff\xf1\xc5)4\xcb\xe4" (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_4) [miio.device] Discovered 00afe69e with ts: 1970-02-15 06:16:19, token: b'1eb57007fc27d6149bfff1c52934cbe4' 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_1) [miio.device] Discovered 00afeae4 with ts: 1970-01-01 00:09:47, token: b'81514e19aa16188f6cbdaf1895f67de8' 2020-02-10 18:26:55 DEBUG (SyncWorker_7) [miio.device] Discovered 00afeae4 with ts: 1970-01-01 00:09:47, token: b'81514e19aa16188f6cbdaf1895f67de8' 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:55 DEBUG (SyncWorker_2) [miio.device] 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\x00\xaf\xe6\x9e\x00;\xab\xb3' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x00\xaf\xe6\x9e' (total 4) ts = 1970-02-15 06:16:19 offset1 = 0 offset2 = 16 length = 16 checksum = b"\x1e\xb5p\x07\xfc'\xd6\x14\x9b\xff\xf1\xc5)4\xcb\xe4" (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_8) [miio.device] 10.10.10.48:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_0) [miio.device] Discovered 00af452d with ts: 1970-02-15 06:40:37, token: b'41cb896081e36fa30dab3fe99c0a9004' 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:40:38, id: 1) << {'result': [False, False, 42], 'id': 1} 2020-02-10 18:26:55 DEBUG (SyncWorker_1) [miio.device] 10.10.10.51:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_7) [miio.device] 10.10.10.51:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.device] 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\x07#\xa5\xb5\x00\x1aA9' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x07#\xa5\xb5' (total 4) ts = 1970-01-20 21:57:13 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) 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.device] Discovered 0723a5b5 with ts: 1970-01-20 21:57:13, token: b'ffffffffffffffffffffffffffffffff' 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:17, id: 3) << {'id': 3, 'result': [0], 'exe_time': 100} 2020-02-10 18:26:55 DEBUG (SyncWorker_0) [miio.device] 10.10.10.32:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_8) [miio.device] 10.10.10.48:54321 (ts: 1970-02-02 00:23:42, id: 1) << {'result': ['off', 25], 'id': 1} 2020-02-10 18:26:55 DEBUG (SyncWorker_2) [miio.device] Discovered 00afe69e with ts: 1970-02-15 06:16:19, token: b'1eb57007fc27d6149bfff1c52934cbe4' 2020-02-10 18:26:55 DEBUG (SyncWorker_1) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:09:48, id: 1) << {'result': [True, True, 40], 'id': 1} 2020-02-10 18:26:55 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:16:20, id: 1) << {'result': [True, True, 49], 'id': 1} 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:55 DEBUG (SyncWorker_7) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:09:48, id: 2) << {'result': [True, True, 40], 'id': 2} 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.device] 10.10.10.43:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:26:55 DEBUG (SyncWorker_9) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:18, id: 4) << {'id': 4, 'result': [0], 'exe_time': 90} 2020-02-10 18:26:55 DEBUG (SyncWorker_0) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:40:38, id: 2) << {'result': [False, False, 42], 'id': 2} 2020-02-10 18:26:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.52:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] 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\x07#\xa5\xb5\x00\x1aA9' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x07#\xa5\xb5' (total 4) ts = 1970-01-20 21:57:13 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) 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] Discovered 0723a5b5 with ts: 1970-01-20 21:57:13, token: b'ffffffffffffffffffffffffffffffff' 2020-02-10 18:26:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:16:20, id: 2) << {'result': [True, True, 49], 'id': 2} 2020-02-10 18:26:55 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=25, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=40, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=40, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.protocol] Unable to decrypt, returning raw bytes: b'' 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.device] 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\x03%\xc9\xaf\x00\x04N\xba' (total 16) value = Container: length = 32 unknown = 0 device_id = b'\x03%\xc9\xaf' (total 4) ts = 1970-01-04 06:24:58 offset1 = 0 offset2 = 16 length = 16 checksum = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' (total 16) 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.device] Discovered 0325c9af with ts: 1970-01-04 06:24:58, token: b'00000000000000000000000000000000' 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.device] 10.10.10.30:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:26:55 DEBUG (SyncWorker_6) [miio.device] 10.10.10.30:54321 (ts: 1970-01-04 06:24:58, id: 1) << {'result': ['off', 24], 'id': 1} 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:13, id: 1) << {'id': 1, 'result': ['off', True, 28, 'on'], 'exe_time': 340} 2020-02-10 18:26:55 DEBUG (SyncWorker_3) [miio.device] 10.10.10.43:54321 >>: {'id': 2, 'method': 'get_power', 'params': []} 2020-02-10 18:26:55 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=24, load_power=None, wifi_led=None> 2020-02-10 18:26:56 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:14, id: 2) << {'id': 2, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:26:56 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 3, 'method': 'get_power', 'params': []} 2020-02-10 18:26:56 DEBUG (SyncWorker_3) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:14, id: 2) << {'id': 2, 'result': [0], 'exe_time': 80} 2020-02-10 18:26:56 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:26:56 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:14, id: 3) << {'id': 3, 'result': [0], 'exe_time': 80} 2020-02-10 18:26:56 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:26:57 WARNING (CoAP) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:26:58 WARNING (Thread-17) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:11 WARNING (SyncWorker_1) [homeassistant.components.homekit.util] ['Auto', 'Silent', 'Favorite', 'Idle', 'Medium', 'High', 'Strong'] does not contain the speed setting off as its first element. Assuming that Auto is equivalent to 'off'. 2020-02-10 18:27:11 WARNING (SyncWorker_1) [homeassistant.components.homekit.util] ['Auto', 'Silent', 'Favorite', 'Idle', 'Medium', 'High', 'Strong'] does not contain the speed setting off as its first element. Assuming that Auto is equivalent to 'off'. 2020-02-10 18:27:11 WARNING (SyncWorker_1) [homeassistant.components.homekit] You have exceeded the device limit, which might cause issues. Consider using the filter option. 2020-02-10 18:27:13 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 7, 'method': 'get_status', 'params': []} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:14, id: 7) << {'result': [{'msg_ver': 8, 'msg_seq': 2505, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 7} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 8, 'method': 'get_consumable', 'params': []} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:14, id: 8) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 8} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 9, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:14, id: 9) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 9} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 10, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:14, id: 10) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 10} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 11, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:15, id: 11) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 11} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 >>: {'id': 12, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:27:14 DEBUG (SyncWorker_1) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:15, id: 12) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 12} 2020-02-10 18:27:14 WARNING (Thread-21) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:24 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:27:24 DEBUG (SyncWorker_9) [miio.device] 10.10.10.35:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:27:24 DEBUG (SyncWorker_9) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:44:55, id: 3) << {'result': ['off', 0, None, None, None, 'idle', None, 91, 288, None, 0, 0, None, 3500, 'on'], 'id': 3} 2020-02-10 18:27:24 DEBUG (SyncWorker_9) [miio.device] 10.10.10.35:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:27:24 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:05:49, id: 3) << {'result': ['off', 0, None, None, None, 'idle', None, 80, 686, None, 0, 0, None, 3500, 'on'], 'id': 3} 2020-02-10 18:27:24 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:27:24 DEBUG (SyncWorker_9) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:44:55, id: 4) << {'result': [10, 14, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 4} 2020-02-10 18:27:24 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:05:49, id: 4) << {'result': [10, 0, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 4} 2020-02-10 18:27:26 DEBUG (SyncWorker_1) [miio.device] 10.10.10.48:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_7) [miio.device] 10.10.10.51:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_0) [miio.device] 10.10.10.30:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_5) [miio.device] 10.10.10.52:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_8) [miio.device] 10.10.10.51:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_2) [miio.device] 10.10.10.43:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:26 DEBUG (SyncWorker_9) [miio.device] 10.10.10.32:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (SyncWorker_5) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:16:51, id: 3) << {'result': [True, True, 49], 'id': 3} 2020-02-10 18:27:26 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (SyncWorker_9) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:41:09, id: 3) << {'result': [False, False, 42], 'id': 3} 2020-02-10 18:27:26 DEBUG (SyncWorker_1) [miio.device] 10.10.10.48:54321 (ts: 1970-02-02 00:24:13, id: 2) << {'result': ['off', 25], 'id': 2} 2020-02-10 18:27:26 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:16:51, id: 4) << {'result': [True, True, 49], 'id': 4} 2020-02-10 18:27:26 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:26 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (SyncWorker_9) [miio.device] 10.10.10.32:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=25, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (SyncWorker_2) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:44, id: 4) << {'id': 4, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:27:26 DEBUG (SyncWorker_2) [miio.device] 10.10.10.43:54321 >>: {'id': 5, 'method': 'get_power', 'params': []} 2020-02-10 18:27:26 DEBUG (SyncWorker_9) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:41:09, id: 4) << {'result': [False, False, 42], 'id': 4} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:45, id: 5) << {'id': 5, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:27:26 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 6, 'method': 'get_power', 'params': []} 2020-02-10 18:27:26 DEBUG (SyncWorker_7) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:10:20, id: 3) << {'result': [True, True, 40], 'id': 3} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=40, load_power=None, wifi_led=None> 2020-02-10 18:27:26 DEBUG (SyncWorker_8) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:10:20, id: 4) << {'result': [True, True, 40], 'id': 4} 2020-02-10 18:27:26 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:49, id: 5) << {'id': 5, 'result': ['off', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:27:26 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=40, load_power=None, wifi_led=None> 2020-02-10 18:27:27 DEBUG (SyncWorker_2) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:45, id: 5) << {'id': 5, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:27 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 >>: {'id': 6, 'method': 'get_power', 'params': []} 2020-02-10 18:27:27 DEBUG (SyncWorker_0) [miio.device] 10.10.10.30:54321 (ts: 1970-01-04 06:25:30, id: 2) << {'result': ['off', 24], 'id': 2} 2020-02-10 18:27:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:27:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=24, load_power=None, wifi_led=None> 2020-02-10 18:27:27 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:57:45, id: 6) << {'id': 6, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:27:27 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:50, id: 6) << {'id': 6, 'result': ['off', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:27:27 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 7, 'method': 'get_power', 'params': []} 2020-02-10 18:27:27 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:50, id: 6) << {'id': 6, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:27 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:04:50, id: 7) << {'id': 7, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:27:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:27:29 WARNING (Thread-23) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 13, 'method': 'get_status', 'params': []} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:34, id: 13) << {'result': [{'msg_ver': 8, 'msg_seq': 2511, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 13} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 14, 'method': 'get_consumable', 'params': []} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:34, id: 14) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 14} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 15, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:34, id: 15) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 15} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 16, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:35, id: 16) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 16} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 17, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:35, id: 17) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 17} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 18, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:27:34 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:35, id: 18) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 18} 2020-02-10 18:27:43 DEBUG (SyncWorker_0) [miio.device] 10.10.10.22:54321 >>: {'id': 8, 'method': 'set_power', 'params': ['off']} 2020-02-10 18:27:43 WARNING (Thread-25) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:43 DEBUG (SyncWorker_0) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:06, id: 8) << {'code': 0, 'id': 8, 'result': ['ok'], 'exe_time': 60} 2020-02-10 18:27:43 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok'] 2020-02-10 18:27:48 WARNING (Poll) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:54 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:27:54 DEBUG (SyncWorker_8) [miio.device] 10.10.10.35:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:27:54 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:06:18, id: 5) << {'result': ['off', 0, None, None, None, 'idle', None, 80, 686, None, 0, 0, None, 3500, 'on'], 'id': 5} 2020-02-10 18:27:54 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:27:54 DEBUG (SyncWorker_8) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:45:25, id: 5) << {'result': ['off', 0, None, None, None, 'idle', None, 91, 288, None, 0, 0, None, 3500, 'on'], 'id': 5} 2020-02-10 18:27:54 DEBUG (SyncWorker_8) [miio.device] 10.10.10.35:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:27:54 DEBUG (SyncWorker_5) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:06:19, id: 6) << {'result': [10, 0, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 6} 2020-02-10 18:27:54 DEBUG (SyncWorker_8) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:45:25, id: 6) << {'result': [10, 14, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 6} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 19, 'method': 'get_status', 'params': []} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 19) << {'result': [{'msg_ver': 8, 'msg_seq': 2513, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 19} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 20, 'method': 'get_consumable', 'params': []} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 20) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 20} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 21, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 21) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 21} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 22, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 22) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 22} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 23, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 23) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 23} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 24, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:27:55 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:27:55, id: 24) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 24} 2020-02-10 18:27:57 DEBUG (SyncWorker_6) [miio.device] 10.10.10.51:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_4) [miio.device] 10.10.10.48:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_9) [miio.device] 10.10.10.51:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_0) [miio.device] 10.10.10.30:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_8) [miio.device] 10.10.10.32:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 >>: {'id': 9, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:57 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 >>: {'id': 10, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:57 DEBUG (SyncWorker_4) [miio.device] 10.10.10.48:54321 (ts: 1970-02-02 00:24:44, id: 3) << {'result': ['off', 25], 'id': 3} 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=25, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (SyncWorker_0) [miio.device] 10.10.10.30:54321 (ts: 1970-01-04 06:26:00, id: 3) << {'result': ['off', 24], 'id': 3} 2020-02-10 18:27:57 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=24, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:57 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:41:40, id: 5) << {'result': [False, False, 42], 'id': 5} 2020-02-10 18:27:57 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:27:57 DEBUG (SyncWorker_8) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:41:40, id: 6) << {'result': [False, False, 42], 'id': 6} 2020-02-10 18:27:57 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:15, id: 7) << {'id': 7, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:27:57 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:20, id: 9) << {'id': 9, 'result': ['off', True, 38, 'on'], 'exe_time': 350} 2020-02-10 18:27:57 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 >>: {'id': 8, 'method': 'get_power', 'params': []} 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 >>: {'id': 10, 'method': 'get_power', 'params': []} 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:17:23, id: 5) << {'result': [True, True, 49], 'id': 5} 2020-02-10 18:27:57 DEBUG (SyncWorker_4) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:17:23, id: 6) << {'result': [True, True, 49], 'id': 6} 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:27:57 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:20, id: 10) << {'id': 10, 'result': ['off', True, 38, 'on'], 'exe_time': 330} 2020-02-10 18:27:57 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:16, id: 8) << {'id': 8, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:27:57 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 >>: {'id': 9, 'method': 'get_power', 'params': []} 2020-02-10 18:27:57 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 >>: {'id': 11, 'method': 'get_power', 'params': []} 2020-02-10 18:27:57 DEBUG (SyncWorker_6) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:10:51, id: 5) << {'result': [True, True, 41], 'id': 5} 2020-02-10 18:27:58 DEBUG (SyncWorker_9) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:10:51, id: 6) << {'result': [True, True, 41], 'id': 6} 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=41, load_power=None, wifi_led=None> 2020-02-10 18:27:58 DEBUG (SyncWorker_1) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:20, id: 10) << {'id': 10, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:58 DEBUG (SyncWorker_0) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:16, id: 8) << {'id': 8, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=41, load_power=None, wifi_led=None> 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:27:58 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:20, id: 11) << {'id': 11, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:58 DEBUG (SyncWorker_5) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:16, id: 9) << {'id': 9, 'result': [0], 'exe_time': 80} 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=38, load_power=0.0, wifi_led=True> 2020-02-10 18:27:58 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:27:59 WARNING (Thread-27) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:27:59 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 >>: {'id': 12, 'method': 'set_power', 'params': ['off']} 2020-02-10 18:28:00 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:22, id: 12) << {'code': 0, 'id': 12, 'result': ['ok'], 'exe_time': 60} 2020-02-10 18:28:00 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok'] 2020-02-10 18:28:02 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 >>: {'id': 13, 'method': 'set_power', 'params': ['on']} 2020-02-10 18:28:02 DEBUG (SyncWorker_6) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:25, id: 13) << {'code': 0, 'id': 13, 'result': ['ok'], 'exe_time': 180} 2020-02-10 18:28:02 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok'] 2020-02-10 18:28:07 DEBUG (SyncWorker_0) [miio.device] 10.10.10.22:54321 >>: {'id': 14, 'method': 'set_power', 'params': ['off']} 2020-02-10 18:28:07 DEBUG (SyncWorker_0) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:30, id: 14) << {'code': 0, 'id': 14, 'result': ['ok'], 'exe_time': 170} 2020-02-10 18:28:07 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok'] 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 25, 'method': 'get_status', 'params': []} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 25) << {'result': [{'msg_ver': 8, 'msg_seq': 2514, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 25} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 26, 'method': 'get_consumable', 'params': []} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 26) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 26} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 27, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 27) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 27} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 28, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 28) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 28} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 29, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 29) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 29} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 >>: {'id': 30, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:28:16 DEBUG (SyncWorker_2) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:16, id: 30) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 30} 2020-02-10 18:28:17 WARNING (Thread-29) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:28:25 DEBUG (SyncWorker_6) [miio.device] 10.10.10.17:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:28:25 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['power', 'aqi', 'average_aqi', 'humidity', 'temp_dec', 'mode', 'favorite_level', 'filter1_life', 'f1_hour_used', 'use_time', 'motor1_speed', 'motor2_speed', 'purify_volume', 'f1_hour', 'led']} 2020-02-10 18:28:25 DEBUG (SyncWorker_6) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:06:49, id: 7) << {'result': ['off', 0, None, None, None, 'idle', None, 80, 686, None, 0, 0, None, 3500, 'on'], 'id': 7} 2020-02-10 18:28:25 DEBUG (SyncWorker_6) [miio.device] 10.10.10.17:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:28:25 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:45:56, id: 7) << {'result': ['off', 0, None, None, None, 'idle', None, 91, 288, None, 0, 0, None, 3500, 'on'], 'id': 7} 2020-02-10 18:28:25 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['led_b', 'bright', 'buzzer', 'child_lock', 'volume', 'rfid_product_id', 'rfid_tag', 'act_sleep', 'sleep_mode', 'sleep_time', 'sleep_data_num', 'app_extra', 'act_det', 'button_pressed']} 2020-02-10 18:28:25 DEBUG (SyncWorker_6) [miio.device] 10.10.10.17:54321 (ts: 1970-02-15 07:06:50, id: 8) << {'result': [10, 0, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 8} 2020-02-10 18:28:25 DEBUG (SyncWorker_5) [miio.device] 10.10.10.35:54321 (ts: 1970-01-16 02:45:56, id: 8) << {'result': [10, 14, 'on', 'off', None, None, None, None, None, None, None, None, 'off', None], 'id': 8} 2020-02-10 18:28:25 DEBUG (SyncWorker_8) [miio.device] 10.10.10.22:54321 >>: {'id': 15, 'method': 'set_power', 'params': ['on']} 2020-02-10 18:28:25 DEBUG (SyncWorker_8) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:48, id: 15) << {'code': 0, 'id': 15, 'result': ['ok'], 'exe_time': 180} 2020-02-10 18:28:25 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok'] 2020-02-10 18:28:28 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_8) [miio.device] 10.10.10.43:54321 >>: {'id': 10, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:28:28 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 >>: {'id': 16, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:28:28 DEBUG (SyncWorker_7) [miio.device] 10.10.10.32:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_4) [miio.device] 10.10.10.51:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_0) [miio.device] 10.10.10.48:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 >>: {'id': 11, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:28:28 DEBUG (SyncWorker_9) [miio.device] 10.10.10.52:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_1) [miio.device] 10.10.10.51:54321 >>: {'id': 7, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_5) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:42:10, id: 7) << {'result': [False, False, 42], 'id': 7} 2020-02-10 18:28:28 DEBUG (SyncWorker_5) [miio.device] 10.10.10.30:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['power', 'temperature']} 2020-02-10 18:28:28 DEBUG (SyncWorker_4) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:11:21, id: 8) << {'result': [True, True, 41], 'id': 8} 2020-02-10 18:28:28 DEBUG (SyncWorker_7) [miio.device] 10.10.10.32:54321 (ts: 1970-02-15 06:42:10, id: 8) << {'result': [False, False, 42], 'id': 8} 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (SyncWorker_0) [miio.device] 10.10.10.48:54321 (ts: 1970-02-02 00:25:15, id: 4) << {'result': ['off', 25], 'id': 4} 2020-02-10 18:28:28 DEBUG (SyncWorker_5) [miio.device] 10.10.10.30:54321 (ts: 1970-01-04 06:26:31, id: 4) << {'result': ['off', 24], 'id': 4} 2020-02-10 18:28:28 DEBUG (SyncWorker_1) [miio.device] 10.10.10.51:54321 (ts: 1970-01-01 00:11:21, id: 7) << {'result': [True, True, 41], 'id': 7} 2020-02-10 18:28:28 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 >>: {'id': 8, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature']} 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=41, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=False, temperature=42, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=25, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 17, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']} 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=41, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=False, usb_power=None, temperature=24, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:51, id: 16) << {'id': 16, 'result': ['on', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:28:28 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 >>: {'id': 17, 'method': 'get_power', 'params': []} 2020-02-10 18:28:28 DEBUG (SyncWorker_8) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:46, id: 10) << {'id': 10, 'result': ['off', True, 28, 'on'], 'exe_time': 340} 2020-02-10 18:28:28 DEBUG (SyncWorker_9) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:17:53, id: 7) << {'result': [True, True, 49], 'id': 7} 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (SyncWorker_8) [miio.device] 10.10.10.43:54321 >>: {'id': 11, 'method': 'get_power', 'params': []} 2020-02-10 18:28:28 DEBUG (SyncWorker_7) [miio.device] 10.10.10.52:54321 (ts: 1970-02-15 06:17:53, id: 8) << {'result': [True, True, 49], 'id': 8} 2020-02-10 18:28:28 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=True, usb_power=True, temperature=49, load_power=None, wifi_led=None> 2020-02-10 18:28:28 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:51, id: 17) << {'id': 17, 'result': ['on', True, 38, 'on'], 'exe_time': 340} 2020-02-10 18:28:28 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 >>: {'id': 18, 'method': 'get_power', 'params': []} 2020-02-10 18:28:28 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:47, id: 11) << {'id': 11, 'result': ['off', True, 28, 'on'], 'exe_time': 330} 2020-02-10 18:28:28 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 >>: {'id': 12, 'method': 'get_power', 'params': []} 2020-02-10 18:28:28 DEBUG (SyncWorker_8) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:47, id: 11) << {'id': 11, 'result': [0], 'exe_time': 80} 2020-02-10 18:28:29 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:28:29 DEBUG (SyncWorker_6) [miio.device] 10.10.10.43:54321 (ts: 1970-01-20 21:58:47, id: 12) << {'id': 12, 'result': [0], 'exe_time': 80} 2020-02-10 18:28:29 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=off, usb_power=True, temperature=28, load_power=0.0, wifi_led=True> 2020-02-10 18:28:29 DEBUG (SyncWorker_2) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:51, id: 17) << {'id': 17, 'result': [1200], 'exe_time': 80} 2020-02-10 18:28:29 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=on, usb_power=True, temperature=38, load_power=12.0, wifi_led=True> 2020-02-10 18:28:29 DEBUG (SyncWorker_4) [miio.device] 10.10.10.22:54321 (ts: 1970-01-25 11:05:51, id: 18) << {'id': 18, 'result': [1200], 'exe_time': 80} 2020-02-10 18:28:29 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: <ChuangmiPlugStatus power=on, usb_power=True, temperature=38, load_power=12.0, wifi_led=True> 2020-02-10 18:28:30 WARNING (Thread-31) [pyShelly] Error, 401 Unauthorized 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 31, 'method': 'get_status', 'params': []} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 31) << {'result': [{'msg_ver': 8, 'msg_seq': 2515, 'state': 8, 'battery': 100, 'clean_time': 3773, 'clean_area': 66555000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0}], 'id': 31} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 32, 'method': 'get_consumable', 'params': []} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 32) << {'result': [{'main_brush_work_time': 198917, 'side_brush_work_time': 198917, 'filter_work_time': 198917, 'sensor_dirty_time': 89341}], 'id': 32} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 33, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 33) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 33} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 34, 'method': 'get_clean_summary', 'params': []} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 34) << {'result': [198299, 2984487500, 68, [1581231248, 1580873722, 1580447632, 1580189555, 1578391755, 1572476451, 1567654169, 1566699978, 1554453403, 1554452376, 1554002991, 1552271485, 1550974664, 1550463802, 1550294053, 1549592160, 1548397476, 1542427167, 1539408831, 1538808439]], 'id': 34} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 35, 'method': 'get_clean_record', 'params': [1581231248]} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 35) << {'result': [[1581231248, 1581235021, 3773, 66555000, 0, 1]], 'id': 35} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 >>: {'id': 36, 'method': 'get_dnd_timer', 'params': []} 2020-02-10 18:28:36 DEBUG (SyncWorker_8) [miio.device] 10.10.10.44:54321 (ts: 2020-02-10 10:28:36, id: 36) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 36}

Any Update? I got still the same behavior with Version 0.107.7

To triage the location of the problem, could you try if the miplug command-line tool is giving correct results? If yes, then the problem is likely in the integration and not in the backend library.

Also, the logs are showing responses from multiple devices, making it hard to see what is happening. Could you re-try with only having a single plug?

Hi. I have the same issue. In HA power status always ON. USB part working correctly from MI Home and from HA.

Here is the log when I tried to switch plug power from Mi home and from HA.
Plug ip 192.168.1.63

2020-04-05 15:05:12 DEBUG (SyncWorker_6) [miio.device] 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\x05\xe3Ga\x00\tCk' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x05\xe3Ga' (total 4)
            ts = 1970-01-08 00:38:03
        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)
2020-04-05 15:05:12 DEBUG (SyncWorker_6) [miio.device] Discovered 05e34761 with ts: 1970-01-08 00:38:03, token: b'ffffffffffffffffffffffffffffffff'
2020-04-05 15:05:12 DEBUG (SyncWorker_6) [miio.device] 192.168.1.11:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
2020-04-05 15:05:12 INFO (MainThread) [homeassistant.components.xiaomi_miio.switch] Initializing with host 192.168.1.63 (token 0f15f...)
2020-04-05 15:05:12 DEBUG (SyncWorker_2) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:12 DEBUG (SyncWorker_2) [miio.device] 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\x03\xdb~\xd2^\x89\xc9\x88' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x03\xdb~\xd2' (total 4)
            ts = 2020-04-05 12:05:28
        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)
2020-04-05 15:05:12 DEBUG (SyncWorker_2) [miio.device] Discovered 03db7ed2 with ts: 2020-04-05 12:05:28, token: b'ffffffffffffffffffffffffffffffff'
2020-04-05 15:05:12 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 1, 'method': 'get_status', 'params': []}
2020-04-05 15:05:12 DEBUG (SyncWorker_7) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] 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\x07'bv\x00\x00\x07\xf8" (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b"\x07'bv" (total 4)
            ts = 1970-01-01 00:34:00
        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)
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] Discovered 07276276 with ts: 1970-01-01 00:34:00, token: b'ffffffffffffffffffffffffffffffff'
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] 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\x07'bv\x00\x00\x07\xf8" (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b"\x07'bv" (total 4)
            ts = 1970-01-01 00:34:00
        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)
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] Discovered 07276276 with ts: 1970-01-01 00:34:00, token: b'ffffffffffffffffffffffffffffffff'
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 >>: {'id': 2, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:05:13 DEBUG (SyncWorker_0) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:13 DEBUG (SyncWorker_0) [miio.device] 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\x05\xe3Ga\x00\tCl' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x05\xe3Ga' (total 4)
            ts = 1970-01-08 00:38:04
        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)
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:01, id: 2) << {'id': 2, 'result': ['off', False, 38, 'on'], 'exe_time': 340}
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 >>: {'id': 3, 'method': 'get_power', 'params': []}
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:01, id: 1) << {'id': 1, 'result': ['off', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 >>: {'id': 2, 'method': 'get_power', 'params': []}
2020-04-05 15:05:13 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:01, id: 3) << {'id': 3, 'result': [0], 'exe_time': 80}
2020-04-05 15:05:13 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:05:13 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:01, id: 2) << {'id': 2, 'result': [0], 'exe_time': 80}
2020-04-05 15:05:13 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] Retrying with incremented id, retries left: 3
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 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\x03\xdb~\xd2^\x89\xc9\x8d' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x03\xdb~\xd2' (total 4)
            ts = 2020-04-05 12:05:33
        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)
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] Discovered 03db7ed2 with ts: 2020-04-05 12:05:33, token: b'ffffffffffffffffffffffffffffffff'
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 102, 'method': 'get_status', 'params': []}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 102) << {'result': [{'msg_ver': 8, 'msg_seq': 1978, 'state': 8, 'battery': 100, 'clean_time': 2539, 'clean_area': 35620000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 90, 'dnd_enabled': 0}], 'id': 102}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 103, 'method': 'get_consumable', 'params': []}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 103) << {'result': [{'main_brush_work_time': 685657, 'side_brush_work_time': 312184, 'filter_work_time': 127697, 'sensor_dirty_time': 87621}], 'id': 103}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 104, 'method': 'get_clean_summary', 'params': []}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 104) << {'result': [1567648, 23145735000, 767, [1585925438, 1585731599, 1585645623, 1585645200, 1585558800, 1585299601, 1585213199, 1585126800, 1585040401, 1584954000, 1584694801, 1584608402, 1584522001, 1584435602, 1584349201, 1584184874, 1584090001, 1584003600, 1583917199, 1583830801]], 'id': 104}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 105, 'method': 'get_clean_summary', 'params': []}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 105) << {'result': [1567648, 23145735000, 767, [1585925438, 1585731599, 1585645623, 1585645200, 1585558800, 1585299601, 1585213199, 1585126800, 1585040401, 1584954000, 1584694801, 1584608402, 1584522001, 1584435602, 1584349201, 1584184874, 1584090001, 1584003600, 1583917199, 1583830801]], 'id': 105}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 106, 'method': 'get_clean_record', 'params': [1585925438]}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 106) << {'result': [[1585925438, 1585927977, 2539, 35620000, 0, 1]], 'id': 106}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 >>: {'id': 107, 'method': 'get_dnd_timer', 'params': []}
2020-04-05 15:05:17 DEBUG (SyncWorker_2) [miio.device] 192.168.1.106:54321 (ts: 2020-04-05 12:05:33, id: 107) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 107}
2020-04-05 15:05:20 DEBUG (SyncWorker_0) [miio.device] Retrying with incremented id, retries left: 3
2020-04-05 15:05:20 DEBUG (SyncWorker_0) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-04-05 15:05:20 DEBUG (SyncWorker_0) [miio.device] 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\x05\xe3Ga\x00\tCs' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x05\xe3Ga' (total 4)
            ts = 1970-01-08 00:38:11
        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)
2020-04-05 15:05:44 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 >>: {'id': 4, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:05:44 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 >>: {'id': 3, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:05:44 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:33, id: 4) << {'id': 4, 'result': ['on', False, 38, 'on'], 'exe_time': 340}
2020-04-05 15:05:44 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 >>: {'id': 5, 'method': 'get_power', 'params': []}
2020-04-05 15:05:44 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:33, id: 3) << {'id': 3, 'result': ['on', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:05:44 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 >>: {'id': 4, 'method': 'get_power', 'params': []}
2020-04-05 15:05:44 DEBUG (SyncWorker_5) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:33, id: 5) << {'id': 5, 'result': [100], 'exe_time': 90}
2020-04-05 15:05:44 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:05:45 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:34:33, id: 4) << {'id': 4, 'result': [100], 'exe_time': 80}
2020-04-05 15:05:45 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:06:15 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 >>: {'id': 5, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:06:15 DEBUG (SyncWorker_4) [miio.device] 192.168.1.63:54321 >>: {'id': 6, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:06:15 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:04, id: 5) << {'id': 5, 'result': ['off', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:06:15 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 >>: {'id': 6, 'method': 'get_power', 'params': []}
2020-04-05 15:06:15 DEBUG (SyncWorker_4) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:04, id: 6) << {'id': 6, 'result': ['off', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:06:15 DEBUG (SyncWorker_4) [miio.device] 192.168.1.63:54321 >>: {'id': 7, 'method': 'get_power', 'params': []}
2020-04-05 15:06:15 DEBUG (SyncWorker_7) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:05, id: 6) << {'id': 6, 'result': [0], 'exe_time': 80}
2020-04-05 15:06:15 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:06:15 DEBUG (SyncWorker_4) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:05, id: 7) << {'id': 7, 'result': [0], 'exe_time': 80}
2020-04-05 15:06:15 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:06:27 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 >>: {'id': 8, 'method': 'set_power', 'params': ['off']}
2020-04-05 15:06:27 DEBUG (SyncWorker_2) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:16, id: 8) << {'code': 0, 'id': 8, 'result': ['ok'], 'exe_time': 50}
2020-04-05 15:06:27 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Response received from plug: ['ok']
2020-04-05 15:06:46 DEBUG (SyncWorker_8) [miio.device] 192.168.1.63:54321 >>: {'id': 9, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:06:46 DEBUG (SyncWorker_0) [miio.device] 192.168.1.63:54321 >>: {'id': 10, 'method': 'get_prop', 'params': ['on', 'usb_on', 'temperature', 'wifi_led']}
2020-04-05 15:06:46 DEBUG (SyncWorker_8) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:36, id: 9) << {'id': 9, 'result': ['off', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:06:46 DEBUG (SyncWorker_8) [miio.device] 192.168.1.63:54321 >>: {'id': 10, 'method': 'get_power', 'params': []}
2020-04-05 15:06:46 DEBUG (SyncWorker_0) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:36, id: 10) << {'id': 10, 'result': ['off', False, 38, 'on'], 'exe_time': 330}
2020-04-05 15:06:46 DEBUG (SyncWorker_0) [miio.device] 192.168.1.63:54321 >>: {'id': 11, 'method': 'get_power', 'params': []}
2020-04-05 15:06:46 DEBUG (SyncWorker_8) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:36, id: 10) << {'id': 10, 'result': [0], 'exe_time': 80}
2020-04-05 15:06:46 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 
2020-04-05 15:06:46 DEBUG (SyncWorker_0) [miio.device] 192.168.1.63:54321 (ts: 1970-01-01 00:35:36, id: 11) << {'id': 11, 'result': [0], 'exe_time': 80}
2020-04-05 15:06:46 DEBUG (MainThread) [homeassistant.components.xiaomi_miio.switch] Got new state: 

Respond from miplug command:

ildar@ubuntu_test:~$ miplug --ip 192.168.1.63 --token 0f15f0....
Power: False
Temperature: 35

HA version: 0.107.7

The same problem here. Started whe I've updated firmware to 2.0.6_0012. miiocli tool displays correct power state, looks like the problem is with integration. Please let me know how can I help to find the problem

I've found the problem. Looks like before the update power value was reported either as "on":True or "on":False, but now it is reported as "on":"on" or "on":"off". I've fixed class ChuangmiPlugStatus of python_miio in file chuangmi_plug.py and everything works fine.

def power(self) -> bool:
    """Current power state."""
    if "on" in self.data:
        return self.data["on"]==True or self.data["on"]=="on"
    if "power" in self.data:
        return self.data["power"] == "on"

Could you please create a PR to python-miio?

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

With Home assistant version 0.112 it's finally fixed. Thanks a lot

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coolriku picture coolriku  路  3Comments

neonandu picture neonandu  路  3Comments

sibbl picture sibbl  路  3Comments

Konstigt picture Konstigt  路  3Comments

piitaya picture piitaya  路  3Comments