Async HelvarNet communication and control library.
Project description
aiohelvar
Asynchronous Python library to interact with Helvar Routers.
This library was originally written to support the (work in progress) Helvar Home Assistant integration.
Features:
- Manages the async TCP comms well, keeps the connection alive and listens to broadcast messages
- Decodes the HelvarNet messages and translates things into Python objects that can easily be further translated into Home Assistant objects
- Discovers and retrieves Devices, Groups & Scenes and and all their properties, state and values.
- Keeps track of device states as scenes and devices change based on notifications from the router.
- Calls the more useful commands to control or read status from the above.
Very much a work in progress. Known TODOS:
- Cluster support - we assume cluster 0 at the moment
- Sensor support
- Support relative changes to scene levels update commands
- Better test coverage
(Some of the) Known limitations
Lack of unique device IDs
I can't find a way to grab a unique ID for devices on the various Router busses.
The DALI standard requires every device have a GTIN and a unique serial number. These appear in Helvar's router management software, but are not available on the 3rd party APIs. I've tried probing for undocumented commands with no luck.
For now, I'm using the workgroup name + the helvar bus address as a unique address. This is not unique per physical device - it is, however, unique at any point in time.
Open to better suggestions!
Routers don't notify changes to individual devices.
We receive notifications when group scenes change, and since we know device levels for every scene, we can update devices levels without polling devices.
However, we don't get notified when individual devices change their load. This shouldn't be an issue for most setups, as Helvar is scene oriented, and almost every happens that way.
We also receive notifications when there are relative changes to scene levels, but we don't currently support those commands.
If you're having trouble here, I suggest we implement a device polling option that can be enabled.
Router doesn't report decimal scene levels
If you set scene levels to a decimal, rather than an int. (e.g. 0.2 or 54.6). The only command available to retrieve scene levels only returns the integer.
The only time this is really a problem on dim scenes where a value of 0.25 would show light, but the command is reporting off.
We get round this by polling all devices manually if we think they've been updated by a scene. Don't like it.
Colour changing loads.
I don't have a router that supports these as native DALI devices. So I have no idea how they appear :)
The HelvarNET docs don't mention how it's supported.
Requests to Helvar :)
- Please provide a command to retrieve a device's GTIN and / or serial number.
- Please provide a command to retrieve full decimal values of a scene table.
Disclaimer
Halvar (TM) is a registered trademark of Helvar Ltd.
This software is not officially endorsed by Helvar Ltd in any way.
The authors of this software provide no support, guarantees, or warranty for its use, features, safety, or suitability for any task. We do not recommend you use it for anything at all, and we don't accept any liability for any damages that may result from its use.
This software is licensed under the Apache License 2.0. See the LICENCE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file aiohelvar-0.9.3.tar.gz
.
File metadata
- Download URL: aiohelvar-0.9.3.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4795725749790876bdfe7631abad134ecb0479050117ab91148df0e8cd0b792d |
|
MD5 | e7ef9e9fa451363c484f16b6ea68567b |
|
BLAKE2b-256 | a33daa5c4464aa0bd60f7812fea4d8dd793b47d3ebdace64baec20fee666898b |