A parser for Victron BLE messages suitable for use with Home Assistant
Project description
Victron BLE HA Parser
Overview
This project exists solely to provide an interface to the excellent
victron-ble project suitable for use with a Home
Assistant integration. Thank you to Keshav Varma for maintaining the victron-ble
project.
Installing the Home Assistant custom component
Currently the Home Assistant integration is only available as a custom component, for testing purposes. The goal is to make this part of Home Assistant core.
If you'd like to test this, clone my fork on the HA project and checkout the victron-ble-custom-component
branch:
git clone https://github.com/rajlaud/home-assistant.git --branch victron-ble-custom-component
Then, copy or symlink homeassistant/components/victron-ble
into your config/custom_components
folder.
Details
The parser module has one class, VictronBluetoothDeviceData
, which parses Bleak advertisements and
updates itself with the sensor data from the advertisement. Each instance of
VictronBluetoothDeviceData
should be fed advertisements from exactly one Victron device (based on
the MAC address) and the instance needs to be initiated with the encryption key of the device that
is going to be sending updates. If the encryption key is set correctly everything else will be
figured out automatically.
There is a handy package from maintainers of the HA project called sensor-state-data
to make it
easy to automate ingesting sensor state updates like this. Unfortunately, we need to use a unit
(amp-hours) not supported by the module and my PR to include amp-hours was rejected because they are
not a common unit (https://github.com/Bluetooth-Devices/sensor-state-data/pull/47). For that
reason, we need a custom extension of sensor-state-data, which is contained in the
custom-sensor-state.py file.
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
File details
Details for the file victron_ble_ha_parser-0.4.5.tar.gz
.
File metadata
- Download URL: victron_ble_ha_parser-0.4.5.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9a01911db0f34134dc2c7d74870331f241a7bdca80d3761a07c0dcf1f3dd2e |
|
MD5 | c6418d3adce4951ef2c39e6ed9ec9776 |
|
BLAKE2b-256 | 96cda4ed13e664e838efc7860e6e231a80c80a26ca00e145c5ed9d4eb5ff3bb0 |
File details
Details for the file victron_ble_ha_parser-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: victron_ble_ha_parser-0.4.5-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8081ee284dd9cf61e7875797a9bdd6fe245a34cc7570456b2576dbbb93e7ea38 |
|
MD5 | fdba15962ef2b49c88ab2c015032bf55 |
|
BLAKE2b-256 | 22ddf220ad1c78fd0953d4942ee93bc35849779399dddcc14fd4232883f6d701 |