diesel-heater-ble
Pure Python library for parsing and controlling BLE diesel heaters.
Supports Vevor, Hcalory, Sunster, and HeaterCC diesel heater 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 |
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 classProtocolAA55- AA55 unencryptedProtocolAA55Encrypted- AA55 with XOR encryptionProtocolAA66- AA66 unencrypted (BYD variant)ProtocolAA66Encrypted- AA66 with XOR encryptionProtocolABBA- ABBA/HeaterCC protocolProtocolCBFF- CBFF/Sunster v2.1 protocolProtocolHcalory- Hcalory MVP1/MVP2 protocol
Methods
parse(data: bytearray) -> dict | None- Parse BLE notification databuild_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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| diesel_heater_ble-0.3.4.tar.gz | 36.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diesel_heater_ble-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.3 kB
Release files / diesel_heater_ble-0.3.4.tar.gz
| Download URL | diesel_heater_ble-0.3.4.tar.gz |
|---|---|
| Size | 36.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97eaa6bcdb139e769c9aa405636b44a5d748ec4f37987cf5a6aaa48164cc0a03
|
|
BLAKE2b-256 checksum How to use checksums |
7fefc7b2c1508885db5402ac9eeb4e71917b7ff3ab9035d9d5b2349a6cdaeec3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|
Release files / diesel_heater_ble-0.3.4-py3-none-any.whl
| Download URL | diesel_heater_ble-0.3.4-py3-none-any.whl |
|---|---|
| Size | 23.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c7ac2e3db1a981216824e23cbe687c413849c99b4a77c3d5d6251065f2f7c7b
|
|
BLAKE2b-256 checksum How to use checksums |
3272cdeeb9f1637366e4c8846729d51e5b208cd6cebedf6eaa99387163ffc129
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|