WattCycle BLE Batteries

Reads WattCycle / XDZN BLE batteries (TDT protocol) and exposes them as devices in ioBroker

Current Release
0.2.2
Developer
bluefox
License
MIT

ioBroker.wattcycle

Reads WattCycle / XDZN BLE batteries (TDT protocol, characteristics fff1/fff2/fffa, "HiLink" auth) into ioBroker.

Features

  • Continuously polls a configurable list of batteries via BLE.
  • Per-battery states for SoC, voltage, current, power, capacity, cycles, MOSFET/PCB/cell temperatures, individual cell voltages.
  • Built-in BLE scan from the admin UI to discover MAC addresses of nearby devices.
  • Configurable poll interval, gap between batteries and Bluetooth (HCI) adapter.

Configuration

Open the admin UI and on the Main settings tab choose:

  • Bluetooth adapter (hciX) — the HCI device id (0 = hci0).
  • Polling interval (ms) — interval between full poll cycles.
  • Gap between batteries (ms) — pause between consecutive battery reads in one cycle.
  • Scan duration (ms) — how long the BLE scan runs.

On the Batteries tab press Scan for BLE devices, then copy MAC addresses of your batteries into the table below and assign each one a name.

States

For every configured battery the following states are created under wattcycle.<instance>.batteries.<name>:

StateTypeUnitDescription
socnumber%State of charge
voltagenumberVPack voltage
currentnumberACurrent (signed, charge positive)
powernumberWVoltage × current
remaining_ahnumberAhRemaining capacity
total_ahnumberAhTotal capacity
design_ahnumberAhDesign capacity
cyclesnumberCycle count
cell_spread_mvnumbermVDifference between highest/lowest cell
mos_tempnumber°CMOSFET temperature
pcb_tempnumber°CPCB temperature
cells_vstringJSON array of cell voltages (V)
cell_tempsstringJSON array of cell temperatures (°C)
product.model_or_fwstringModel / firmware string
product.manufacturerstringManufacturer string
product.serialstringSerial number
lastUpdatenumberTimestamp of last successful read
reachablebooleanTrue if last read succeeded
lastErrorstringError from last failed read

In addition, an aggregate device wattcycle.<instance>.total is created (assumes parallel topology):

StateTypeUnitAggregation
socnumber%average
soc_minnumber%minimum
soc_maxnumber%maximum
voltagenumberVaverage
voltage_minnumberVminimum
voltage_maxnumberVmaximum
currentnumberAsum
powernumberWsum
remaining_ahnumberAhsum
total_ahnumberAhsum
design_ahnumberAhsum
cycles_avgnumberaverage
cell_spread_mv_maxnumbermVmaximum
mos_temp_maxnumber°Cmaximum
pcb_temp_maxnumber°Cmaximum
countnumberreachable count
lastUpdatenumberaggregate ts

Messages

// Force an immediate poll cycle
sendTo('wattcycle.0', 'pollNow', null, res => console.log(res));

// Run a BLE scan
sendTo('wattcycle.0', 'scan', { duration: 8000 }, res => console.log(res.devices));

Requirements

  • Linux with BlueZ (apt install bluez libbluetooth-dev).
  • Adapter must be allowed to access the HCI socket (typically run as root or with setcap).
  • Bluetooth adapter must support Bluetooth 5.0 (LE long range).

Changelog

1.0.0 (2026-07-01)

  • (@GermanBluefox) Improved total calculations
  • (@GermanBluefox) Updated packages

0.2.2 (2026-05-07)

  • (@GermanBluefox) Managed timeouts and power off

0.2.1 (2026-05-06)

  • (@GermanBluefox) Use MAC address as a unique identifier bluetooth adapter

0.1.0 (2026-05-05)

  • (@GermanBluefox) Initial version.

License

MIT License

Copyright (c) 2026 bluefox dogafox@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.