xAAL gateway for Yeelight devices
Project description
This package provides a xAAL gateway for Yeelight lights. It supports most Yeelight lights and bulbs. You have to enable local control on your Yeelight device to use this package. You can do this by enabling the “LAN Control” option in the Yeelight app.
The gateway loads bulbs from the configuration file and creates a xAAL device for each of them. Check yeelight.ini after the first run to see the devices created. A gateway.basic device is also registered on the bus, tracking connected (embedded) and disconnected (inactive) bulbs.
Notes
This gateway uses the asyncio API provided by the Yeelight library (yeelight.aio.AsyncBulb) and the xAAL AsyncEngine.
Boot & Connect flow
On startup, setup() loads bulbs from config and starts async_listen on each. The Yeelight library handles reconnection automatically:
While connected: push notifications arrive in real time; sync() is rarely needed.
If a bulb disconnects: backoff (15s) then retry, and on_properties({connected: False/True}) updates the gateway status.
Important: if a bulb is offline at boot, async_listen fails immediately with no retry. The bulb will only be picked up later by discover() (which runs every 300 seconds). This is a limitation of the library.
Rate limiting
Yeelight bulbs enforce a hardware limit of 60 commands/minute. To stay under this limit:
turn_on / turn_off skip if already in the target state.
sync() coalesces multiple get_properties calls into one, and is skipped if a push notification arrived within the last 300ms.
discover() is the only periodic poll (every 300s).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xaal_yeelight-0.4.1.tar.gz.
File metadata
- Download URL: xaal_yeelight-0.4.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f8b4acc6b98b66e58ba648e1fe1dd73e14d019ce67c40c132d27c42340531d
|
|
| MD5 |
41a120793593f45016c797a86f36cb0e
|
|
| BLAKE2b-256 |
ef6ea0dee209fc290f40498b87dd99337b1c5d54373e683127d9ccf114ef108e
|
File details
Details for the file xaal_yeelight-0.4.1-py3-none-any.whl.
File metadata
- Download URL: xaal_yeelight-0.4.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d674d08bf6a2b77be6badc239882bd4c60ccbd9a8dbbb5a70c42358bf20a6e2
|
|
| MD5 |
1614efd02ba3e1531bfe8f723f2779e1
|
|
| BLAKE2b-256 |
403ee9cc195055740118e3cc095da6fbcc28610359bf1e59a0f5b63e7cab7ddb
|