I have 12 switch (plug type) of 2 different types working as expected with the njsTuya commands. A new type "GuSund Light Switch SW1" disconnects on the commands. Tried multiple -get commands but none work. Any suggestions as to what might be done to get it to respond.
Example Command issued-
DEBUG=* node njstuya/njstuya.js -mode local -ip 192.168.1.202 -id 63120466c44f33863bf1 -key yyy -get '{ "dps":1, "status":true}'
njstuya booting njstuya +0ms
njstuya "{argName} value is: 192.168.1.202 +1ms
njstuya "{argName} value is: 63120466c44f33863bf1 +0ms
njstuya "{argName} value is: 2a01319284afd5ed +0ms
njstuya "{argName} value is: { "dps":1, "status":true} +0ms
njstuya "{argName} value is: local +0ms
njstuya api {} or undefined +1ms
TuyAPI Connecting to 192.168.1.202... +0ms
TuyAPI Socket connected. +112ms
njstuya Connected to device! +114ms
TuyAPI GET Payload: +2ms
TuyAPI { gwId: '63120466c44f33863bf1', devId: 'yyy' } +0ms
TuyAPI Disconnect +10s
TuyAPI Socket closed: 192.168.1.202 +4ms
njstuya Disconnected from device. +10s
key was found using the tuya-cli list-app with the ucomen iphone ap (which identified 4 of the other working switches as well so the keys should be correct). Tuya-cli list-app does not work with the smartlife app on iphone 7. before you ask, the other 8 device keys were identified a long time ago using a different method. I am on Ubuntu 18.04 and everything is updated to the latest as of 2020/01/15. also tried
DEBUG=* node njstuya/njstuya.js -mode local -ip 192.168.1.202 -id yyy -get '{ "schema": true}'
njstuya booting njstuya +0ms
njstuya "{argName} value is: 192.168.1.202 +1ms
njstuya "{argName} value is: 63120466c44f33863bf1 +0ms
njstuya "{argName} value is: { "schema": true} +0ms
njstuya "{argName} value is: local +0ms
njstuya api {} or undefined +2ms
TuyAPI Connecting to 192.168.1.202... +0ms
TuyAPI Socket connected. +135ms
njstuya Connected to device! +137ms
TuyAPI GET Payload: +2ms
TuyAPI { gwId: '63120466c44f33863bf1', devId: 'yyy' } +0ms
TuyAPI Disconnect +10s
TuyAPI Socket closed: 192.168.1.202 +3ms
njstuya Disconnected from device. +10s
Update, found the issue. The switches are the version 3.3 (used tuya-cli to figure out). so how do I use njstuya where I have both earlier version and the new versions involved.
I have 12 switch (plug type) of 2 different types working as expected with the njsTuya commands. A new type "GuSund Light Switch SW1" disconnects on the commands. Tried multiple -get commands but none work. Any suggestions as to what might be done to get it to respond.
Example Command issued- DEBUG=* node njstuya/njstuya.js -mode local -ip 192.168.1.202 -id 63120466c44f33863bf1 -key yyy -get '{ "dps":1, "status":true}' njstuya booting njstuya +0ms njstuya "{argName} value is: 192.168.1.202 +1ms njstuya "{argName} value is: 63120466c44f33863bf1 +0ms njstuya "{argName} value is: 2a01319284afd5ed +0ms njstuya "{argName} value is: { "dps":1, "status":true} +0ms njstuya "{argName} value is: local +0ms njstuya api {} or undefined +1ms TuyAPI Connecting to 192.168.1.202... +0ms TuyAPI Socket connected. +112ms njstuya Connected to device! +114ms TuyAPI GET Payload: +2ms TuyAPI { gwId: '63120466c44f33863bf1', devId: 'yyy' } +0ms TuyAPI Disconnect +10s TuyAPI Socket closed: 192.168.1.202 +4ms njstuya Disconnected from device. +10s
key was found using the tuya-cli list-app with the ucomen iphone ap (which identified 4 of the other working switches as well so the keys should be correct). Tuya-cli list-app does not work with the smartlife app on iphone 7. before you ask, the other 8 device keys were identified a long time ago using a different method. I am on Ubuntu 18.04 and everything is updated to the latest as of 2020/01/15. also tried DEBUG=* node njstuya/njstuya.js -mode local -ip 192.168.1.202 -id yyy -get '{ "schema": true}' njstuya booting njstuya +0ms njstuya "{argName} value is: 192.168.1.202 +1ms njstuya "{argName} value is: 63120466c44f33863bf1 +0ms njstuya "{argName} value is: { "schema": true} +0ms njstuya "{argName} value is: local +0ms njstuya api {} or undefined +2ms TuyAPI Connecting to 192.168.1.202... +0ms TuyAPI Socket connected. +135ms njstuya Connected to device! +137ms TuyAPI GET Payload: +2ms TuyAPI { gwId: '63120466c44f33863bf1', devId: 'yyy' } +0ms TuyAPI Disconnect +10s TuyAPI Socket closed: 192.168.1.202 +3ms njstuya Disconnected from device. +10s