subzero79 / node-red-contrib-tuya-local

NodeRED node to control tuya devices locally. Based on tuyapi module
29 stars 17 forks source link

Node is returning message with bad formatting #31

Closed fmgyotoku closed 4 years ago

fmgyotoku commented 4 years ago

Howdy! I used this node some time ago with great results and I'm trying now a new node-red implementation on a raspberry pi. So I installed tuyapi, tuya-cli and the node-red-contrib-tuya-local.

When I ran the tuya-cli, I can get all the device IDs and local keys as expected.

Also, when I configured the node and deployed the flow, I could see that the connection was returning connected status as per the screenshot. image

However, the debug is returning an awkward message from the node: image

When I listed the npm installation, I found the following details for the node package: image

Could this be any dependency compatibility issue? Is it possible to point to the 3.2.3 tuya library instead of the 5.1.2? How could this be achieved?

subzero79 commented 4 years ago

That looks to me like incorrect decryption. I would check the keys and deviceid are correct.

fmgyotoku commented 4 years ago

@subzero79 , you are right. I tested with another smart plug and it worked well. I guess there might be something with the device I was using before. I will close this issue. Thanks a lot for the quick response! 👍