What you need

The cable that chains your master battery to the first slave must leave LINK PORT 1 on the master — never LINK PORT 0. It plugs into LINK PORT 0 on the slave, and every further battery repeats the same 1 → 0 pattern. Wired the other way round the master never sees the rest of the stack, so Pylon-Monitor reports a single battery no matter how many you own.
Choose your integration
Both options are set up from the device's Settings page (http://pylon-monitor.local/settings or http://<DEVICE-IP>/settings). Pick one — they are independent.
MQTT auto-discovery
You run the Mosquitto broker in Home Assistant. The Pylon-Monitor announces its own sensors and Home Assistant creates them automatically. No YAML.
Set up option 1 ↓REST API
No broker needed. Home Assistant reads the built-in JSON endpoint /api.json directly. The device's Settings page writes the YAML for you, with your IP and your number of batteries already filled in.
pylon-monitor.local are shown at the bottom of the screen. On the Lite (no screen), open http://pylon-monitor.local, or look for “pylon-monitor” in your router's list of connected devices. For a rock-solid integration, give it a fixed address: a DHCP reservation in your router (recommended) or the Static IP card on the Settings page.Option 1 — MQTT auto-discovery
Recommended if you use the Mosquitto broker add-on in Home Assistant. As soon as the device is connected to the broker, it publishes standard discovery messages on homeassistant/sensor/… and the sensors appear under Settings → Devices & services → MQTT within seconds, grouped under a single device called Pylon-Monitor.
1. Fill in 4 fields on the device
On the device's Settings page, find the Home Assistant — MQTT card and fill in these fields (labels exactly as the device shows them):
Click Save changes. A few seconds later the Home Assistant (MQTT) line of the device's dashboard shows Connected and the sensors below are created — no entity to configure by hand. To turn MQTT off, empty Broker IP and save.
mqtt-pylon) and use it here rather than your own administrator login. The broker IP is simply your Home Assistant's IP when Mosquitto runs on it.2. The sensors Home Assistant creates
The device name (default pylon-monitor, changeable in Settings) is used as the topic prefix. If you changed it, replace pylon-monitor below with yours.
| Sensor in Home Assistant | Discovery topic | Unit / type |
|---|---|---|
| Battery SOC | homeassistant/sensor/pylon-monitor/soc/config | % · battery |
| Battery SOH | homeassistant/sensor/pylon-monitor/soh/config | % · mdi:battery-heart-variant |
| Battery voltage | homeassistant/sensor/pylon-monitor/voltage/config | V · voltage |
| Battery current | homeassistant/sensor/pylon-monitor/current/config | A · current |
| Battery power | homeassistant/sensor/pylon-monitor/power/config | W · power |
| Battery temp | homeassistant/sensor/pylon-monitor/temp/config | °C · temperature |
| MOSFET temp | homeassistant/sensor/pylon-monitor/mostemp/config | °C · temperature |
| Charge cycles | homeassistant/sensor/pylon-monitor/cycles/config | mdi:counter |
| Battery state | homeassistant/sensor/pylon-monitor/state/config | mdi:battery-sync |
| Cell imbalance | homeassistant/sensor/pylon-monitor/celldelta/config | mV · mdi:scale-balance |
| Battery count | homeassistant/sensor/pylon-monitor/units/config | mdi:battery-multiple |
All of them read their value from a single retained state topic, refreshed after every battery reading:
pylon-monitor/state
The combined payload looks like this:
{
"soc": 94,
"soh": 96,
"voltage": 48.62,
"current": -7.20,
"power": -350.1,
"temp": 23.4,
"mostemp": 28.1,
"cycles": 486,
"celldelta": 12,
"units": 2,
"state": "Discharging",
"hw": "gen2",
"pack": "lv"
}
3. Several batteries? One sensor set per battery
As soon as your pack has more than one Pylontech battery, the device also creates 5 sensors per battery — Battery 1 SOC, Battery 1 SOH, Battery 1 cycles, Battery 1 voltage, Battery 1 state, then Battery 2, 3… — each on its own topic (pylon-monitor/battery1/state, pylon-monitor/battery2/state…). Ideal for spotting the one battery that ages faster than the others.
pylon-monitor/battery1/state
{ "voltage": 48.61, "current": -3.60, "power": -175.0, "soc": 94, "soh": 97,
"cycles": 480, "charge_cnt": 391, "discharge_cnt": 0, "state": "Discharging",
"model": "US3000C", "bms_sw": "…", "serial": "…",
"cell_min_mv": 3238, "cell_max_mv": 3247, "cell_delta_mv": 9, "cell_count": 15 }
These sensors also carry attributes, visible in each sensor's detail view: battery model, BMS version, serial number and — once the cells have been read — lowest and highest cell voltage and the gap between them. That's how you tell “Battery 3” from “Battery 4” without extra entities.
The device also keeps an availability topic with a Last Will: if it loses power or WiFi, every sensor turns “unavailable” in Home Assistant instead of silently freezing on its last value.
pylon-monitor/status → "online" (retained) | "offline" (Last Will, retained)
Option 2 — REST API
No MQTT broker needed. Home Assistant's built-in rest integration reads the device every 30 seconds. Easiest: copy the block from the Home Assistant — REST card of the device's Settings page — it already contains your IP and one SOH + cycles pair for every battery actually detected. The version below is the same template for a 2-battery pack. Since firmware 3.4.0 (Lite 1.1.0, generation 1: 3.1), /api.json requires your access key — the block copied from the device already contains ?key=…. If you set up REST before updating, add ?key=<your Access key> (Settings → Public JSON access) to the resource: line. MQTT is not affected.
The JSON returned by the device
GET http://<DEVICE-IP>/api.json?key=<ACCESS-KEY>
{
"system": "pylon-monitor",
"firmware": "3.3.2",
"hw": "gen2",
"battery_link": true,
"summary": {
"soc": 94,
"voltage": 48.62,
"current": -7.20,
"power": -350.10,
"state": "Discharging",
"units": 2
},
"health": {
"soh": 96,
"cycles": 486,
"charge_cnt": 782,
"discharge_cnt": 0
},
"unitsDetail": [
{ "soc": 94, "soh": 97, "cycles": 480, "model": "US3000C", "...": "..." },
{ "soc": 94, "soh": 95, "cycles": 492, "model": "US3000C", "...": "..." }
]
}
Trimmed for readability: the full response also contains temps, cells, alarms and net, and unitsDetail gives voltage, current, SOC, SOH, cycles, model and serial number for each battery (present when the pack has more than one). Careful: SOH is under health, not under summary — a classic copy-paste mistake.
Paste this into configuration.yaml
# Access key: device Settings > Public JSON access (required since
# firmware 3.4.0 / Lite 1.1.0 / gen. 1 3.1). The block generated by the
# device's own Settings page already contains it.
rest:
- resource: http://<DEVICE-IP>/api.json?key=<ACCESS-KEY>
scan_interval: 30
sensor:
- name: "Pylontech SOC"
unique_id: pylontech_soc
value_template: "{{ value_json.summary.soc }}"
unit_of_measurement: "%"
device_class: battery
state_class: measurement
- name: "Pylontech SOH"
unique_id: pylontech_soh
value_template: "{{ value_json.health.soh }}"
unit_of_measurement: "%"
state_class: measurement
- name: "Pylontech Voltage"
unique_id: pylontech_voltage
value_template: "{{ value_json.summary.voltage }}"
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
- name: "Pylontech Current"
unique_id: pylontech_current
value_template: "{{ value_json.summary.current }}"
unit_of_measurement: "A"
device_class: current
state_class: measurement
- name: "Pylontech Power"
unique_id: pylontech_power
value_template: "{{ value_json.summary.power }}"
unit_of_measurement: "W"
device_class: power
state_class: measurement
- name: "Pylontech State"
unique_id: pylontech_state
value_template: "{{ value_json.summary.state }}"
# One SOH + cycles pair per battery (only on a pack of 2 or more):
- name: "Pylontech Battery 1 SOH"
unique_id: pylontech_battery1_soh
value_template: "{{ value_json.unitsDetail[0].soh }}"
unit_of_measurement: "%"
state_class: measurement
- name: "Pylontech Battery 1 cycles"
unique_id: pylontech_battery1_cycles
value_template: "{{ value_json.unitsDetail[0].cycles }}"
state_class: measurement
- name: "Pylontech Battery 2 SOH"
unique_id: pylontech_battery2_soh
value_template: "{{ value_json.unitsDetail[1].soh }}"
unit_of_measurement: "%"
state_class: measurement
- name: "Pylontech Battery 2 cycles"
unique_id: pylontech_battery2_cycles
value_template: "{{ value_json.unitsDetail[1].cycles }}"
state_class: measurement
Restart Home Assistant (Developer tools → Restart). The sensors appear under Settings → Devices & services → Entities — search for pylontech.
Energy dashboard
For a battery, Home Assistant's Energy dashboard wants two counters in kWh: energy charged in and energy discharged out. The Pylon-Monitor provides the battery power in W (positive = charging, negative = discharging), so you create them once, with helpers:
- Split the power in two with two template sensors: charge power = the positive part, discharge power = the negative part turned positive.
- Turn each one into kWh with an Integral helper (Riemann sum), metric prefix “k”, method “Left”.
- In Settings → Dashboards → Energy, under Battery storage, add the two counters: energy going in, energy going out.
The same in YAML (MQTT entity names; with option 2 use sensor.pylontech_power):
template:
- sensor:
- name: "Battery charge power"
unique_id: pylontech_charge_power
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: "{{ [states('sensor.pylon_monitor_battery_power') | float(0), 0] | max }}"
- name: "Battery discharge power"
unique_id: pylontech_discharge_power
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: "{{ [0 - (states('sensor.pylon_monitor_battery_power') | float(0)), 0] | max }}"
sensor:
- platform: integration
source: sensor.battery_charge_power
name: "Battery energy in"
unique_id: pylontech_energy_in
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.battery_discharge_power
name: "Battery energy out"
unique_id: pylontech_energy_out
unit_prefix: k
round: 2
method: left
Check the exact name of your power sensor in Settings → Entities (search for “power”): it differs if you renamed the device or have several Pylon-Monitors.
Automation generator
Pick what to watch, set the threshold, choose what happens: the YAML is written for you with the real Pylon-Monitor sensor names. The default is the classic one, a notification when the battery drops below 20 %.
What to watch
Threshold
Then
In Home Assistant: Settings › Automations & scenes › Create automation › ⋮ › Edit in YAML, paste, Save.
Same idea with Battery state, Cell imbalance (for example above 50 mV) or sensors staying unavailable for more than 10 minutes — the sign the device is offline.
Node-RED, Jeedom and others
Node-RED — an http request node, method GET, URL http://<DEVICE-IP>/api.json?key=<ACCESS-KEY>, return “a parsed JSON object”, then read msg.payload.summary.soc (or any other field). With MQTT set up, an mqtt in node on pylon-monitor/state is even simpler: no polling.
Jeedom — install the JSON plugin, point a device at http://<DEVICE-IP>/api.json?key=<ACCESS-KEY> and map paths to commands (e.g. summary>soc, summary>voltage, summary>state).
Anything else — openHAB, ioBroker, Domoticz, EVCC or your own scripts: anything that reads MQTT or an HTTP JSON endpoint works with the same topics and the same /api.json.
Questions
Does it work with the Lite (no screen)?
Yes. MQTT auto-discovery and the REST API are part of the firmware of every model: with screen, Lite, first and second generation. Only the way you find the IP changes: pylon-monitor.local or your router's device list.
My REST sensors became unavailable after a firmware update — why?
Since firmware 3.4.0 (Lite 1.1.0, generation 1: 3.1) the device asks for a password you create on first access, and <code>/api.json</code> needs your access key — European cybersecurity rules for connected devices (RED directive, EN 18031) now require every device to be protected. Open the device once in a browser to create your password, then add <code>?key=<Access key></code> (<em>Settings → Public JSON access</em>) to your <code>resource:</code> line and restart Home Assistant. MQTT sensors keep working unchanged.
Do I need internet or the Pylon-Monitor Cloud?
No. Home Assistant talks to the device directly on your local network. The free Cloud is optional: it only adds remote access and long-term history.
I have several batteries: do I see each one?
Yes. With MQTT the device creates 5 sensors per battery (SOC, SOH, cycles, voltage, state), with model and serial number as attributes. With REST, the generated YAML adds SOH and cycles for each battery.
How often are the values refreshed?
After every battery reading: every 60 seconds by default, adjustable from 30 to 300 seconds with the Battery polling setting on the Settings page. With REST, Home Assistant polls every 30 seconds.
My sensors show “unavailable”: what should I check?
That's the availability signal doing its job: the device is no longer connected to the broker (power cut, WiFi, broker restarted). Open the device's page: the Home Assistant (MQTT) line shows Connected or Offline. It retries on its own every 10 seconds.
Can Home Assistant control the battery?
No, on purpose: the integration only exposes read-only sensors. Nothing in Home Assistant can change a setting of your battery or its BMS.
Do I need HACS or a custom integration?
No. MQTT auto-discovery and the REST integration are built into Home Assistant itself. The only thing to install is the Mosquitto add-on, and only if you choose MQTT.
No Pylon-Monitor yet?
Plug it into the CONSOLE port, connect it to your WiFi, and your Pylontech shows up in Home Assistant. V2 with screen €59, Lite without screen €49.
In-depth MQTT & REST guide →