I’m happy to share my latest integration:
I recently bought a TPMS from China for my motorcycle. After setting up an ESPHome Bluetooth proxy, I discovered that this TPMS uses slightly different logic compared to others — its manufacturer ID keeps changing in the advertisements. Because of this, I decided to implement a custom integration for it.
I spent quite some time debugging the issue and reverse-engineering the CRC method, so I wanted to share the results with everyone.
If the name you see in the advertisement monitor is “DJTPMS,” you’re in luck.
DJTPMS
DJTPMS is a Home Assistant integration that listens to Bluetooth LE advertisements from DJTPMS sensors and exposes their readings as sensors.
DJTPMS sensors are commonly sold as generic tire pressure sensors on AliExpress.
This integration uses passive Bluetooth scanning only and does not connect to the device.
Installation
HACS:
- Add this repository to HACS as a custom repository (Integration).
- Install
DJTPMS. - Restart Home Assistant.
Manual:
- Copy
custom_components/djtpmsto/config/custom_components/djtpms. - Restart Home Assistant.
Configuration
You can add DJTPMS from the Home Assistant UI.
Notes:
- Bluetooth must be enabled in Home Assistant.
- The device must be in range and actively advertising.
Entities
The integration creates the following sensor entities per device:
- Battery voltage (V)
- Temperature (°C)
- Absolute pressure (kPa)
- Gauge pressure (kPa)
Gauge pressure is derived by subtracting a fixed 101 kPa atmospheric pressure from the absolute pressure.
Bluetooth Payload Format
The DJTPMS advertisement frame is parsed from manufacturer or service data. The core 12-byte payload layout is:
00 00 1F 27 01 54 00 06 0C 3D 5E 4E 8B E6
| | | | | | | | \______________/
| | | | | | | \---- CC = CRC8 check byte
| | | | | | \-------- FF = flags/unknown (often 00)
| | | | \--\----------- PH PL = abs pressure (kPa), big-endian uint16
| | \--\------------------ TT = temperature (°C)
| \-------------------------- VV = battery*10 (e.g. 0x1F => 3.1V)
\----------------------------- CID0 CID1 = “Company ID” bytes (varies: 00 00 or 00 0C)
Calculations
Derived values follow the parsing logic in custom_components/djtpms/ble.py and constants in custom_components/djtpms/const.py:
- Battery voltage (V) =
VV / 10.0 - Temperature (°C) = signed int8 conversion of
TT(0…255 → -128…127) - Absolute pressure (kPa) =
(PH << 8) | PL(big-endian uint16) - Gauge pressure (kPa) =
max(absolute_pressure - 101, 0)
CRC8 is computed over [CID0, CID1, VV, TT, PH, PL] and compared to CC.
Support
If you have discovered a problem or want to request a feature, please open an issue.
Pull requests are welcome.
