Skip to content

Use your Smart meter with Home Assistant

Today, almost every household has a smart meter. These meters are also referred to as DSMR P1. Using a smart meter eliminates the need for energy suppliers to come and take meter readings. On these smart meters is a connection that also allows you to read the meter yourself. This connection is also called the P1 port. An RJ12 plug you probably know from a telephone cable fits into this port.

Gas consumption also often visible

Most households today also have a smart gas meter. In this case, the gas meter has a wireless connection to the smart electricity meter. It may also be that the gas meter is connected to the electricity meter via a cable.

You can also read your smart meter yourself with Raspberry Pi via Home Assistant. This allows you to see exactly how much energy and gas you use and how you can save on your energy costs.

In this post, I explain how you can easily connect your smart meter to Home Assistant.

What do you need?

There are several Raspberry Pi versions available. The latest version is a Raspberry Pi 4. I assume you already have Home Assistant installed. If you haven’t installed Home Assistant yet, do so first. There are several manuals online that you can use.

Step 1: Connect the Smart Meter Gateway to your WiFi network

Install the wireless wifi gateway according to the enclosed manual. It can also be found on Smart Gateways’ support page.

Step 2: Pair the smart meter wifi gateway with Home Assistant

Install the DSMR integration in Home Assistant. Go to Settings -> select Add Integration and look for DSMR Smart Meter.

Select Network from the list. Enter the ip address of the gateway and port 23. Specify the dsmr version of the meter. For Dutch meters, this is 2, 4 or 5. For Belgian meters, this is 5B. For Swedish meters the version is 5S.

Select SAVE. The smart meter is linked.

  • SONOFF ZBBRIDGE ZigBee Bridge
    SONOFF ZBBRIDGE ZigBee Bridge
    27,95
  • SONOFF NSPanel Smart Scene Wall Switch (86/EU Type)
    SONOFF NSPanel Smart Scene Wall Switch (86/EU Type)
    Product on sale
    56,95
  • Sonoff ZigBee 3.0 USB Dongle Plus (EFR32MG21)
    Sonoff ZigBee 3.0 USB Dongle Plus (EFR32MG21)
    29,95
  • Zigbee led dimmer - Geschikt voor alle A-merken afdekmateriaal
    Zigbee led dimmer – Geschikt voor alle A-merken afdekmateriaal
    Product on sale
    53,95

Now it is still important to indicate the correct sensor values in the Energy Dashboard settings. On the right side of the screen, click Energy. Next, select High Tariff Usage

Select High tariff usage here and enter the price if necessary.

Do the same for Low tariff usage. If you have solar panels, please also indicate this in Return to grid.

The energy dashboard will now process the data from the smart meter. It may take an hour before the first data is visible.

Step 3: Add the new data (devices) to Home Assistant

The smart meter will create a number of devices within Home Assistant. You can add these as follows:

  • Go to Configuration -> Integrations. If all went well, the following image is displayed:

The image above is a small selection from the values provided. Energy consumption can be displayed in a nicer way.

This can be done, for example, in the following way:

  • At the top of the Home Assistant Dashboard, click on the 3 dots and choose “Edit Dashboard”
  • At the bottom of the screen, click on “+ ADD CARD”
  • Select “Manual” at the bottom of the list, the following screen appears:
  • If necessary, use the following content:
type: gauge
entity: sensor.power_consumption
max: 4
min: 0.1
name: Current Power
severity: null
green: 0.5
red: 1.2
yellow: 0.8
  • Click SAVE. The meter is now displayed.

If you click on the meter you will see nice graphs that also show historical consumption.

Of course, you can also perform the above steps to visualize gas consumption.

If you have followed all the steps, you can now read your smart meter and start saving on your energy costs. You can do this by replacing your light bulbs with Led bulbs, turning off appliances in standby mode automatically, switching your lamps automatically, etc.

Keep a close eye on the charts and note for yourself when you have made an adjustment. That way you can properly compare whether you are saving money with that adjustment.

  • S0 WiFi Gateway voor tussenmeters met pulsuitgang volgens DIN EN 62053-31
    S0 WiFi Gateway voor tussenmeters met pulsuitgang volgens DIN EN 62053-31
    54,95
  • WarmteNet WiFi Gateway voor stadsverwarming van Eneco, Nuon en Vattenfall
    WarmteNet WiFi Gateway voor stadsverwarming van Eneco, Nuon en Vattenfall
    49,95
  • gasmeter gateway home assistant mqtt domoticz homey
    Gasmeter Gateway
    59,95
  • Smart Water Meter Gateway
    Smart Water Meter Gateway
    59,95