Skip to main content

diesel-heater-ble

Pure Python library for parsing and controlling BLE diesel heaters.

Supports Vevor, Hcalory, Sunster, HeaterCC, HeatGenie/Boygu, and Webasto Cronus controller protocols over Bluetooth Low Energy (BLE). No dependency on Home Assistant.

Supported Protocols

Protocol Mode Description
AA55 1 Unencrypted, 18-20 bytes (Vevor)
AA55enc 2 Encrypted, 48 bytes XOR (Vevor)
AA66 3 Unencrypted, 20 bytes (BYD variant)
AA66enc 4 Encrypted, 48 bytes XOR (Vevor)
ABBA 5 HeaterCC protocol, 21+ bytes, own command format
CBFF 6 Sunster v2.1, 47 bytes, optional double-XOR encryption
Hcalory 7 MVP1/MVP2 protocol, variable length with checksum
HeatGenie 8 HeatGenie/Boygu register protocol
Cronus 9 Webasto ThermoConnect record protocol

Installation

pip install diesel-heater-ble

Usage

from diesel_heater_ble import ProtocolAA55, ProtocolCBFF

# Parse a BLE notification
protocol = ProtocolAA55()
data = bytearray(...)  # raw BLE notification bytes
result = protocol.parse(data)

print(result["running_state"])   # 0=off, 1=on
print(result["cab_temperature"]) # interior temperature
print(result["supply_voltage"])  # battery voltage

# Build a command
cmd = protocol.build_command(command=3, argument=0, passkey=1234)
# Send cmd to BLE characteristic...

API

Protocol Classes

All protocol classes implement the HeaterProtocol interface:

  • HeaterProtocol - Abstract base class
  • ProtocolAA55 - AA55 unencrypted
  • ProtocolAA55Encrypted - AA55 with XOR encryption
  • ProtocolAA66 - AA66 unencrypted (BYD variant)
  • ProtocolAA66Encrypted - AA66 with XOR encryption
  • ProtocolABBA - ABBA/HeaterCC protocol
  • ProtocolCBFF - CBFF/Sunster v2.1 protocol
  • ProtocolHcalory - Hcalory MVP1/MVP2 protocol
  • ProtocolHeatGenie - HeatGenie/Boygu register protocol
  • ProtocolCronus - Webasto ThermoConnect record protocol

Methods

  • parse(data: bytearray) -> dict | None - Parse BLE notification data
  • build_command(command: int, argument: int, passkey: int) -> bytearray - Build command packet

Helper Functions

  • _decrypt_data(data) / _encrypt_data(data) - XOR encryption/decryption
  • _u8_to_number(value) - Convert unsigned 8-bit value
  • _unsign_to_sign(value) - Convert unsigned to signed value

License

MIT

Metadata

Release files for diesel-heater-ble 0.3.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diesel-heater-ble 0.3.10
File Size Uploaded Provenance Actions
diesel_heater_ble-0.3.10.tar.gz 45.7 kB Without provenance Details for diesel_heater_ble-0.3.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diesel-heater-ble 0.3.10
File Interpreter ABI Platform Actions
diesel_heater_ble-0.3.10-py3-none-any.whl Python 3 none any Details for diesel_heater_ble-0.3.10-py3-none-any.whl

Total release size: 75.3 kB

Release files / diesel_heater_ble-0.3.10.tar.gz

Download URL diesel_heater_ble-0.3.10.tar.gz
Size 45.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc1175a3ef07e72c93ea675e1ecb140b3eebab3dd8a5c9c8bc9cb875ca8a33e
BLAKE2b-256 checksum
How to use checksums
0b71397feddbb513f064bd2cb2bfde72566212022e3eec783a53dc3c3812b99f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Release files / diesel_heater_ble-0.3.10-py3-none-any.whl

Download URL diesel_heater_ble-0.3.10-py3-none-any.whl
Size 29.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56f5cf0542696ad985d7c3aad0eab1755942e7f6c529baec4e0eceda5d7d9912
BLAKE2b-256 checksum
How to use checksums
42e741c123a16406444b5a380852d661c58f9ba368c9251bdd03812d1084a84e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.12

Security for diesel-heater-ble 0.3.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.10 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page