-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Tuyapi returns junk data #407
Comments
That looks interesting... 😛 Can you please set the |
|
Wasn't trying to imply that it was, just was curious what you're working on. That is a bit of a strange-looking payload that the device sends back. IIRC even for protocol version 3.3 the version should be unencrypted before the payload, which isn't occurring here. What are the options you're passing to the TuyAPI constructor? Try version 3.3 if you haven't already, and also double-check the key. |
I have the same problem as @theLMGN: Script:
Everything I get as output:
Debug Output:
Desktop: |
Yours looks slightly different as the version number is inside the payload. Not sure what's going on. Could you link to a product page for your device? |
I'm using these lights: https://www.hombli.com/de/products/smart-spot-rgb/ I have them linked with the tuya app and not with the original app of the manufacturer. I have also tested if it works with the original app, but the API returns the same junk data. |
Could you email or message me the local key for your device so I can play around with the payload locally (assuming it hasn't changed since your last post with the debug log)? |
@codetheweb I mailed you the local key and the id to the email on your website. |
Thank you, I'll try and take a look soon. |
I've played around with the two strings from the above debug output and I have no idea what's going on. Could you provide a longer debug output? Multiple GET payloads between changing a single value on the device would be helpful as well. It looks like the device doesn't respond to heartbeat packets either? |
Here is a longer debug log:
The new script is:
I hope this will help you, if you need more debug data let me know. |
Thank you. Could you send a GET request, change only one attribute of the device through the app, then send another GET request? Trying to see what changes. |
Here is the debug log while turning the led on and off in the app: LED OFF
LED ON
LED OFF
LED ON
Here is the script:
|
Thank you. Several of the packets are the same in both the on and off scenarios, so I'm a bit stumped. That would imply that the device isn't actually sending data about whether it's on or off. Could you fetch the local key again to make sure it hasn't changed? Decryption should fail if it's wrong and not just return junk data but that's the only thing left that I can think of to try. |
@codetheweb The key has changed from yesterday to today, but I don't know why. The API is now working without a problem. 👍 Big thank you for the effort. |
Glad it's working now 👍 |
This comment has been minimized.
This comment has been minimized.
@pinkfloydFR please run your script with debug output enabled ( |
@wojtulab can you double-check the local key? What do you mean by a 1.x.x firmware? |
I can reply to this, i already double checked my api, and i am sure is good as i can control my roller with the extension in HA |
@codetheweb double checked, its ok. The situation is the same. By 1.x.x firmware I mean in Tuya app section firmware inside my device: |
No details, no follow up infos. closing. Please reopen if still relevant and happening with most recent versions. |
Describe the bug
TuyAPI returns junk data and is unable to control the device.
Expected behavior
It works!
Debug Output
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
node -v
] Electron v11.0.3Chromium v87.0.4280.67Node v12.18.3v8 v8.7.220.25-electron.0Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: