node-red-contrib-tuya-local icon indicating copy to clipboard operation
node-red-contrib-tuya-local copied to clipboard

TypeErrors

Open mobamoba opened this issue 5 years ago • 8 comments

I appreciate your doing this and it's working, but I'll occasionally get a number of errors like:

"TypeError: Packet too short. Length: 5. device: BR" or "TypeError: Prefix does not match: 580b29d10f998a05b9a93df453e1f3a33fd67e592cc978ca105d8f3958c20000aa55 device: LR" or "RangeError: Index out of range device: LR"

I'm not sure what those errors mean and they don't seem to impact whether or not the device works but I thought they were worth reporting.

mobamoba avatar Aug 29 '19 20:08 mobamoba

I am guessing the error comes from tuyapi. I only have in my posses one type of tuya switch to test which is a medion plug, the sell those in Australia. Do you have to set up a different protocol version ? Or the default 3.3 works for you ?

subzero79 avatar Aug 29 '19 21:08 subzero79

3.3 works.

mobamoba avatar Aug 29 '19 21:08 mobamoba

Yeah all of those come from tuyapi, as is failing to decrypt the pcket. Just guess is the WiFi signal ok for the device? Do all devices show the same error ?

subzero79 avatar Aug 29 '19 22:08 subzero79

Not a wifi issue as I get errors on a device that's very close to router. I have two devices and both show the errors at times.

I noticed tuyapi is updated. Is there a way for this node to automatically update itself when tuyapi updates in case that fixes the problem (or is that something you would have to do manually each time)?

mobamoba avatar Aug 30 '19 12:08 mobamoba

It has to be done manually. Should be ok as long as isnt a major release. Tuyapi hasn’t released anything if you mean the dev branch that’s probably not going to work.

subzero79 avatar Oct 04 '19 11:10 subzero79

Okay thanks. Does doing it manually basically mean installing it via npm then just overwriting the version in the subdirectory containing your plugin?

mobamoba avatar Oct 04 '19 11:10 mobamoba

This is my first node so not 100% sure how it works. the version is pinned at the node manifest so it gets installed from there. If you clone my repo and change the version in the manifest then you can install from your GitHub repository and should pull that specific tuyapi version. There hasn’t been any updates at tuyapi in the last month I think they are committed to the next major release.

subzero79 avatar Oct 05 '19 00:10 subzero79

Got it thanks.

mobamoba avatar Oct 05 '19 10:10 mobamoba