Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read schema from device. #23

Closed
EricPalmquist opened this issue May 28, 2019 · 1 comment
Closed

Cannot read schema from device. #23

EricPalmquist opened this issue May 28, 2019 · 1 comment

Comments

@EricPalmquist
Copy link

EricPalmquist commented May 28, 2019

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
[

@EricPalmquist
Copy link
Author

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: codetheweb/tuyapi#175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant