Designed & made in France 6K fans on Facebook · Follow us
HOME ASSISTANT8 min readBy the Pylon-Monitor teamUpdated

Pylontech in Home Assistant: MQTT Auto-Discovery or REST

Two ways in, both built into the firmware, neither needing a custom component. How each one works, what you get, and which one to choose.

Short answer: there are two ways to get a Pylontech battery into Home Assistant with Pylon-Monitor, and both are built into the device. If you already run the Mosquitto broker, use MQTT auto-discovery: four fields to fill in, and eleven sensors appear on their own, plus sensors for each battery. If you do not run MQTT, use the REST platform: the device generates the YAML for you, ready to paste. No custom component, no HACS.

Two ways in, both already in the firmware

Search for "Pylontech Home Assistant" and you will find custom components, HACS repositories and YAML copied from forum threads several years old. With Pylon-Monitor there is nothing to install on the Home Assistant side. Both methods read the same data from the battery's Console port, so the choice is not about features. It depends on what you already have running.

Option 1: MQTT auto-discovery (the quick one)

If Home Assistant already runs the Mosquitto broker add-on, as most installs do, use this. Enter the broker's IP address, port, username and password on the device's Settings page and save. About five seconds later, eleven sensors show up under Settings → Devices & Services → MQTT, grouped in one device called Pylon-Monitor. No YAML, no restart, no entities to define by hand.

The eleven sensors are SOC, SOH, voltage, current, power, battery temperature, MOSFET temperature, charge cycles, battery state, cell imbalance and the number of batteries. That last one was added after a customer asked for it: the JSON API always had it, but having it in MQTT saves a separate REST call. With more than one battery, each unit also gets its own sensors (SOC, SOH, cycles, voltage, state), and its model, BMS version and serial number appear as attributes.

There is also an availability topic, backed by an MQTT "last will" message. If the device loses power or WiFi, every sensor turns grey in Home Assistant instead of freezing on its last value. That matters more than it sounds: a frozen SOC that still looks fine is exactly how a low-battery alarm ends up never firing.

Pylon-Monitor Settings page with real MQTT Home Assistant broker configuration fields filled in
Broker IP, port, username, password: that is the whole MQTT setup on the device.
Pylontech master battery panel: the RJ45 cable in the CONSOLE port feeds the Pylon-Monitor, while the stack link cable leaves LINK PORT 1 towards the slave battery
On the master battery: CONSOLE goes to the Pylon-Monitor, LINK PORT 1 goes to the slave battery.
The mistake almost everyone makes: LINK PORT 1, not LINK PORT 0
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.
Tip: create a separate MQTT user for the device (in the Mosquitto add-on configuration or in Home Assistant's People settings) rather than reusing your own login. It takes a minute and lets you revoke the device's access on its own later.

Option 2: REST, if you do not use MQTT

No broker? Home Assistant's built-in rest platform can read the device's /api.json every 30 seconds and create six sensors: SOC, SOH, voltage, current, power and state. You do not have to write the YAML. The device's Settings page generates it with your IP address already filled in, and on recent firmware it also includes the access key the API now asks for. Copy it, paste it into configuration.yaml, restart Home Assistant.

Home Assistant REST YAML configuration block generated automatically by the Pylon-Monitor device for Pylontech sensors
The REST block, generated by the device with the right IP address. Nothing to type from memory.
Home Assistant configuration.yaml editor showing the pasted Pylon-Monitor REST sensor block
Pasted as is into configuration.yaml, no changes needed.
Home Assistant Gauge card configuration with the Pylontech SOC entity selected, showing a live 50% reading
One of the new sensors (Pylontech SOC) on a Gauge card, at 50% here.
Do not use both for the same values. MQTT auto-discovery plus the REST block gives you duplicate entities. Pick one. MQTT already covers everything REST does, plus five more sensors, the per-battery sensors and the availability signal, so there is rarely a reason to combine them.

Which one to choose

Several inverters, several separate stacks? Each stack gets its own Pylon-Monitor, and each one appears as its own device in Home Assistant. A customer with three stacks of eight US2000 asked us exactly that; here is how it works.

What to do with the sensors

New sensors on their own are just numbers on a card. A few automations that make them useful:

What these numbers mean, and which ones deserve a real alarm, is covered in our SOC, SOH and cell spread guide.

Quick troubleshooting

Not using Home Assistant?

All of this relies on the same /api.json endpoint and MQTT topics used for Jeedom, Node-RED, Domoticz and openHAB. This guide covers the other platforms.

Tuya / SmartLife

Tuya and SmartLife only talk to Tuya's own cloud, and there is no official Pylontech integration for them. You can still build an unofficial bridge with IFTTT, Make.com or Apilio, using the public URL the device can publish (Settings > Public JSON access > "Enable a real public URL"). The steps are in our Pylontech monitoring guide, and in our answer to a customer who asked.

Frequently asked questions

Do I need an MQTT broker to use Pylontech in Home Assistant?
No. If you don't run an MQTT broker, Home Assistant's built-in REST platform can poll the device's JSON API directly and create six sensors — no broker required.
How many sensors does Pylontech monitoring give me in Home Assistant?
MQTT auto-discovery creates 11 sensors plus an availability signal. The REST platform creates 6 sensors from the same underlying data. If your pack has more than one Pylontech battery, MQTT also publishes 5 sensors per battery (SOC, SOH, cycles, voltage, state), and the JSON API always exposes a full per-battery breakdown regardless of which integration you use.
Can I use both MQTT and REST at the same time?
You can, but you shouldn't for the same values — it creates duplicate entities. Pick MQTT if you have a broker (it covers everything REST does and more); use REST only if you don't.

Pylon-Monitor comes with both: MQTT auto-discovery and the REST YAML generator are on the device, ready the moment you plug it in.

Order now — €64 One-time purchase, €64 total — no VAT, no subscription.

Join 6,000 Pylon-Monitor fans on Facebook

News, firmware updates, real installations and tips: follow the page and ask your questions to the community.

Follow us on Facebook