Automations

How to connect P1 meter to Home Assistant?

Connect a DSMR smart meter's P1 port to Home Assistant using a USB cable, a Wi-Fi reader or a HomeWizard meter, with the right DSMR settings.

On this page
  1. What the P1 port is
  2. Check your DSMR version
  3. Option 1: a USB P1 cable
  4. Option 2: a Wi-Fi or Ethernet reader
  5. Option 3: a HomeWizard P1 meter
  6. Belgian meters
  7. Tariff numbers differ by country
  8. What you get
  9. Safety

Connect your meter’s P1 port to Home Assistant in one of three ways: with a P1-to-USB cable and the DSMR Smart Meter integration, with a Wi-Fi or Ethernet reader, or with a HomeWizard P1 meter. Each route gives you local readings. Choose the one that suits where your Home Assistant host sits.

What the P1 port is

The P1 port is the data port on DSMR smart electricity meters. These are common in the Netherlands, and some Belgian and Luxembourg meters have one too. The port uses an RJ12 (6P6C) connector. It is read-only: it sends readings out and cannot change any settings on the meter. Use the P1 port for this, and no other port.

Check your DSMR version

The DSMR version sets the speed and serial settings of the data stream. You choose the version in Home Assistant, and it has to match your meter.

DSMR version Telegram interval Serial settings
DSMR 5 Every second 115200 baud, 8N1
DSMR 4 Every 10 seconds 115200 baud, 8N1
DSMR 2.2 Every 10 seconds 9600 baud, 7E1

If you do not know which version your meter uses, ask your grid operator or check the meter’s documentation.

Option 1: a USB P1 cable

This is the cheapest route. The catch is that the Home Assistant host has to sit close enough to the meter for the cable to reach.

  1. Get a P1-to-USB cable with an RJ12 plug, rated for DSMR 4 or DSMR 5.
  2. Plug the RJ12 end into the meter’s P1 port and the USB end into the Home Assistant host.
  3. Go to Settings > Devices & services, select Add integration, and choose DSMR Smart Meter.
  4. Pick the serial port and the DSMR version.

Serial port names usually start with /dev/serial/by-id/, followed by the adapter’s name. Pick the one that matches your cable.

A DSMR 5 meter can power a cable from the port. Older meters do not always supply enough power. If you are unsure, choose a cable with its own USB power lead.

Option 2: a Wi-Fi or Ethernet reader

If your Home Assistant host is far from the meter cupboard, use a network reader.

  • A DIY reader built with ESPHome can use the ESPHome dsmr component. It sends the data to Home Assistant over your network.
  • The DSMR Smart Meter integration can also connect over the network, using a host and port. A serial-to-network bridge, such as ser2net, can provide that connection.

Small readers may need their own power supply, because the port supplies only a small current. Check the reader’s documentation.

Option 3: a HomeWizard P1 meter

In the HomeWizard Energy app, enable Local API. Then add the HomeWizard integration in Home Assistant. The readings arrive over your local network.

Belgian meters

When you set up the DSMR integration for a Belgian meter, choose DSMR version 5B. The P1 port may need to be activated first. Some grid operators, such as Fluvius in Flanders, handle this through a customer portal, so check with yours.

Tariff numbers differ by country

Tariff numbers mean different things in each country. In the Netherlands, tariff 1 is the low rate. In Belgium, tariff 1 is usually the day rate. Check your meter’s tariff details before you build an automation that depends on them.

What you get

Once the integration is running, you typically get:

  • energy consumed and returned, for each tariff
  • current power
  • voltage for each phase
  • gas readings, if your meter reports gas

Gas readings come less often than electricity readings, so the gas figure can lag behind.

To add these sensors to the Energy dashboard, go to Settings > Dashboards > Energy. Select the consumption and return sensors for each tariff, plus your gas meter.

To turn these readings into daily or monthly totals, see how to track energy use with the utility meter. For the wider list of things Home Assistant can track, see what you can do with a Home Assistant.

Safety

Only connect to the P1 port. Never open the meter. It is the grid operator’s property and carries mains voltage. If you buy a cable or reader, choose one from a reputable seller and confirm it is rated for your DSMR version.

The complete guide to automations

Home Assistant Automations: Services, Actions and REST Commands
Read the guide

Keep exploring

Guides from other topics

All topics →