WattCycle BLE Batteries

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

Current Release
2.0.1
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.
  • Device manager: every battery as a card with SOC, connection, charge/discharge state, voltage, power and temperature; details with all cells; scan, add, edit, enable/disable and delete batteries.
  • Tile for the devices app and a widget for vis-2, modelled after the WattCycle app (SOC arc, charge state, voltage, current, power, temperature, health and cells).

Visualisation

Devices app

Add a custom widget of the type WattCycle battery and select a battery device (wattcycle.0.batteries.<name>) or wattcycle.0.total for the sum of all batteries.

  • 1x1 – SOC arc and charge state
  • 2x½ – battery bar with voltage, current and power
  • 2x1 – SOC arc together with voltage, current, power and temperature

A click on the tile opens a dialog with everything: health, cells and temperatures.

vis-2

The widget set WattCycle batteries contains the widget Battery. Select the battery device in its settings. The layout follows the size of the widget (bar, compact, wide or full view) or can be fixed in the settings. A click on the smaller layouts opens the full view.

Device manager

The tab Device manager in the instance settings (or the device manager of admin) shows all configured batteries and the total.

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

2.0.2 (2026-10-28)

  • (@GermanBluefox) Fixed the missing translations of the widget set, the widget name and the help in vis-2
  • (@GermanBluefox) Replaced the wrong telegram context in the Copilot instructions and stopped the template check from creating duplicate issues (#70)
  • (@GermanBluefox) Updated packages

2.0.1 (2026-10-14)

  • (@GermanBluefox) Restored the supported platforms (Linux and macOS) in package.json
  • (@GermanBluefox) Added dependabot updates for the GUI parts

2.0.0 (2026-10-14)

  • (@GermanBluefox) Added device manager support
  • (@GermanBluefox) Added a battery tile for the devices app
  • (@GermanBluefox) Added a battery widget for vis-2
  • (iobroker-bot) Adapter requires node.js >= 22 now.
  • (@GermanBluefox) Improved total calculations
  • (@GermanBluefox) Updated packages
  • (@GermanBluefox) Fixed the build (tsconfig for node 22), so 1.0.0 was never published
  • (@GermanBluefox) The adapter does not run in compact mode anymore: the BLE stack of noble keeps its state per process

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

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.