Hi,
I have smart plug from aliexpress, on and off work in Domoticz normally. I need to read conpsumtion, but without sucesss. I cant read data with get_dps.py. Tuya-cli print device ID and key, but get_dps end with error "invalid padding byte".
Any idea, how to fix this?
Edit:
I managed to get get_dps.py working. I'm probably getting the information right:
- get_dps.png (52.97 KiB) Viewed 1369 times
If I use Tinytuya scan, it says that the device version is v3.3.
- tinytuya.png (167.91 KiB) Viewed 1369 times
In tuya smart plugs settings I have this:
- domoticz_settings.png (337.79 KiB) Viewed 1369 times
Until then, everything would probably be fine. But of course I don't see any data (watt, volt...) in Domoticz. In the log I found an attempt to communicate with the plug, but there is no list of values like in get_dps:
2022-10-05 15:37:18.651 Domca_stolek: Pushing 'onMessageCallback' on to queue
2022-10-05 15:37:18.651 Domca_stolek: Acquiring GIL for 'ReadEvent'
2022-10-05 15:37:18.651 Domca_stolek: Processing 'ReadEvent' message
2022-10-05 15:37:18.651 Domca_stolek: Acquiring GIL for 'ReadEvent'
2022-10-05 15:37:18.651 Domca_stolek: Received 188 bytes of data
2022-10-05 15:37:18.651 Domca_stolek: 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 00 ac 00 00 00 00 ..Uʮ..........̮...
2022-10-05 15:37:18.651 Domca_stolek: 6b e8 f3 9c 3a 43 66 cc 62 77 aa 1a dc 20 59 c4 d5 6b d8 73 k賜:Cf̢wʮܮYĕkس
2022-10-05 15:37:18.651 Domca_stolek: ac 4e 3d c2 5c 50 5f 43 8e ce 6e 24 a9 5c ea 77 d3 38 69 47 ̎=P_CΎn$ɜ귓8iG
2022-10-05 15:37:18.651 Domca_stolek: e5 92 f4 67 08 cd fe 5e e5 57 11 e8 fb 8e 5a c4 ad 29 1e df 咴g.;^嗮軎Zĭ).�
2022-10-05 15:37:18.651 Domca_stolek: 4d 5b 67 f6 88 f2 4b 2e fe 69 28 9f 90 13 ad 50 92 8c 9a d9 M[g.�i(ߐ.͐Ҍڙ
2022-10-05 15:37:18.651 Domca_stolek: 6e 48 da 06 c0 60 1a 96 9b f5 0b 69 de 29 74 a2 bb e3 fa 8a nHڮ�.֛)t»㺊
2022-10-05 15:37:18.652 Domca_stolek: 89 47 d3 65 fc 7d 17 df 56 c0 05 36 1a 79 59 da 25 72 45 c3 ɇӥ�}.ߖ�6.yYڥrE�
2022-10-05 15:37:18.652 Domca_stolek: ba 99 49 0b a2 03 05 ce ab 24 02 3f ab 9a 79 dc 37 72 2e 75 ڙI.®.Ϋ$.?˚yܷr.u
2022-10-05 15:37:18.652 Domca_stolek: 0a b9 99 52 91 1b f8 6f 5f 63 4f ed 33 30 67 f9 9b 67 2c ef .ٙRѮ�o_cO�g�ۧ,�
2022-10-05 15:37:18.652 Domca_stolek: e2 c5 6d 01 00 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. Ⅽ...ʕ
2022-10-05 15:37:18.652 Domca_stolek: Pushing 'onMessageCallback' on to queue
2022-10-05 15:37:18.652 Domca_stolek: Acquiring GIL for 'ReadEvent'
2022-10-05 15:37:18.652 Domca_stolek: Processing 'onMessageCallback' message
2022-10-05 15:37:18.652 Domca_stolek: Acquiring GIL for 'onMessageCallback'
2022-10-05 15:37:18.652 Domca_stolek: Calling message handler 'onMessage' on 'module' type object.
2022-10-05 15:37:18.652 Domca_stolek: onMessage called: 192.168.1.210:6668 b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\xac\x00\x00\x00\x00k\xe8\xf3\x9c:Cf\xccbw\xaa\x1a\xdc Y\xc4\xd5k\xd8s\xacN=\xc2\\P_C\x8e\xcen$\xa9\\\xeaw\xd38iG\xe5\x92\xf4g\x08\xcd\xfe^\xe5W\x11\xe8\xfb\x8eZ\xc4\xad)\x1e\xdfM[g\xf6\x88\xf2K.\xfei(\x9f\x90\x13\xadP\x92\x8c\x9a\xd9nH\xda\x06\xc0`\x1a\x96\x9b\xf5\x0bi\xde)t\xa2\xbb\xe3\xfa\x8a\x89G\xd3e\xfc}\x17\xdfV\xc0\x056\x1ayY\xda%rE\xc3\xba\x99I\x0b\xa2\x03\x05\xce\xab$\x02?\xab\x9ay\xdc7r.u\n\xb9\x99R\x91\x1b\xf8o_cO\xed30g\xf9\x9bg,\xef\xe2\xc5m\x01\x00\x00\xaaU'
2022-10-05 15:37:18.655 Domca_stolek: Pushing 'WriteDirective' on to queue
2022-10-05 15:37:18.655 Domca_stolek: Acquiring GIL for 'onMessageCallback'
2022-10-05 15:37:18.655 Domca_stolek: Processing 'onMessageCallback' message
2022-10-05 15:37:18.655 Domca_stolek: Acquiring GIL for 'onMessageCallback'
2022-10-05 15:37:18.655 Domca_stolek: Calling message handler 'onMessage' on 'module' type object.
2022-10-05 15:37:18.655 Domca_stolek: onMessage called: 192.168.1.210:6668 b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\xac\x00\x00\x00\x00k\xe8\xf3\x9c:Cf\xccbw\xaa\x1a\xdc Y\xc4\xd5k\xd8s\xacN=\xc2\\P_C\x8e\xcen$\xa9\\\xeaw\xd38iG\xe5\x92\xf4g\x08\xcd\xfe^\xe5W\x11\xe8\xfb\x8eZ\xc4\xad)\x1e\xdfM[g\xf6\x88\xf2K.\xfei(\x9f\x90\x13\xadP\x92\x8c\x9a\xd9nH\xda\x06\xc0`\x1a\x96\x9b\xf5\x0bi\xde)t\xa2\xbb\xe3\xfa\x8a\x89G\xd3e\xfc}\x17\xdfV\xc0\x056\x1ayY\xda%rE\xc3\xba\x99I\x0b\xa2\x03\x05\xce\xab$\x02?\xab\x9ay\xdc7r.u\n\xb9\x99R\x91\x1b\xf8o_cO\xed30g\xf9\x9bg,\xef\xe2\xc5m\x01\x00\x00\xaaU'
2022-10-05 15:37:18.656 Domca_stolek: Pushing 'WriteDirective' on to queue
2022-10-05 15:37:18.656 Domca_stolek: Acquiring GIL for 'onMessageCallback'
2022-10-05 15:37:18.656 Domca_stolek: Processing 'WriteDirective' message
2022-10-05 15:37:18.656 Domca_stolek: Acquiring GIL for 'WriteDirective'
2022-10-05 15:37:18.656 Domca_stolek: Sending 104 bytes of data
2022-10-05 15:37:18.656 Domca_stolek: 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 00 58 64 23 91 b1 ..Uʮ..........Xd#ѱ
2022-10-05 15:37:18.656 Domca_stolek: b5 2d d4 18 47 bb c6 89 6a 71 b5 f1 cb 01 67 ca 78 1b cc f2 խԮGۆɪqձˮgʸ.̲
2022-10-05 15:37:18.656 Domca_stolek: 2c df 95 0f eb 38 1f ca 7a c1 eb cb bc 8f 19 ce 55 11 a9 78 ,ߕ.븮ʺ�˼ϮΕ.ɸ
2022-10-05 15:37:18.656 Domca_stolek: 66 17 54 0d 8b 80 69 01 e6 17 23 62 e4 9f 02 ac 29 df 0f 42 f.T.ˀi.殣b䟮̩߮B
2022-10-05 15:37:18.656 Domca_stolek: c8 2b 2b 3f 17 f9 9f c3 b0 68 41 c8 a8 68 75 32 1e 20 0c 28 ȫ+?.�߃ШAȨhu2...(
2022-10-05 15:37:18.656 Domca_stolek: 00 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..ʕ
2022-10-05 15:37:18.656 Domca_stolek: Acquiring GIL for 'WriteDirective'
2022-10-05 15:37:18.656 Domca_stolek: Processing 'WriteDirective' message
2022-10-05 15:37:18.656 Domca_stolek: Acquiring GIL for 'WriteDirective'
2022-10-05 15:37:18.656 Domca_stolek: Sending 104 bytes of data
2022-10-05 15:37:18.656 Domca_stolek: 00 00 55 aa 00 00 00 00 00 00 00 0a 00 00 00 58 64 23 91 b1 ..Uʮ..........Xd#ѱ
2022-10-05 15:37:18.656 Domca_stolek: b5 2d d4 18 47 bb c6 89 6a 71 b5 f1 cb 01 67 ca 78 1b cc f2 խԮGۆɪqձˮgʸ.̲
2022-10-05 15:37:18.656 Domca_stolek: 2c df 95 0f eb 38 1f ca 7a c1 eb cb bc 8f 19 ce 55 11 a9 78 ,ߕ.븮ʺ�˼ϮΕ.ɸ
2022-10-05 15:37:18.656 Domca_stolek: 66 17 54 0d 8b 80 69 01 e6 17 23 62 e4 9f 02 ac 29 df 0f 42 f.T.ˀi.殣b䟮̩߮B
2022-10-05 15:37:18.656 Domca_stolek: c8 2b 2b 3f 17 f9 9f c3 b0 68 41 c8 a8 68 75 32 1e 20 0c 28 ȫ+?.�߃ШAȨhu2...(
2022-10-05 15:37:18.656 Domca_stolek: 00 00 aa 55 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..ʕ
2022-10-05 15:37:18.656 Domca_stolek: Acquiring GIL for 'WriteDirective'
2022-10-05 15:37:18.664 Domca_stolek: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2022-10-05 15:37:18.664 Domca_stolek: Pushing 'ReadEvent' on to queue
2022-10-05 15:37:18.675 Domca_stolek: Acquiring GIL for 'CPluginTransportTCP::handleRead'
What am I doing wrong?
Try to kick me.