Repository navigation
Releases
0.7.2
When the bridge drops the connection, this release reconnects within milliseconds. Before, the library waited for its next ping check, 10 to 20 s later, and light commands sent in that window were lost without an error. A Deako bridge resets its connections once a day, so this happened daily. The library is called the same way as in 0.7.1.
Changes
- The ping worker reconnects as soon as the connection closes, from either side. A missing pong still triggers a reconnect as before. A bridge that closes every connection right after accepting it is still retried at most once every 10 s (#15).
- The README shows CI, PyPI and coverage badges (#14).
For contributors
Two new tests run against the fake bridge: one checks that a dropped connection is replaced without waiting for a ping, the other that a bridge closing every connection isn't retried in a tight loop. The fake bridge can now close each connection as soon as it accepts it.
Known issues
The two bugs from 0.7.0 are still open: calling connect() twice leaves the first connection open, and calling disconnect() while connect() is still looking for a bridge doesn't stop the retries.
Full changelog: 0.7.1...0.7.2
0.7.1
Home Assistant sets up the Deako integration about a second faster with this release, and each reconnect is about a second faster too. The library is called the same way as in 0.7.0.
Changes
connect()returns as soon as the bridge accepts the connection. It used to check the socket once a second, so it always took at least 1 s although connecting takes a few milliseconds.find_devices()had the same one-second check while the devices arrived, so a bridge with more devices than fit in one read added another second. Both now wait for the bridge's messages, with the same timeouts as before (#11).- The README says how long
connect()andfind_devices()wait, and unclear docstrings were rewritten (#12). - From this release on, the release workflow signs the wheel and sdist with Sigstore and attaches them, with their signatures, to the GitHub release (#10).
For contributors
A test runs the start-up against the fake bridge with the library's real timings and fails if a polling delay comes back. The suite no longer shortens the library's timings, and it runs in about 3.5 s. The repository now has a code of conduct and a feature request form (#9).
Known issues
The two bugs from 0.7.0 are still open: calling connect() twice leaves the first connection open, and calling disconnect() while connect() is still looking for a bridge doesn't stop the retries.
Full changelog: 0.7.0...0.7.1
0.7.0
This is the first release of the community fork with bug fixes. Home Assistant's Deako integration will move to it from 0.6.1 and calls the library the same way as before.
Fixes
- Switching several lights at once now switches all of them. Requests went out back to back without the CRLF the bridge expects, so the bridge dropped some without an error, for example when a voice assistant turned on a whole room. Each request now ends with CRLF and waits for the bridge's answer to the previous one, and a
DEVICE_BUSYanswer is retried (#1). - When the bridge closed the connection, the read loop spun without yielding and froze Home Assistant's event loop. It now notices the closed socket and reconnects (#3).
- After a dropped connection the library found the bridge again only after a reload, and logged "No devices to connect to" every 10 s until then (home-assistant/core#130546). It now reconnects on its own (#3).
- A UTF-8 character split between two reads, an invalid line, a message that never ends, or unexpected values in device data no longer drop or block the connection (#3).
- An unexpected error while connecting no longer stops later attempts, and cancelling a connect closes its socket (#3).
Other changes
- Python 3.11 or newer is required (#6).
- Exception names end in
Error, as PEP 8 asks, for exampleDevicesNotFoundError. The old nameDevicesNotFoundExceptionstill works (#4). - The wheel no longer contains the test modules (#4).
- The package passes
mypy --strict(#2).
For contributors
The tests now include a fake Deako bridge, discovery through a real zeroconf on loopback, a contract test for the calls Home Assistant makes, and a replay of a session recorded from a real bridge. Coverage is 100% and CI enforces it (#5). CI also runs Home Assistant's Deako integration on the library and tests the built wheel, and a release runs the whole CI before it publishes (#7). The README and docstrings were rewritten, and CONTRIBUTING and SECURITY files added (#6).
Known issues
Calling connect() twice leaves the first connection open, and calling disconnect() while connect() is still looking for a bridge doesn't stop the retries. Both bugs were already in 0.6.1, and each has a test marked xfail.
Full changelog: 0.6.1...0.7.0
0.6.1
First release of the community fork of DeakoLights/pydeako. It's on PyPI as pydeako-community, and the import name is still pydeako.
The library code is the same as pydeako 0.6.0. Only the packaging changed:
- New PyPI name and project URLs, and MIT license metadata
- Published from GitHub Actions with PyPI Trusted Publishing
- Dev requirements updated so the tests run on Python 3.11 to 3.14
- Removed Deako's internal GitLab CI, Dockerfile and bumpversion config
Full diff: 0.6.0...0.6.1