Mmmm, I seem to have problems too with config flow now in this PR, however YAML config seems to work. Can you try with YAML?
with this config
- host: 192.168.1.64
device_id: 42787240807d3a0103b8
local_key: key
friendly_name: curtains_bruno
protocol_version: "3.3"
entities:
- platform: cover
friendly_name: curtains_bruno
id: 102
open_close_cmds: fz_zz
positioning_mode: position
currpos_dps: 101
setpos_dps: 101
span_time: 25
i get this error
Invalid config for [localtuya]: extra keys not allowed @ data['localtuya'][4]['entities'][0]['currpos_dps']. Got 101
extra keys not allowed @ data['localtuya'][4]['entities'][0]['open_close_cmds']. Got 'fz_zz'
extra keys not allowed @ data['localtuya'][4]['entities'][0]['positioning_mode']. Got 'position'
extra keys not allowed @ data['localtuya'][4]['entities'][0]['setpos_dps']. Got 101
extra keys not allowed @ data['localtuya'][4]['entities'][0]['span_time']. Got 25
value is not allowed for dictionary value @ data['localtuya'][4]['entities'][0]['platform']. Got 'cover'. (See /config/configuration.yaml, line 98).
@juan11perez My fault, the sample YAML is outdated: you should use current_position_dp
and set_position_dp
instead of currpos_dps
and setpos_dps
. Try with this and let us know.
@postlund, Iâll need your help because in this PR it is not fetching the DPs data in the config flow, and I canât figure out why, need also to check in masterâŠ
You mean in #81? Check master first and see if it works there. Maybe Asyncio migration broke something.
Yes, confirmed that #62 broke the DPs list fetching, issue visible in master too.
Edit: logs:
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Started heartbeat loop
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command heartbeat (device type: type_0a)
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{}'
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number -100
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Got heartbeat response
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command status (device type: type_0a)
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{"gwId":"bf89d2c3ba66cb83288njv","devId":"bf89d2c3ba66cb83288njv"}'
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number 1
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b''
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decrypted payload: {}
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Dispatching sequence number 1
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b'j\x16-\x11~\xdbs-B\xa8\x9er\xbc\xaf\x0c\xb5i\xa6M\xc3*\xfa\x87\xfa"\xedn\xaf\xc85\x05\x92'
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] switching to dev_type type_0d
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Re-send status due to device type change (type_0a -> type_0d)
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command status (device type: type_0d)
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{"devId":"bf89d2c3ba66cb83288njv","uid":"bf89d2c3ba66cb83288njv","t":"1602688483","dps":{"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"7":null,"8":null,"9":null,"10":null}}'
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number 2
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Got status update
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Dispatching sequence number 2
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b''
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decrypted payload: {}
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command status (device type: type_0d)
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{"devId":"bf89d2c3ba66cb83288njv","uid":"bf89d2c3ba66cb83288njv","t":"1602688483","dps":{"1":null,"11":null,"12":null,"13":null,"14":null,"15":null,"16":null,"17":null,"18":null,"19":null,"20":null}}'
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number 3
2020-10-14 17:14:43 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Got status update
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Dispatching sequence number 3
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b''
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decrypted payload: {}
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command status (device type: type_0d)
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{"devId":"bf89d2c3ba66cb83288njv","uid":"bf89d2c3ba66cb83288njv","t":"1602688484","dps":{"1":null,"21":null,"22":null,"23":null,"24":null,"25":null,"26":null,"27":null,"28":null,"29":null,"30":null}}'
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number 4
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Got status update
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Dispatching sequence number 4
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b''
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decrypted payload: {}
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Sending command status (device type: type_0d)
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Paylod: b'{"devId":"bf89d2c3ba66cb83288njv","uid":"bf89d2c3ba66cb83288njv","t":"1602688484","dps":{"1":null,"100":null,"101":null,"102":null,"103":null,"104":null,"105":null,"106":null,"107":null,"108":null,"109":null,"110":null}}'
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Waiting for sequence number 5
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Got status update
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Dispatching sequence number 5
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decode payload: b''
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Decrypted payload: {}
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] detected dps: {}
2020-10-14 17:14:44 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf89d2c3ba66cb83288njv] Closing connection
ok,
I changed the yaml per your advice and it was accepted.
however, it still reports unavailable
the slider bar works, but the position is broken.
basically it moves with the slider, but the slider then moves to zero
This is becoming a hell⊠can you enable debugging and post some logs?
Hmm, really strange. Just tested master with my devices and it works fine. Nothing strange at all. Which commit did you test (sha-id)?
Does tuyadebug prior to the asyncio merge work?
The current master Iâd say⊠I believe it has to do with 0d devices. Tomorrow I can give more feedback, going to bed nowâŠ
Hi @postlund,
I tried the version https://github.com/rospogrigio/localtuya-homeassistant/tree/light_range (postlund Fix review comments 22b3588), but cannot turn the bulb on and off and cannot control the brightness.
When you try to turn on the light bulb, the button automatically returns to off after 2 seconds.
I bring you the log, but there is no particular error for the light bulb I tried to light. The same data in the log is present for all bulbs.
However, I report the log concerning the only bulb I tried
2020-10-14 23:58:10 DEBUG (MainThread) [custom_components.localtuya.common] Connecting to 192.168.1.131 (6xxxxxxxxxxxxxxxxxxd)
2020-10-14 23:58:10 DEBUG (MainThread) [custom_components.localtuya.common] Connecting to 192.168.1.131
2020-10-14 23:58:11 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Started heartbeat loop
2020-10-14 23:58:11 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Sending command heartbeat (device type: type_0a)
2020-10-14 23:58:11 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Paylod: bâ{}â
2020-10-14 23:58:11 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Waiting for sequence number -100
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Got heartbeat response
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Sending command status (device type: type_0a)
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Paylod: bâ{âgwIdâ:â6xxxxxxxxxxxxxxxxxxdâ,âdevIdâ:â6xxxxxxxxxxxxxxxxxxdâ}â
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Waiting for sequence number 1
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decode payload: bââ
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decrypted payload: {}
2020-10-14 23:58:12 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Dispatching sequence number 1
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Sending command heartbeat (device type: type_0a)
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Paylod: bâ{}â
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Waiting for sequence number -100
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Got heartbeat response
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decode payload: bââ
2020-10-14 23:58:32 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decrypted payload: {}
âŠ
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Sending command heartbeat (device type: type_0a)
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Paylod: bâ{}â
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Waiting for sequence number -100
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Got heartbeat response
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decode payload: bââ
2020-10-15 00:04:54 DEBUG (MainThread) [custom_components.localtuya.pytuya] [6xxxxxxxxxxxxxxxxxxd] Decrypted payload: {}
Hi Petr,
Thanks for that. I have followed the steps, installed the Android emulator, ran the Smart Life app, ensure I see all my devices in the smart life app in the emulator and everything was running fine. However, when I drill down to the shared-app folder and opened the xml file as per the video instruction⊠guess what, it was empty.
I think this could be because I have installed the latest version of the Smart Life App in the emulator which does not store devices info in the xml file anymore or something along the line.
I have also retried the tuya-cli approach with the Tuya cloud development platform, but still getting no joy.
I am about to give up getting the Local Tuya to work in HA for me. Whilst the Tuya integration in HA gives me the ability to switch the devices on and off, I canât get more information like the energy monitoring data from the plugs. So frustrating⊠and with this particular Arlec plug, I canât get it to flash with Tuya-convert.
Iâm starting to suspect that you have the same problem as @rospogrigio since you donât get anything in the response. You however seem to have a 0a device, which works fine for me. Not sure what is wrong right now.
Thank you.
To confirm you mean homeassistant debugging? like this?
custom_components.localtuya.pytuya: debug
Yes, exactly. I also add:
custom_components.localtuya: debug
ok this is open and close using the master branch with the modified code
2020-10-15 11:24:06 DEBUG (SyncWorker_15) [custom_components.localtuya.cover] Setting cover position: 100
2020-10-15 11:24:06 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] Sending command set (device type: type_0a)
2020-10-15 11:24:06 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] paylod=b'{"devId":"186822745002916f521b","uid":"186822745002916f521b","t":"1602746646","dps":{"101":100}}'
2020-10-15 11:24:06 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decode payload=b"3.3\x00\x00\x00\x00\x00\x00\x023\x00\x00\x00\x01\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8\xafF_\r\x9b;\xcf\xd6\xeb~'%}_p\xf3\x17\x984[?\x12\xbd\x98a\xee\xa5I\xa5,D\xc2\xc7\xe9%\x14*Z\xd4\xd96\x9es>`n\x857"
2020-10-15 11:24:06 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"102":"ZZ"},"t":1602746645}'
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_35) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf491025d0e05f3881lire","devId":"bf491025d0e05f3881lire"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf7f1048822137a241xsva","devId":"bf7f1048822137a241xsva"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bff18195435913278dtpnb","devId":"bff18195435913278dtpnb"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_35) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_35) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_35) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf9237dadb720259detsti","devId":"bf9237dadb720259detsti"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.pytuya] decode payload=b'U\xf8\x8e\xaf\x00\xfd\x04\xab\xa0\nN\x8b\xb9 U\xf8\xfbu\xabP>\x88\x83\xe5\xb7\x10wi\xcd?0%\xa7\xaf\xda\xc4\x8a\xae(6z\xd1\x07\xd3\xdb\xc9\x15\xecz\x0bw\x90\xc6A\x80\xa6&"\xec^}\xa1\t\xafP\xf6\xb2\x8b\x83>\x9c\xe5\xf3c\x8b\x97\x0cla\xa4'
2020-10-15 11:24:10 DEBUG (SyncWorker_48) [custom_components.localtuya.pytuya] decrypted result='{"devId":"42787240807d3a0103b8","dps":{"101":93,"102":"STOP","103":true}}'
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.pytuya] decode payload=b'\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8\xd9#1\xd4P\x8da#yd\xa35\x9d\x92\xdc,r\\\x03\x14\x0c\xe0\x1d\xe2\t\xf4>\x13\xf2\xdc\xb7\xa9\xc2}\xc0\x01r\x84=m\x1c\x97\xb5\x170e|B'
2020-10-15 11:24:10 DEBUG (SyncWorker_40) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"101":3,"102":"ZZ","103":true}}'
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decode payload=b'\x1a%!\x80\x80\x07\x7fb7dq\x81E\xa9\xabp\xe8\xd9\xaa\xea1\x81\xf5\xe7\x9dVF1\xfe\x85\xa3\xbd\xc4\xf9\xa1\xf4?F\xcde\xcd\xdb\x05\x85`\xe2\x06\xa2\xa9}\x18\x1b\xcfA\x05\x84\x1d\x08\x88\x0fS\xf6\x10\xf6\xa1\xd5\xd1?\xa2o\xed\xff\xae\xa2\x8b\xe0m\xaf3\xdd'
2020-10-15 11:24:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":true,"42":"","43":""}}'
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.pytuya] decode payload=b';\x81\xf6O\xa5\x1a\xbeu"\xe9\xcd\xb3\x01s@~D]tff:\xdb\xf3s\xa4\xd3\x1f\x83\xa1\xc0m\xf7Hy\xd3f\x03\xcf\x10\xc8\x93\xadJA\x9a\x9e\x97\xbd2\x83\xb3j\xed\xff\n\xd38\xaf8\xfe^\x14\x9f\x97\xfby\xaa\n\xac\xb9s\x9b\x0b\x15f\x81\'\xf7\xf1'
2020-10-15 11:24:10 DEBUG (SyncWorker_25) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] decode payload=b'X\x8f\nF\x16\x07\x12\xb7\x9bs\x9e\xbcQ\x87\x90\xf0\xc3M!\xb1\xc3\xf8\x94d\xb0\x8d\xf8\xffE\xec,\xc3\xba\xa2\xd8\xc8\x9a\x14TG\x7f\x1db\xbf\x9b\xcc>\xa2\xa5bzf\x08\xe1\xe8;\xd5\xd2\x94\x92\xed\xa9\x1b_\t\xe0\xc9SW\x17\xbb\x99;\xd3\x88b\xf1\xbaG]'
2020-10-15 11:24:10 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:12 DEBUG (SyncWorker_35) [custom_components.localtuya.pytuya] decode payload=b'\xc4CK\xb2\x83\xd5azC\xa1B\xa3\xf9\x13y\xfcS\x9f\x91\xe5qmB\rp\xc3\x98\xe7\x1e/\x16nT\xdca\x0c\xd5m<l\x8a\x96\x16\xf7"\xd8\xc9\x9e \xefK\xa4\r\xa0\xf5\x8at\x04#\xeb\xe9>\xf9U\x15\xbe0\xed\xd6z\xf2t\x80\x8f\xe6\x82\x04\xfe\x00E'
2020-10-15 11:24:12 DEBUG (SyncWorker_35) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:40 DEBUG (SyncWorker_9) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_15) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_43) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_9) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_9) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_9) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf491025d0e05f3881lire","devId":"bf491025d0e05f3881lire"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf7f1048822137a241xsva","devId":"bf7f1048822137a241xsva"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bff18195435913278dtpnb","devId":"bff18195435913278dtpnb"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_15) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf9237dadb720259detsti","devId":"bf9237dadb720259detsti"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_43) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:24:40 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:40 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:24:40 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] Failed to connect to 192.168.1.65. Raising Exception.
2020-10-15 11:24:40 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] Failed to connect to 192.168.1.64. Raising Exception.
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.pytuya] decode payload=b';\x81\xf6O\xa5\x1a\xbeu"\xe9\xcd\xb3\x01s@~D]tff:\xdb\xf3s\xa4\xd3\x1f\x83\xa1\xc0m\xf7Hy\xd3f\x03\xcf\x10\xc8\x93\xadJA\x9a\x9e\x97\xbd2\x83\xb3j\xed\xff\n\xd38\xaf8\xfe^\x14\x9f\x97\xfby\xaa\n\xac\xb9s\x9b\x0b\x15f\x81\'\xf7\xf1'
2020-10-15 11:24:40 DEBUG (SyncWorker_11) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.pytuya] decode payload=b'X\x8f\nF\x16\x07\x12\xb7\x9bs\x9e\xbcQ\x87\x90\xf0\xc3M!\xb1\xc3\xf8\x94d\xb0\x8d\xf8\xffE\xec,\xc3\xba\xa2\xd8\xc8\x9a\x14TG\x7f\x1db\xbf\x9b\xcc>\xa2\xa5bzf\x08\xe1\xe8;\xd5\xd2\x94\x92\xed\xa9\x1b_\t\xe0\xc9SW\x17\xbb\x99;\xd3\x88b\xf1\xbaG]'
2020-10-15 11:24:40 DEBUG (SyncWorker_58) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:41 DEBUG (SyncWorker_9) [custom_components.localtuya.pytuya] decode payload=b'\x1a%!\x80\x80\x07\x7fb7dq\x81E\xa9\xabp\xe8\xd9\xaa\xea1\x81\xf5\xe7\x9dVF1\xfe\x85\xa3\xbd\xc4\xf9\xa1\xf4?F\xcde\xcd\xdb\x05\x85`\xe2\x06\xa2\xa9}\x18\x1b\xcfA\x05\x84\x1d\x08\x88\x0fS\xf6\x10\xf6\xa1\xd5\xd1?\xa2o\xed\xff\xae\xa2\x8b\xe0m\xaf3\xdd'
2020-10-15 11:24:41 DEBUG (SyncWorker_9) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":true,"42":"","43":""}}'
2020-10-15 11:24:41 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decode payload=b'\xc4CK\xb2\x83\xd5azC\xa1B\xa3\xf9\x13y\xfcS\x9f\x91\xe5qmB\rp\xc3\x98\xe7\x1e/\x16nT\xdca\x0c\xd5m<l\x8a\x96\x16\xf7"\xd8\xc9\x9e \xefK\xa4\r\xa0\xf5\x8at\x04#\xeb\xe9>\xf9U\x15\xbe0\xed\xd6z\xf2t\x80\x8f\xe6\x82\x04\xfe\x00E'
2020-10-15 11:24:41 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:24:41 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:41 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:24:41 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:24:41 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:24:41 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decode payload=b'\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8{\x7fYj\\\x11\xf6\xb7\xe3\x92i6[\xda\xb0=\x0cs\xd2w*\x04\xdeK@\xe4\xe2\xc9H^\x1f5\xce\x12\x06\xcf\xed0\xc0\xb1\xb3\xb2\x80\xb9\x1fi@\xed'
2020-10-15 11:24:41 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"101":100,"102":"STOP","103":true}}'
2020-10-15 11:24:42 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] decode payload=b'U\xf8\x8e\xaf\x00\xfd\x04\xab\xa0\nN\x8b\xb9 U\xf8\xfbu\xabP>\x88\x83\xe5\xb7\x10wi\xcd?0%\xa7\xaf\xda\xc4\x8a\xae(6z\xd1\x07\xd3\xdb\xc9\x15\xecz\x0bw\x90\xc6A\x80\xa6&"\xec^}\xa1\t\xafP\xf6\xb2\x8b\x83>\x9c\xe5\xf3c\x8b\x97\x0cla\xa4'
2020-10-15 11:24:42 DEBUG (SyncWorker_43) [custom_components.localtuya.pytuya] decrypted result='{"devId":"42787240807d3a0103b8","dps":{"101":93,"102":"STOP","103":true}}'
2020-10-15 11:24:58 DEBUG (SyncWorker_1) [custom_components.localtuya.cover] Setting cover position: 1
2020-10-15 11:24:58 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] Sending command set (device type: type_0a)
2020-10-15 11:24:58 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] paylod=b'{"devId":"186822745002916f521b","uid":"186822745002916f521b","t":"1602746698","dps":{"101":1}}'
2020-10-15 11:24:58 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] decode payload=b'3.3\x00\x00\x00\x00\x00\x00\x026\x00\x00\x00\x01\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8\xce\xa9p\xcf\xf3\xdd=\xd6\xae!\xdf\x87\xd7\x8f\x0f\xe6b7xe\x12\xba\xba\x1cg\xc3\xe2\xe22\xc2\x1e\xde\xeb\xef\x1d\xf5\xf8.xf\xd8\xb6\x86\xb2\x96\xee\xa5\xda'
2020-10-15 11:24:58 DEBUG (SyncWorker_1) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"101":99},"t":1602746697}'
2020-10-15 11:25:10 DEBUG (SyncWorker_36) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_34) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_5) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_26) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_36) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_36) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_36) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf491025d0e05f3881lire","devId":"bf491025d0e05f3881lire"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_34) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_34) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_34) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bff18195435913278dtpnb","devId":"bff18195435913278dtpnb"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_23) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf7f1048822137a241xsva","devId":"bf7f1048822137a241xsva"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_5) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_5) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_5) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf9237dadb720259detsti","devId":"bf9237dadb720259detsti"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_26) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:10 DEBUG (SyncWorker_26) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:10 DEBUG (SyncWorker_26) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.pytuya] decode payload=b'\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8\xd9#1\xd4P\x8da#yd\xa35\x9d\x92\xdc,\xf8W\x99\xc0\xdb\x98\xbc\xbf|*\xe6\x1f\x85.\xafe\xa1i\xa5\xc6\x9e\x93\x17\xac\x84\x80.;,\x9c\x8e]'
2020-10-15 11:25:10 DEBUG (SyncWorker_2) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"101":3,"102":"STOP","103":true}}'
2020-10-15 11:25:11 DEBUG (SyncWorker_36) [custom_components.localtuya.pytuya] decode payload=b'\x1a%!\x80\x80\x07\x7fb7dq\x81E\xa9\xabp\xe8\xd9\xaa\xea1\x81\xf5\xe7\x9dVF1\xfe\x85\xa3\xbd\xc4\xf9\xa1\xf4?F\xcde\xcd\xdb\x05\x85`\xe2\x06\xa2\xa9}\x18\x1b\xcfA\x05\x84\x1d\x08\x88\x0fS\xf6\x10\xf6\xa1\xd5\xd1?\xa2o\xed\xff\xae\xa2\x8b\xe0m\xaf3\xdd'
2020-10-15 11:25:11 DEBUG (SyncWorker_36) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":true,"42":"","43":""}}'
2020-10-15 11:25:11 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decode payload=b';\x81\xf6O\xa5\x1a\xbeu"\xe9\xcd\xb3\x01s@~D]tff:\xdb\xf3s\xa4\xd3\x1f\x83\xa1\xc0m\xf7Hy\xd3f\x03\xcf\x10\xc8\x93\xadJA\x9a\x9e\x97\xbd2\x83\xb3j\xed\xff\n\xd38\xaf8\xfe^\x14\x9f\x97\xfby\xaa\n\xac\xb9s\x9b\x0b\x15f\x81\'\xf7\xf1'
2020-10-15 11:25:11 DEBUG (SyncWorker_23) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:11 DEBUG (SyncWorker_26) [custom_components.localtuya.pytuya] decode payload=b'U\xf8\x8e\xaf\x00\xfd\x04\xab\xa0\nN\x8b\xb9 U\xf8\xfbu\xabP>\x88\x83\xe5\xb7\x10wi\xcd?0%\xa7\xaf\xda\xc4\x8a\xae(6z\xd1\x07\xd3\xdb\xc9\x15\xecz\x0bw\x90\xc6A\x80\xa6&"\xec^}\xa1\t\xafP\xf6\xb2\x8b\x83>\x9c\xe5\xf3c\x8b\x97\x0cla\xa4'
2020-10-15 11:25:11 DEBUG (SyncWorker_26) [custom_components.localtuya.pytuya] decrypted result='{"devId":"42787240807d3a0103b8","dps":{"101":93,"102":"STOP","103":true}}'
2020-10-15 11:25:11 DEBUG (SyncWorker_34) [custom_components.localtuya.pytuya] decode payload=b'X\x8f\nF\x16\x07\x12\xb7\x9bs\x9e\xbcQ\x87\x90\xf0\xc3M!\xb1\xc3\xf8\x94d\xb0\x8d\xf8\xffE\xec,\xc3\xba\xa2\xd8\xc8\x9a\x14TG\x7f\x1db\xbf\x9b\xcc>\xa2\xa5bzf\x08\xe1\xe8;\xd5\xd2\x94\x92\xed\xa9\x1b_\t\xe0\xc9SW\x17\xbb\x99;\xd3\x88b\xf1\xbaG]'
2020-10-15 11:25:11 DEBUG (SyncWorker_34) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:12 DEBUG (SyncWorker_5) [custom_components.localtuya.pytuya] decode payload=b'\xc4CK\xb2\x83\xd5azC\xa1B\xa3\xf9\x13y\xfcS\x9f\x91\xe5qmB\rp\xc3\x98\xe7\x1e/\x16nT\xdca\x0c\xd5m<l\x8a\x96\x16\xf7"\xd8\xc9\x9e \xefK\xa4\r\xa0\xf5\x8at\x04#\xeb\xe9>\xf9U\x15\xbe0\xed\xd6z\xf2t\x80\x8f\xe6\x82\x04\xfe\x00E'
2020-10-15 11:25:12 DEBUG (SyncWorker_5) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:40 DEBUG (SyncWorker_8) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_15) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_31) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_37) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_24) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_22) [custom_components.localtuya.common] running def status(self) from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_8) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_8) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_8) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf491025d0e05f3881lire","devId":"bf491025d0e05f3881lire"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_15) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf7f1048822137a241xsva","devId":"bf7f1048822137a241xsva"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_31) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_31) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_31) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bff18195435913278dtpnb","devId":"bff18195435913278dtpnb"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_37) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_37) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_37) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"bf9237dadb720259detsti","devId":"bf9237dadb720259detsti"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_22) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_24) [custom_components.localtuya.common] running def __get_status from TuyaDevice
2020-10-15 11:25:40 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:40 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:25:40 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] Failed to connect to 192.168.1.65. Raising Exception.
2020-10-15 11:25:41 DEBUG (SyncWorker_8) [custom_components.localtuya.pytuya] decode payload=b'\x1a%!\x80\x80\x07\x7fb7dq\x81E\xa9\xabp\xe8\xd9\xaa\xea1\x81\xf5\xe7\x9dVF1\xfe\x85\xa3\xbd\xc4\xf9\xa1\xf4?F\xcde\xcd\xdb\x05\x85`\xe2\x06\xa2\xa9}\x18\x1b\xcfA\x05\x84\x1d\x08\x88\x0fS\xf6\x10\xf6\xa1\xd5\xd1?\xa2o\xed\xff\xae\xa2\x8b\xe0m\xaf3\xdd'
2020-10-15 11:25:41 DEBUG (SyncWorker_8) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":true,"42":"","43":""}}'
2020-10-15 11:25:41 DEBUG (SyncWorker_31) [custom_components.localtuya.pytuya] decode payload=b'X\x8f\nF\x16\x07\x12\xb7\x9bs\x9e\xbcQ\x87\x90\xf0\xc3M!\xb1\xc3\xf8\x94d\xb0\x8d\xf8\xffE\xec,\xc3\xba\xa2\xd8\xc8\x9a\x14TG\x7f\x1db\xbf\x9b\xcc>\xa2\xa5bzf\x08\xe1\xe8;\xd5\xd2\x94\x92\xed\xa9\x1b_\t\xe0\xc9SW\x17\xbb\x99;\xd3\x88b\xf1\xbaG]'
2020-10-15 11:25:41 DEBUG (SyncWorker_31) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:41 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decode payload=b';\x81\xf6O\xa5\x1a\xbeu"\xe9\xcd\xb3\x01s@~D]tff:\xdb\xf3s\xa4\xd3\x1f\x83\xa1\xc0m\xf7Hy\xd3f\x03\xcf\x10\xc8\x93\xadJA\x9a\x9e\x97\xbd2\x83\xb3j\xed\xff\n\xd38\xaf8\xfe^\x14\x9f\x97\xfby\xaa\n\xac\xb9s\x9b\x0b\x15f\x81\'\xf7\xf1'
2020-10-15 11:25:41 DEBUG (SyncWorker_15) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":false,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:41 DEBUG (SyncWorker_37) [custom_components.localtuya.pytuya] decode payload=b'\xc4CK\xb2\x83\xd5azC\xa1B\xa3\xf9\x13y\xfcS\x9f\x91\xe5qmB\rp\xc3\x98\xe7\x1e/\x16nT\xdca\x0c\xd5m<l\x8a\x96\x16\xf7"\xd8\xc9\x9e \xefK\xa4\r\xa0\xf5\x8at\x04#\xeb\xe9>\xf9U\x15\xbe0\xed\xd6z\xf2t\x80\x8f\xe6\x82\x04\xfe\x00E'
2020-10-15 11:25:41 DEBUG (SyncWorker_37) [custom_components.localtuya.pytuya] decrypted result='{"dps":{"1":true,"9":0,"39":"0","40":"relay","41":false,"42":"","43":""}}'
2020-10-15 11:25:41 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] Failed to connect to 192.168.1.64. Raising Exception.
2020-10-15 11:25:41 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:41 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"186822745002916f521b","devId":"186822745002916f521b"}'
2020-10-15 11:25:41 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] decode payload=b'\xda\xc4S!H\xaa\xed\x96\xa2&\xf0c?U\xa3\x9a\x12\x8f\xa5*\t\xd7\xf7\x8f\xef\xb0\x01l\xa4\x88\xcc\xf8\xd9#1\xd4P\x8da#yd\xa35\x9d\x92\xdc,\xf8W\x99\xc0\xdb\x98\xbc\xbf|*\xe6\x1f\x85.\xafe\xa1i\xa5\xc6\x9e\x93\x17\xac\x84\x80.;,\x9c\x8e]'
2020-10-15 11:25:41 DEBUG (SyncWorker_22) [custom_components.localtuya.pytuya] decrypted result='{"devId":"186822745002916f521b","dps":{"101":3,"102":"STOP","103":true}}'
2020-10-15 11:25:42 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] Sending command status (device type: type_0a)
2020-10-15 11:25:42 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] paylod=b'{"gwId":"42787240807d3a0103b8","devId":"42787240807d3a0103b8"}'
2020-10-15 11:25:42 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] decode payload=b'U\xf8\x8e\xaf\x00\xfd\x04\xab\xa0\nN\x8b\xb9 U\xf8\xfbu\xabP>\x88\x83\xe5\xb7\x10wi\xcd?0%\xa7\xaf\xda\xc4\x8a\xae(6z\xd1\x07\xd3\xdb\xc9\x15\xecz\x0bw\x90\xc6A\x80\xa6&"\xec^}\xa1\t\xafP\xf6\xb2\x8b\x83>\x9c\xe5\xf3c\x8b\x97\x0cla\xa4'
2020-10-15 11:25:42 DEBUG (SyncWorker_24) [custom_components.localtuya.pytuya] decrypted result='{"devId":"42787240807d3a0103b8","dps":{"101":93,"102":"STOP","103":true}}'
Hi @postlund,
small consideration.
I currently use the asyncio system and both switches and bulbs work (I only have the brightness problem on the bulbs).
I had tried the previous version of the current âRe-map light brightness rangeâ and you were able to solve the brightness problem.
Now we need to understand how to make the two systems coexist, but itâs not a problem with light bulbs.
I donât know if it would be useful to know that the two systems work separately for me
And what are you seeing in this condition? The devices look available and responding⊠are you encountering issues?
Also, you should remove the other switches from the configuration while we are debugging since they are adding logs which are confusing since they are all mixed and we canât focus on the interesting ones, thank youâŠ
ok so using the initial componenent from the branch after manually changing the up/down/stop command the cover was working correctly. i.e. arrow down = close, arrow up=open and stop=stop
the slider was also moving in line with the command.
the only problem was that the {{states.cover.curtains.state}} remained open and the icon open. it was the only issue.
you then provided the upper_case branch. I downloaded installed and configured the cover with the fz_zz option in configflow.
the cover showed unavailable state. I was able to move with the slider and the cove would move but then the slider returned to zero and position was lost.
So i just modified your new cover.py like this: (basically the way the commands were working leaving your async change and it now works as with the master branch modified.
i.e. arrows work, slider works, position % works, but {{states.cover.curtains.state}} remains open and the icon open
async def async_open_cover(self, **kwargs):
"""Open the cover."""
_LOGGER.debug("Launching command %s to cover ", "FZ")
await self._device.set_dps("FZ", self._dps_id)
async def async_close_cover(self, **kwargs):
"""Close cover."""
_LOGGER.debug("Launching command %s to cover ", "ZZ")
await self._device.set_dps("ZZ", self._dps_id)
async def async_stop_cover(self, **kwargs):
"""Stop the cover."""
_LOGGER.debug("Launching command %s to cover ", COVER_STOP_CMD)
await self._device.set_dps(COVER_STOP_CMD.upper(), self._dps_id)
def status_updated(self):
"""Device status was updated."""
self._state = self.dps(self._dps_id)
if self.has_config(CONF_CURRENT_POSITION_DP):
self._current_cover_position = self.dps(
self._config[CONF_CURRENT_POSITION_DP]
)
else:
self._current_cover_position = 50
@postlund I have been testing a lot of previous commits but it looks like the dps list has never worked with asyncio. Now, this is confusing me because I actually focused more on the status update and disconnections when testing this PR but I do seem to recall having tested also config flow here and then, so I donât know what to say.
A lot of commits generate a KeyError: 'dps'
in detect_available_dps
, but even after this was fixed, I canât get it to work.
Important: it works OK with my 0a devices, itâs my 0d devices that show this problem. You just get an empty response when querying the dps groups.
Let me know what I can do to help you debuggingâŠ