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

TypeErrors #12

Open
mobamoba opened this issue Aug 29, 2019 · 8 comments
Open

TypeErrors #12

mobamoba opened this issue Aug 29, 2019 · 8 comments

Comments

@mobamoba
Copy link

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.

@subzero79
Copy link
Owner

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 ?

@mobamoba
Copy link
Author

3.3 works.

@subzero79
Copy link
Owner

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 ?

@mobamoba
Copy link
Author

mobamoba commented Aug 30, 2019

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)?

@subzero79
Copy link
Owner

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.

@mobamoba
Copy link
Author

mobamoba commented Oct 4, 2019

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

@subzero79
Copy link
Owner

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.

@mobamoba
Copy link
Author

mobamoba commented Oct 5, 2019

Got it thanks.

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

2 participants