Comments (6)
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.
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.
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.
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.
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.
Nothing here for a long time. Closing
from aiotuya.
Related Issues (11)
- Shared key HOT 6
- AttributeError: 'TuyaScanner' object has no attribute 'transport' HOT 2
- ImportError: No module named 'aiohttp' HOT 4
- How to use it ? HOT 6
- Provisioning WiFi HOT 2
- Using my own APIKEY/APISECRET
- AttributeError: 'TuyaScanner' object has no attribute 'transport' HOT 7
- Please add wattmeter.
- Deleted
- Asyncio win32 issue?
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 aiotuya.