I seems to be able to connect to my device just fine, but am getting an error when requesting the schema. I also get the same error trying the -get '{ "dps": 1 }' command. Any thoughts?
[20:15:47] openhabian@openHABianPi:/etc/openhab2/scripts$ DEBUG=* node njsTuya -ip 192.168.15.148 -id 40052637dc4f22e5ca84 -key c777f0da21c37e89 -get '{ "schema": true}'
njstuya booting njstuya +0ms
njstuya "{argName} value is: 192.168.15.148 +9ms
njstuya "{argName} value is: 40052637dc4f22e5ca84 +1ms
njstuya "{argName} value is: c777f0da21c37e89 +1ms
njstuya "{argName} value is: { "schema": true} +0ms
njstuya api {} or undefined +21ms
TuyAPI Connecting to 192.168.15.148... +0ms
TuyAPI Socket connected. +54ms
njstuya Connected to device! +63ms
TuyAPI GET Payload: +3ms
TuyAPI { gwId: '40052637dc4f22e5ca84', devId: '40052637dc4f22e5ca84' } +1ms
TuyAPI Disconnect +10s
(node:32683) UnhandledPromiseRejectionWarning: undefined
(node:32683) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:32683) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
TuyAPI Socket closed: 192.168.15.148 +11ms
njstuya Disconnected from device. +10s
[
I'll set this to closed as I've confirmed that the cause is the firmware on my device upgraded and now encodes the payload. This is a known issued here: https://github.com/codetheweb/tuyapi/issues/175
I seems to be able to connect to my device just fine, but am getting an error when requesting the schema. I also get the same error trying the -get '{ "dps": 1 }' command. Any thoughts?
[20:15:47] openhabian@openHABianPi:/etc/openhab2/scripts$ DEBUG=* node njsTuya -ip 192.168.15.148 -id 40052637dc4f22e5ca84 -key c777f0da21c37e89 -get '{ "schema": true}' njstuya booting njstuya +0ms njstuya "{argName} value is: 192.168.15.148 +9ms njstuya "{argName} value is: 40052637dc4f22e5ca84 +1ms njstuya "{argName} value is: c777f0da21c37e89 +1ms njstuya "{argName} value is: { "schema": true} +0ms njstuya api {} or undefined +21ms TuyAPI Connecting to 192.168.15.148... +0ms TuyAPI Socket connected. +54ms njstuya Connected to device! +63ms TuyAPI GET Payload: +3ms TuyAPI { gwId: '40052637dc4f22e5ca84', devId: '40052637dc4f22e5ca84' } +1ms TuyAPI Disconnect +10s (node:32683) UnhandledPromiseRejectionWarning: undefined (node:32683) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:32683) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. TuyAPI Socket closed: 192.168.15.148 +11ms njstuya Disconnected from device. +10s [