GithubHelp home page GithubHelp logo

Comments (6)

frawau avatar frawau commented on July 17, 2024

Hi,

I am glad you find my little library useful.

You can already do what you want as it is... Check DevManager and DevProvision in main.py as well as the use of DevProvision in readin. That should do it for you.

Cheers

from aiotuya.

frawau avatar frawau commented on July 17, 2024

One more thing.... Do not abuse the provisioning function of this library. I did include the id and key I got from Tuya so it could be useful.... If we start generating lots of provisioning requests in a short time span, they could possibly notice and rescind that key. I do not think they will, but we might as well not try that.

Ne tentons pas le diable

from aiotuya.

polyedre avatar polyedre commented on July 17, 2024

Ok thank you !
I succeded to adapt the scanner to my needs.

What I want to do now is to get a way to give all devices in paring mode the informations about the ssid and wifi password (so that they'll begin the udp broadcast to port 6666).
I did'nt found the part of the code that does this (in main or in provision.py) ?

from aiotuya.

frawau avatar frawau commented on July 17, 2024

From the top of my head, this should work as-is. (I seem to remember I tried and succeeded with 2 devices). The SSID and keys are send via the length of some broadcast packets (after a given prelude sequence), so all devices in "pairing" mode should get it.

The key is generated for each device individually.

from aiotuya.

polyedre avatar polyedre commented on July 17, 2024

Yeah, I got it to work by running this function:

def sync_plugs(call):
    tuya = TuyaCloud("[email protected]", "random_pass")
    prov = TuyaProvision(tuya, WIFI_SSID, WIFI_PASSWORD)
    loop = aio.new_event_loop()
    aio.set_event_loop(loop)
    prov.start(loop)
    loop.run_forever()

The best for me would be to stop the loop event when one device is apaired (I didn't succeed yet)

from aiotuya.

frawau avatar frawau commented on July 17, 2024

Nothing here for a long time. Closing

from aiotuya.

Related Issues (11)

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.