GithubHelp home page GithubHelp logo

Get works but set doesn't about tuyapi HOT 16 CLOSED

codetheweb avatar codetheweb commented on May 23, 2024
Get works but set doesn't

from tuyapi.

Comments (16)

codetheweb avatar codetheweb commented on May 23, 2024

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.

ckdarby avatar ckdarby commented on May 23, 2024

@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.

codetheweb avatar codetheweb commented on May 23, 2024

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.

ckdarby avatar ckdarby commented on May 23, 2024

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.

codetheweb avatar codetheweb commented on May 23, 2024

@ckdarby did your device work with the old setup instructions?

from tuyapi.

ckdarby avatar ckdarby commented on May 23, 2024

@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.

ckdarby avatar ckdarby commented on May 23, 2024

@codetheweb Did not work. Got some pcap but nothing that looked usable with a key or keyId, etc.

from tuyapi.

uDude avatar uDude commented on May 23, 2024

@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.

ankurp avatar ankurp commented on May 23, 2024

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.

codetheweb avatar codetheweb commented on May 23, 2024

@ankurp does get() work? Can you please provide a link to where you bought your device?

from tuyapi.

ankurp avatar ankurp commented on May 23, 2024

@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.

codetheweb avatar codetheweb commented on May 23, 2024

@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.

christophermh44 avatar christophermh44 commented on May 23, 2024

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.

codetheweb avatar codetheweb commented on May 23, 2024

@christophermh44 did you try the method given here to obtain the key pairs?

from tuyapi.

christophermh44 avatar christophermh44 commented on May 23, 2024

@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.

codetheweb avatar codetheweb commented on May 23, 2024

Glad you got it working @christophermh44.

Closing this as the common problem appears to be an incorrect key parameter.

from tuyapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.