openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

[miio] Mi PowerPlug v3 - Command not send. Value null #7713

Closed Stefan300381 closed 4 years ago

Stefan300381 commented 4 years ago

Using Xiaomi miio binding I was able to switch the USB ports of my Mi PowerPlug v3 in the past using channel: miio:generic:0723B6D1:usb

Now it doesn't work anymore. OH receives the item command ON and pretends the item became ON. Just a few milliseconds later the item changes back to OFF, see DEBUG logs. Not sure if this issue is related to a recent update to OH 2.5.4.

log:

2020-05-21 11:02:04.734 [ome.event.ItemCommandEvent] - Item 'MiPlug_v3_01_USB' received command ON

2020-05-21 11:02:04.757 [nt.ItemStatePredictedEvent] - MiPlug_v3_01_USB predicted to become ON

2020-05-21 11:02:04.777 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-05-21 11:02:04.787 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Locating action for channel usb: ON

2020-05-21 11:02:04.791 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Command not send. Value null

2020-05-21 11:02:04.794 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-21 11:02:04.799 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":33,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-21 11:02:04.967 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,35,"on"], fullresponse: {"result":["on",false,35,"on"],"id":33}

==> /var/log/openhab2/events.log <==

2020-05-21 11:02:04.979 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from ON to OFF

==> /var/log/openhab2/openhab.log <==

2020-05-21 11:02:05.202 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-21 11:02:05.206 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":34,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-21 11:02:05.807 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,35,"on"], fullresponse: {"result":["on",false,35,"on"],"id":34}

Some time later:

2020-05-21 11:06:35.402 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-21 11:06:35.405 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":49,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-21 11:06:35.408 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":50,"method":"miIO.info","params":[]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 2)

2020-05-21 11:06:35.956 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,35,"on"], fullresponse: {"result":["on",false,35,"on"],"id":49}

2020-05-21 11:06:36.022 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: MIIO_INFO, result: {"life":12331529,"token":"5eab58907c5d08544ac0df7cf0137206","mac":"40:31:3C:D5:2C:50","fw_ver":"1.3.0_92","hw_ver":"ESP8266","uid":"1836772747","model":"chuangmi.plug.v3","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-50,"ssid":"schoofiwlan","bssid":"98:9B:CB:DA:3F:84"},"netif":{"localIp":"192.168.2.166","mask":"255.255.255.0","gw":"192.168.2.1"},"mmfree":9912}, fullresponse: {"result":{"life":12331529,"token":"5eab58907c5d08544ac0df7cf0137206","mac":"40:31:3C:D5:2C:50","fw_ver":"1.3.0_92","hw_ver":"ESP8266","uid":"1836772747","model":"chuangmi.plug.v3","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-50,"ssid":"schoofiwlan","bssid":"98:9B:CB:DA:3F:84"},"netif":{"localIp":"192.168.2.166","mask":"255.255.255.0","gw":"192.168.2.1"},"mmfree":9912},"id":50}
lsiepel commented 4 years ago

Some fixes where merged in 2.5.5, please upgrade just to be sure this isn't allready fixed. It does somehow look similar to: https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/1518

Stefan300381 commented 4 years ago

thanks, updated to 2.5.5 and didn't check physically at the device, but in the openhab log the device cotinues to turn OFF immediately after I turned it ON:

unfortunately my miio vaccumer is also listed in the full logs which you can find below. to me it seems like the important part is here:

2020-05-26 09:18:28.702 [ome.event.ItemCommandEvent] - Item 'MiPlug_v3_01_USB' received command ON

2020-05-26 09:18:28.733 [nt.ItemStatePredictedEvent] - MiPlug_v3_01_USB predicted to become ON

2020-05-26 09:18:28.757 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-05-26 09:18:28.770 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Locating action for channel 'usb': 'ON'

2020-05-26 09:18:28.774 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Command not send. Value null

2020-05-26 09:18:28.778 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-26 09:18:28.782 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4093,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-26 09:18:28.924 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,36,"on"], fullresponse: {"result":["on",false,36,"on"],"id":4093}

==> /var/log/openhab2/events.log <==

2020-05-26 09:18:28.934 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from ON to OFF

FULL LOG:

2020-05-26 09:18:23.774 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-26 09:18:23.780 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4092,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-26 09:18:23.894 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,36,"on"], fullresponse: {"result":["on",false,36,"on"],"id":4092}

2020-05-26 09:18:28.561 [DEBUG] [o.internal.handler.MiIoVacuumHandler] - Periodic update for 'miio:vacuum:0704CB39' (miio:vacuum)

2020-05-26 09:18:28.564 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12269,"method":"get_dnd_timer","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 1)

2020-05-26 09:18:28.568 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12270,"method":"get_clean_summary","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 2)

2020-05-26 09:18:28.571 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12271,"method":"get_status","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 3)

2020-05-26 09:18:28.575 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12272,"method":"get_consumable","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 4)

2020-05-26 09:18:28.590 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: DND_GET, result: [{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}], fullresponse: {"result":[{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}],"id":12269}

2020-05-26 09:18:28.611 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CLEAN_SUMMARY_GET, result: [287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]], fullresponse: {"result":[287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]],"id":12270}

2020-05-26 09:18:28.629 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: GET_STATUS, result: [{"msg_ver":3,"msg_seq":1805,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}], fullresponse: {"result":[{"msg_ver":3,"msg_seq":1805,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}],"id":12271}

2020-05-26 09:18:28.656 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CONSUMABLES_GET, result: [{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}], fullresponse: {"result":[{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}],"id":12272}

==> /var/log/openhab2/events.log <==

2020-05-26 09:18:28.702 [ome.event.ItemCommandEvent] - Item 'MiPlug_v3_01_USB' received command ON

2020-05-26 09:18:28.733 [nt.ItemStatePredictedEvent] - MiPlug_v3_01_USB predicted to become ON

2020-05-26 09:18:28.757 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from OFF to ON

==> /var/log/openhab2/openhab.log <==

2020-05-26 09:18:28.770 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Locating action for channel 'usb': 'ON'

2020-05-26 09:18:28.774 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Command not send. Value null

2020-05-26 09:18:28.778 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-26 09:18:28.782 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4093,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-26 09:18:28.924 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,36,"on"], fullresponse: {"result":["on",false,36,"on"],"id":4093}

==> /var/log/openhab2/events.log <==

2020-05-26 09:18:28.934 [vent.ItemStateChangedEvent] - MiPlug_v3_01_USB changed from ON to OFF

==> /var/log/openhab2/openhab.log <==

2020-05-26 09:18:46.010 [DEBUG] [o.internal.handler.MiIoVacuumHandler] - Periodic update for 'miio:generic:0704CB39' (miio:vacuum)

2020-05-26 09:18:46.014 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12249,"method":"get_dnd_timer","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 1)

2020-05-26 09:18:46.018 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12250,"method":"get_clean_summary","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 2)

2020-05-26 09:18:46.022 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12251,"method":"get_status","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 3)

2020-05-26 09:18:46.026 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12252,"method":"miIO.info","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 4)

2020-05-26 09:18:46.029 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12253,"method":"get_consumable","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 5)

2020-05-26 09:18:46.051 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: DND_GET, result: [{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}], fullresponse: {"result":[{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}],"id":12249}

2020-05-26 09:18:46.068 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CLEAN_SUMMARY_GET, result: [287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]], fullresponse: {"result":[287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]],"id":12250}

2020-05-26 09:18:46.082 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: GET_STATUS, result: [{"msg_ver":3,"msg_seq":1806,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}], fullresponse: {"result":[{"msg_ver":3,"msg_seq":1806,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}],"id":12251}

2020-05-26 09:18:46.098 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: MIIO_INFO, result: {"hw_ver":"Linux","fw_ver":"3.5.7_002008","ap":{"ssid":"schoofiwlan","bssid":"98:9B:CB:D5:87:1F","rssi":-43},"netif":{"localIp":"192.168.2.181","mask":"255.255.255.0","gw":"192.168.2.1\n127.0.0.1"},"model":"roborock.vacuum.s5","mac":"40:31:3C:A7:73:BE","token":"735a6e48394571395662346530776f55","life":21311}, fullresponse: {"partner_id":"","id":12252,"code":0,"message":"ok","result":{"hw_ver":"Linux","fw_ver":"3.5.7_002008","ap":{"ssid":"schoofiwlan","bssid":"98:9B:CB:D5:87:1F","rssi":-43},"netif":{"localIp":"192.168.2.181","mask":"255.255.255.0","gw":"192.168.2.1\n127.0.0.1"},"model":"roborock.vacuum.s5","mac":"40:31:3C:A7:73:BE","token":"735a6e48394571395662346530776f55","life":21311}}

2020-05-26 09:18:46.113 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CONSUMABLES_GET, result: [{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}], fullresponse: {"result":[{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}],"id":12253}

2020-05-26 09:18:53.783 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-26 09:18:53.787 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4094,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-26 09:18:53.791 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4095,"method":"miIO.info","params":[]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 2)

2020-05-26 09:18:54.263 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,36,"on"], fullresponse: {"result":["on",false,36,"on"],"id":4094}

2020-05-26 09:18:54.328 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: MIIO_INFO, result: {"life":12757065,"token":"5eab58907c5d08544ac0df7cf0137206","mac":"40:31:3C:D5:2C:50","fw_ver":"1.3.0_92","hw_ver":"ESP8266","uid":"1836772747","model":"chuangmi.plug.v3","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-48,"ssid":"schoofiwlan","bssid":"98:9B:CB:DA:3F:84"},"netif":{"localIp":"192.168.2.166","mask":"255.255.255.0","gw":"192.168.2.1"},"mmfree":10032}, fullresponse: {"result":{"life":12757065,"token":"5eab58907c5d08544ac0df7cf0137206","mac":"40:31:3C:D5:2C:50","fw_ver":"1.3.0_92","hw_ver":"ESP8266","uid":"1836772747","model":"chuangmi.plug.v3","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-48,"ssid":"schoofiwlan","bssid":"98:9B:CB:DA:3F:84"},"netif":{"localIp":"192.168.2.166","mask":"255.255.255.0","gw":"192.168.2.1"},"mmfree":10032},"id":4095}

2020-05-26 09:18:58.579 [DEBUG] [o.internal.handler.MiIoVacuumHandler] - Periodic update for 'miio:vacuum:0704CB39' (miio:vacuum)

2020-05-26 09:18:58.582 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12273,"method":"get_dnd_timer","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 1)

2020-05-26 09:18:58.586 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12274,"method":"get_clean_summary","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 2)

2020-05-26 09:18:58.590 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12275,"method":"get_status","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 3)

2020-05-26 09:18:58.594 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12276,"method":"miIO.info","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 4)

2020-05-26 09:18:58.598 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12277,"method":"get_consumable","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 4)

2020-05-26 09:18:58.608 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: DND_GET, result: [{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}], fullresponse: {"result":[{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}],"id":12273}

2020-05-26 09:18:58.629 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CLEAN_SUMMARY_GET, result: [287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]], fullresponse: {"result":[287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]],"id":12274}

2020-05-26 09:18:58.646 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: GET_STATUS, result: [{"msg_ver":3,"msg_seq":1807,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}], fullresponse: {"result":[{"msg_ver":3,"msg_seq":1807,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}],"id":12275}

2020-05-26 09:18:58.672 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: MIIO_INFO, result: {"hw_ver":"Linux","fw_ver":"3.5.7_002008","ap":{"ssid":"schoofiwlan","bssid":"98:9B:CB:D5:87:1F","rssi":-43},"netif":{"localIp":"192.168.2.181","mask":"255.255.255.0","gw":"192.168.2.1\n127.0.0.1"},"model":"roborock.vacuum.s5","mac":"40:31:3C:A7:73:BE","token":"735a6e48394571395662346530776f55","life":21324}, fullresponse: {"partner_id":"","id":12276,"code":0,"message":"ok","result":{"hw_ver":"Linux","fw_ver":"3.5.7_002008","ap":{"ssid":"schoofiwlan","bssid":"98:9B:CB:D5:87:1F","rssi":-43},"netif":{"localIp":"192.168.2.181","mask":"255.255.255.0","gw":"192.168.2.1\n127.0.0.1"},"model":"roborock.vacuum.s5","mac":"40:31:3C:A7:73:BE","token":"735a6e48394571395662346530776f55","life":21324}}

2020-05-26 09:18:58.688 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CONSUMABLES_GET, result: [{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}], fullresponse: {"result":[{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}],"id":12277}

2020-05-26 09:19:16.033 [DEBUG] [o.internal.handler.MiIoVacuumHandler] - Periodic update for 'miio:generic:0704CB39' (miio:vacuum)

2020-05-26 09:19:16.037 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12254,"method":"get_dnd_timer","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 1)

2020-05-26 09:19:16.040 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12255,"method":"get_clean_summary","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 2)

2020-05-26 09:19:16.044 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12256,"method":"get_status","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 2)

2020-05-26 09:19:16.048 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":12257,"method":"get_consumable","params":[]} -> 192.168.2.181 (Device: 0704CB39 token: 735A6E48XXXXXXXXXXXXXXXX30776F55 Queue: 3)

2020-05-26 09:19:16.054 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: DND_GET, result: [{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}], fullresponse: {"result":[{"start_hour":22,"start_minute":0,"end_hour":8,"end_minute":0,"enabled":1}],"id":12254}

2020-05-26 09:19:16.071 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CLEAN_SUMMARY_GET, result: [287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]], fullresponse: {"result":[287470,5388957500,246,[1589223614,1589219748,1589014878,1588794588,1588596568,1588592801,1588591137,1588508225,1588507959,1588504920,1588503812,1588503766,1588495032,1588495019,1588412169,1587808141,1587808115,1587808086,1587808057,1587807979]],"id":12255}

2020-05-26 09:19:16.085 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: GET_STATUS, result: [{"msg_ver":3,"msg_seq":1809,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}], fullresponse: {"result":[{"msg_ver":3,"msg_seq":1809,"state":8,"battery":100,"clean_time":2780,"clean_area":32227500,"error_code":0,"map_present":1,"in_cleaning":0,"in_returning":0,"in_fresh_state":1,"lab_status":1,"water_box_status":0,"fan_power":102,"dnd_enabled":0,"map_status":3,"lock_status":0}],"id":12256}

2020-05-26 09:19:16.100 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0704CB39 type: CONSUMABLES_GET, result: [{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}], fullresponse: {"result":[{"main_brush_work_time":287597,"side_brush_work_time":287597,"filter_work_time":54395,"filter_element_work_time":0,"sensor_dirty_time":172359}],"id":12257}

2020-05-26 09:19:23.794 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0723B6D1' (miio:basic)

2020-05-26 09:19:23.798 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":4096,"method":"get_prop","params":["power","usb_on","temperature","wifi_led"]} -> 192.168.2.166 (Device: 0723B6D1 token: 5EAB5890XXXXXXXXXXXXXXXXF0137206 Queue: 1)

2020-05-26 09:19:23.983 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0723B6D1 type: GET_PROPERTY, result: ["on",false,36,"on"], fullresponse: {"result":["on",false,36,"on"],"id":4096}
marcelrv commented 4 years ago

You could try to change the model to chuangmi.plug.v3fw Seems the plugv3 has some firmware dependent commands

Note the flipping back is because after the command is send, the binding tries to get the latest status from the device. Seemingly the command did not actually change the state, hence it flips back to the real usb power state which is (still) off

marcelrv commented 4 years ago

closed with #8668 and #8639 Default now is the one with new fw, readme updated with comment how to deal with the old fw