Skip to main content

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.

Installation

This package is available on PyPI:

pip install victron-ble-ha-parser

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

victron_ble_ha_parser-0.4.10.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

victron_ble_ha_parser-0.4.10-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file victron_ble_ha_parser-0.4.10.tar.gz.

File metadata

  • Download URL: victron_ble_ha_parser-0.4.10.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for victron_ble_ha_parser-0.4.10.tar.gz
Algorithm Hash digest
SHA256 b6a324c7fc70f4e7dbd44c0b53ef817d3dae890dc61a357cb99575ca89a73f1f
MD5 c2c7b8da33efd15f9b6ff2baf5e7c2d6
BLAKE2b-256 44ef80f9f85ed0e87624a59b3816067f35c060115e32b6484f037f3cce1deb66

See more details on using hashes here.

Provenance

The following attestation bundles were made for victron_ble_ha_parser-0.4.10.tar.gz:

Publisher: publish.yml on rajlaud/victron-ble-ha-parser

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

File details

Details for the file victron_ble_ha_parser-0.4.10-py3-none-any.whl.

File metadata

File hashes

Hashes for victron_ble_ha_parser-0.4.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e00e1afab978362b5334d4a9d3094520e44fbcf1444a65d551c63ef5f0cbe627
MD5 5f9b2f75e799ee5cb090d3c40c32dc18
BLAKE2b-256 e4595219e1a0e3624076cbbeed60966c71ed07ba843ac3782209588a70c5e37c

See more details on using hashes here.

Provenance

The following attestation bundles were made for victron_ble_ha_parser-0.4.10-py3-none-any.whl:

Publisher: publish.yml on rajlaud/victron-ble-ha-parser

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