Hi @postlund,
thank you for all the time you give me.
I copied the code and this time it went ahead and I could choose the “switch” type, but I couldn’t enter the ID even manually.
This is the reported error:
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command heartbeat (device type: type_0a)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{}’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number -100
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command status (device type: type_0a)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{“gwId”:“MyID”,“devId”:“MyID”}’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number 1
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Got heartbeat response
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decrypted payload: {}
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Dispatching sequence number 1
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’\xxx…xxx…xxx’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] switching to dev_type type_0d
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Re-send status due to device type change (type_0a -> type_0d)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command status (device type: type_0d)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{“devId”:“MyID”,“uid”:“MyID”,“t”:“1xxx3”,“dps”:{“1”:null,“2”:null,“3”:null,“4”:null,“5”:null,“6”:null,“7”:null,“8”:null,“9”:null,“10”:null}}’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number 2
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Dispatching sequence number 2
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decrypted payload: {}
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command status (device type: type_0d)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{“devId”:“MyID”,“uid”:“MyID”,“t”:“1xxx3”,“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-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number 3
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Dispatching sequence number 3
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decrypted payload: {}
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command status (device type: type_0d)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{“devId”:“MyID”,“uid”:“MyID”,“t”:“1xxx3”,“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-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number 4
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Dispatching sequence number 4
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decrypted payload: {}
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Sending command status (device type: type_0d)
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Paylod: b’{“devId”:“MyID”,“uid”:“MyID”,“t”:“1xxx3”,“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-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Waiting for sequence number 5
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Got status update
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Got status update
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Dispatching sequence number 5
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Got status update
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decode payload: b’’
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] Decrypted payload: {}
2020-10-07 00:30:03 DEBUG (MainThread) [custom_components.localtuya.pytuya] [MyID] detected dps: {}
My switch: