Skip to main content

Async HelvarNet communication and control library.

Project description

aiohelvar

Asynchronous Python library to interact with Helvar Routers.

This library written to support the (work in progress) Helvar HomeAssistant 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.

Development

Installing Test Dependencies

To run tests, you need to install the test dependencies:

pip install -r requirements-test.txt

Running Tests

Run all tests:

python3 -m pytest

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

aiohelvar-0.9.8.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiohelvar-0.9.8-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file aiohelvar-0.9.8.tar.gz.

File metadata

  • Download URL: aiohelvar-0.9.8.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiohelvar-0.9.8.tar.gz
Algorithm Hash digest
SHA256 672b7723f03231861722178dabaf8d149f2d89272d0c30b1ca51166087bec347
MD5 756a49c8b14f23a1473976196cc0be2a
BLAKE2b-256 87753e28de761242f37028248c49ee3a5980ad4a2667aa058ffd73c2ec2604db

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiohelvar-0.9.8.tar.gz:

Publisher: pypi.yaml on tomplayford/aiohelvar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiohelvar-0.9.8-py3-none-any.whl.

File metadata

  • Download URL: aiohelvar-0.9.8-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiohelvar-0.9.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7806d18e9947ff68bc9781af9eaef6c3040e251a6a9ce3c49a5007ecbf1aba72
MD5 2803201b605c9331fd56b4c62e6155a8
BLAKE2b-256 8f6b7991e5de230f56e18e0d702527137349c435a67831ddbbe5916eeb617d02

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiohelvar-0.9.8-py3-none-any.whl:

Publisher: pypi.yaml on tomplayford/aiohelvar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page