Knowledge base / Protocols / Modbus in the home: heat pumps, inverters and meters
Modbus in the home: heat pumps, inverters and meters
What Modbus is, how RTU and TCP work, which home devices speak it and how to read a heat pump or solar inverter with Home Assistant.

In short
- Modbus dates from 1979 and is free to use: the specification is free to download and there are no licence fees1.
- Modbus TCP runs over standard Ethernet on port 5021.
- On an RS-485 serial line, valid device addresses are 1 to 247, and the typical limit is 32 devices on one bus3.
- Home Assistant can read Modbus devices by hand in YAML; the default polling interval is 15 seconds2.
- Some solar inverters accept only one Modbus connection at a time6.
Modbus is an old, simple industrial protocol that many heat pumps, solar inverters and energy meters still use. It lets another device read values such as power or temperature and, sometimes, change settings. It is not a protocol for lights and switches, but it is very useful for energy management.
What Modbus is
Modbus is a way for one device (the client) to ask another device (the server) for values 1. It was introduced by Modicon, now part of Schneider Electric, in 1979 1. The Modbus Organization, an independent non-profit, looks after it. The specification is free to download and there are no licence fees for Modbus or Modbus TCP/IP 1. A TCP/IP version followed in 1999 1.
Older documents, and some current manuals, call the roles “master” and “slave” 4. The Modbus Organization uses client and server 1.
How Modbus works
Registers
A Modbus device exposes its data as numbered registers. Coils and discrete inputs are single bits (on or off). Input registers are read-only numbers, such as a temperature. Holding registers can be read and written, such as a set point 2. You need the manufacturer’s register list to know which number means what. Home Assistant counts addresses from 0. Some manuals count from 1, or write 40001 for the first holding register, so you may need to subtract one 2.
Modbus RTU: the serial version
RTU sends messages over an RS-485 cable, a twisted pair that runs from device to device 3. Key rules:
- Valid addresses are 1 to 247, and each device needs a unique one 3.
- One client per RS-485 network 3.
- The typical limit is 32 devices on one bus 3.
- All devices need the same baud rate, stop bits and parity 3.
- The cable needs termination: a 120 ohm resistor at the end 34. Loxone says the maximum bus length depends on the baud rate and never exceeds 1,200 m 4.
Modbus TCP: over the network
Modbus TCP wraps the same messages in TCP/IP and sends them over standard Ethernet on port 502 1. An old serial device needs a gateway to join the network 1. Home Assistant also supports “RTU over TCP”, where a serial device server passes the serial data through unchanged 2.
Central or decentral
Modbus has no hub and no pairing. One client polls the devices. That client can be a Home Assistant server, a Loxone Miniserver or a PLC (an industrial controller) 24.
What it needs in the meter cupboard
Modbus is often already inside the equipment, and you only need to connect it:
- RS-485 wiring from the heat pump or inverter to an adapter or gateway.
- An Ethernet port with Modbus TCP, if the device has one. Check the manual. Some solar inverters need Modbus TCP switched on in the settings 6.
- A gateway that turns RS-485 into Ethernet or Wi-Fi. For Huawei inverters, the community huawei_solar project lists several ready-made RS-485 to Wi-Fi or Ethernet bridges, or a USB RS-485 adapter on the Home Assistant server 7.
Connecting to the inverter or heat pump terminals involves live equipment. Have a certified installer do it 4.
Cost level
Modbus itself is free 1. Your cost is the gateway or adapter, any installer time and, on some devices, a Modbus option from the manufacturer. Check with the maker or installer whether your model offers Modbus as standard or as a paid option.
Who can install it
Wiring RS-485 to equipment is for a certified installer. Setting up the connection in Home Assistant can be done by a careful owner. Some manufacturers require an installer account to enable local access. For Huawei inverters, enabling Modbus TCP over the inverter’s own network connection needs an installer account 7.
Openness and lock-in
Modbus is open and free 1. The weak point is not the protocol but the register list. Every manufacturer defines its own register map, and it can change with a firmware update. A device that supports Modbus can still be locked down by a manufacturer who does not publish the list. Check before you buy.
Pros and cons
Good at
- Free, open, simple and widely supported in energy equipment 1.
- Local: no cloud account needed 6.
- Gives you raw values from the device itself, for example inverter power or lifetime energy 6.
Less good at
- No discovery: you must enter registers by hand 2.
- Every brand has its own register list.
- Some devices accept only one connection at a time, so a second tool can block Home Assistant 6.
- Writing a wrong value can upset your heating or inverter.
When it fits
Modbus fits when you want local, detailed data from a heat pump, an inverter, a battery or a kWh meter. It is an add-on for energy management in any home, new or existing. It is not a basis for a lighting and blinds system: use KNX, Loxone or a wireless system for that.
Modbus and Home Assistant
- Ready-made integrations exist for some devices. The Stiebel Eltron integration talks Modbus over your network to the heat pump’s ISG web gateway and polls every 30 seconds 5. The KACO Modbus integration reads SunSpec inverters over Modbus TCP on port 502 and also polls every 30 seconds. It notes that the inverter accepts only one connection at a time 6.
- Generic Modbus integration: use it when no ready-made integration exists. You define hubs (TCP, RTU over TCP, UDP or serial) and entities in YAML 2. Each entity has a register address, a data type, a scale factor and a polling interval, which defaults to 15 seconds 2. You can also write values with actions such as
modbus.write_register2. - Energy dashboard: the generic integration lets you set a
state_classand unit on each sensor 2, and the KACO integration provides a lifetime energy sensor that can feed the Energy dashboard 6.
Start with read-only sensors. Add write actions only after you have tested them.
What this means for your home
If you have a heat pump, solar inverter or battery, check in the manual whether it offers Modbus, and whether it needs a paid option or an installer to enable it. The P1 port gives you your grid data, and Modbus gives you what happens behind the meter. Together they are the base of most local energy dashboards.
Questions
Is Modbus a smart home protocol?
Not really. It is an industrial protocol for reading and writing values in a device. Heat pumps, inverters and energy meters use it, but it has no pairing or device discovery for lights and switches12.
What is the difference between Modbus RTU and Modbus TCP?
RTU sends the messages over a serial RS-485 cable. TCP sends the same messages over your network. A gateway can convert between them123.
Do I need a Modbus gateway?
If your device has an Ethernet or Wi-Fi port with Modbus TCP, no. If it has only an RS-485 terminal, you need an RS-485 adapter or a gateway27.
Can I damage my heat pump or inverter with Modbus?
Yes, if you write the wrong value to a register. Start with read-only values, and check the manufacturer's register list before you write anything. Mains and heat pump wiring is work for a certified installer.
Sources
- What is Modbus? (FAQ), Modbus Organization. Accessed 30 November 2026.
- Modbus integration, Home Assistant. Accessed 30 November 2026.
- Modbus RTU (EMpro help), Phoenix Contact. Accessed 30 November 2026.
- Modbus Extension, Loxone. Accessed 30 November 2026.
- STIEBEL ELTRON integration, Home Assistant. Accessed 30 November 2026.
- KACO Modbus integration, Home Assistant. Accessed 30 November 2026.
- Connecting to the inverter (huawei_solar wiki), GitHub, wlcrs. Accessed 30 November 2026.
Your home measures what it uses and produces, knows tomorrow's power prices and moves heavy users to the best hours. You set the rules once, we configure them with you.See the solution


