Tuya Generic Driver - With latest "Globe" Tuya Plug

@holand.ivar thanks for your driver. Means I can get away from the cloud all together.

Seeing that the driver was working fine with the few Globe Plug I had, I decided to purchase a bundle of 4 at Costco ( for 20$ nothing to loose :slight_smile: )

The new plug are running 3.3, but the payload seem to be bigger. The new plug will react to the command but will fail to report status with an error in the log. Forcing the status in the driver returns the current state.

Here are the plug that work :
image
Here are the plug that failed to report the status but work ( with the assotiate error).
image
[error]java.lang.IllegalArgumentException: Text must not be null or empty on line 133 (method parse)
image

DEBUG log from that device :

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.184[debug](http://192.168.1.20/logs#)Decryted message: {"dps":{"1":false,"9":0,"38":"memory","40":"relay","41":false,"42":"","43":"","44":""}}

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.181[debug](http://192.168.1.20/logs#)*********** Decrypting **************

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.178[debug](http://192.168.1.20/logs#)Assembled payload for decrypt: C0DF0EE616C2D464D92F90CF46044B985CF5EF0D2725CA6D37D7F9D0A0DA697C84515407C1DB3386C3749DFE093B70D036D10047B134F287482E88208BBA9C2E34A1174D82E1BDF2350F0E8A9B3923CD8D88632C4D3B01B8D09463AA0946CDE1

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.167[debug](http://192.168.1.20/logs#)End of message: 96

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.157[debug](http://192.168.1.20/logs#)Bytes incoming: 124

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.156[debug](http://192.168.1.20/logs#)Encrypted message detected

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.153[debug](http://192.168.1.20/logs#)Raw incoming data: �����d�/��FK�\��
'%�m7��Р�i|�QTa��3��t�� ;p�6�G�4�H.� ���.4�M���5��9#͍�c,M;�Дc� F��x�a:�U

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.118[debug](http://192.168.1.20/logs#)000055AA000000000000000A0000006C00000000C0DF0EE616C2D464D92F90CF46044B985CF5EF0D2725CA6D37D7F9D0A0DA697C84515407C1DB3386C3749DFE093B70D036D10047B134F287482E88208BBA9C2E34A1174D82E1BDF2350F0E8A9B3923CD8D88632C4D3B01B8D09463AA0946CDE178CD613A0000AA55

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.117[debug](http://192.168.1.20/logs#)Receiving message from device

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.542[debug](http://192.168.1.20/logs#)Sending message to 192.168.1.151:6668 msg: 000055AA000000000000000A00000088AE1B60272745F6B6DB63949A1CEA12880B58479AA9913016B8F290E1C5C2443C014396C2CC07E20B799E46BAAD19B17A0B58479AA9913016B8F290E1C5C2443C505B7845FBE7AB5F42B12E89B81635A880CC9F55CF8FA6AE1B5A2607B2084AE8D5FDDC69716B9027171A0F0FF9437131A1097C745D746D462F6A1A44DC32B3055BF9391A0000AA55

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.540[debug](http://192.168.1.20/logs#)HEX crc: 5bf9391a : 4

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.538[debug](http://192.168.1.20/logs#)152

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.358[debug](http://192.168.1.20/logs#)Prefix: 000055AA00000000000000

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.356[debug](http://192.168.1.20/logs#)136

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.350[debug](http://192.168.1.20/logs#)AE1B60272745F6B6DB63949A1CEA12880B58479AA9913016B8F290E1C5C2443C014396C2CC07E20B799E46BAAD19B17A0B58479AA9913016B8F290E1C5C2443C505B7845FBE7AB5F42B12E89B81635A880CC9F55CF8FA6AE1B5A2607B2084AE8D5FDDC69716B9027171A0F0FF9437131A1097C745D746D462F6A1A44DC32B305000000000000AA55

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.347[debug](http://192.168.1.20/logs#)payload after={"devId":"eb96378268c1f41019vrxg","gwId":"eb96378268c1f41019vrxg","uid":"eb96378268c1f41019vrxg","t":"1674781937"}

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.336[debug](http://192.168.1.20/logs#)ae1b60272745f6b6db63949a1cea12880b58479aa9913016b8f290e1c5c2443c014396c2cc07e20b799e46baad19b17a0b58479aa9913016b8f290e1c5c2443c505b7845fbe7ab5f42b12e89b81635a880cc9f55cf8fa6ae1b5a2607b2084ae8d5fddc69716b9027171a0f0ff9437131a1097c745d746d462f6a1a44dc32b305

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.332[debug](http://192.168.1.20/logs#)payload before={"devId":"eb96378268c1f41019vrxg","gwId":"eb96378268c1f41019vrxg","uid":"eb96378268c1f41019vrxg","t":"1674781937"}

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:17.331[debug](http://192.168.1.20/logs#)33

Not sure if u are still supporting this - just wondering !

Thanks

Hello,

Thanks for reaching out, sorry for the late reply. From the log that you shared I do not see any error, are you able to share a log that shows the error happening as well?

The error that you see is related to the status being empty, however the log shows that it can't be empty:

[dev:147](http://192.168.1.20/logs#)2023-01-26 20:12:18.184[debug](http://192.168.1.20/logs#)Decryted message: {"dps":{"1":false,"9":0,"38":"memory","40":"relay","41":false,"42":"","43":"","44":""}}

Due this log messages is produced by:

if (logEnable) log.debug "Decryted message: ${dec_status}"

status = dec_status

def jsonSlurper = new groovy.json.JsonSlurper()
def status_object = jsonSlurper.parseText(status) <-- point of error if status is NULL/empty

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.