Comments (16)
get()
works but set()
fails if the key parameter is incorrect. Can you please try setting up your device again to regenerate the key?
from tuyapi.
@codetheweb Are there instructions on generating the key?
I tried using tuya-cli link-wizard
but nothing would pair with it when my lights were blinking.
from tuyapi.
Other users have also reported issues with the link wizard, and I'm trying to track down the bug (although it works flawlessly for me).
You can view the old setup instructions here.
from tuyapi.
Just for reference sake for anyone else who stumbles across this, the lighs I have an issue using the wizard with is: LUMIMAN LM530
from tuyapi.
@ckdarby did your device work with the old setup instructions?
from tuyapi.
@codetheweb Have not attempted yet looked like a bunch of work but I have at least installed the Android app to capture packets.
from tuyapi.
@codetheweb Did not work. Got some pcap but nothing that looked usable with a key or keyId, etc.
from tuyapi.
@ckdarby , late response. Just connect to the device using the Tuuapi and use your alexa/phone app/whatever to set parameters. See what dps values change and set those sequentially.
from tuyapi.
Any update on this. I am also having issues with Merkury bulbs and plugs which I cannot set via this API. The set method times out.
from tuyapi.
@ankurp does get()
work? Can you please provide a link to where you bought your device?
from tuyapi.
@codetheweb Thanks for your work on this module. This is the bulb I bought https://www.walmart.com/ip/Merkury-Innovations-Color-Smart-A21-Light-Bulb-75W-Equivalent-No-Hub-Required/254063201
They are cheap smart bulbs but I want them to get to work with HomeKit so I need to code up a plugin for a HomeKit bridge. I cannot get the set
to work and I noticed the implementation in this actually works.
https://github.com/drumfreak/homebridge-tuyapi-extended/blob/master/index.js#L224-L290
from tuyapi.
@ankurp do you mean that drumfreak's plugin works as expected for your bulbs, or are you pointing out that they implemented color controls?
If it's the first, then you're probably setting the wrong property on your device. Try starting Homebridge with DEBUG=* homebridge
to see what properties drumfreak's plugin is changing.
from tuyapi.
Hi,
I am discovering your library since a few days and I am getting lost with the way I have to use to communicate with my light bulbs.
I have a similar problem than described here: I can get data but I cannot set them.
I got the keys by reading the logs from my smartphone ("adb shell" and "logcat" while navigating in Tuya Smart app). But it seems that the keys are not correct (maybe I use the bad value?)
So, the more I read this topic, the more I think that I have not the good key to change values on my light bulbs. Here is my question: how can I get the real generated key by Tuya?
As far as I understand, those keys are generated when the devices are linked to an application. I tried to create one on Tuya's website to use the app key and secret with tuya-link but they are valid for only 1 month (or I have to pay 1500$ to publish a smartphone app that I will not use!)
Thanks for your help :)
from tuyapi.
@christophermh44 did you try the method given here to obtain the key pairs?
from tuyapi.
@christophermh44 did you try the method given here to obtain the key pairs?
Yes, but I got errors while trying to get ids.
By the way, I finally succeed to get my device ids by looking into files inside /data/data/com.tuya.smartlife/shared_prefs/*.xml
from tuyapi.
Glad you got it working @christophermh44.
Closing this as the common problem appears to be an incorrect key parameter.
from tuyapi.
Related Issues (20)
- Error: GET_TOKEN_FAILED 1114, your ip(xxx.xxx.xxx.xxx) don't have access to this API HOT 1
- Some of my localtuya devices periodically become unavailable HOT 2
- App show "no access". I turn on all permissions when creating new Cloud Project. And I cheched my region. All right. HOT 1
- Implement 3.5 protocol
- Setting brightness overrides color / set multiple properties only applies last HOT 2
- Weird encrypted response from tuya bulb ? HOT 6
- Philips Avent Baby Monitor uses Tuya HOT 3
- Virtual device timed out HOT 1
- Tuya IOT Platform error 1106: permission deny HOT 1
- Cannot install with "npm install codetheweb/tuyapi" HOT 1
- device.get() never returns HOT 9
- Not being able to connect using device.connect() HOT 7
- tuya-cli get does not work, ECONNRESET error. HOT 1
- 302 status on my TuyaPlatform plugin HOT 1
- `dp-refresh` fire for all devices of the gateway instead of the only one concerned HOT 1
- is there a breaking change at tuya ? HOT 6
- Use Insecure Algorithm AES-ECB as Default Encryption Method HOT 1
- npm install codetheweb/tuyapi Infinite loading occurs during installation.
- virtual ID HOT 1
- Just lost all my Local Tuya devices HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuyapi.