How add 'slimme meter' via AMA0 connector Rpi

In the next lines I show you how to connect your HA to the ‘slimme meter’ with a small piece of hardware and small extra configuration ‘under’ HA.

First of all you need to make the next hardware:

Second we have to change a few params in the next files:
/etc/config.txt

# Activate UART for 'slimme meter' 
dtoverlay=pi3-disable-bt
enable_uart=1

/etc/cmdline.txt

# remove any console command like;
console=ttyAMA0,115200
console= xx

/etc/suoers.d

# Give the user homeassistant enough (hw) rights
in bottom of file;
pi ALL=(ALL) NOPASSWD: ALL
homeassistant ALL=(ALL) NOPASSWD: ALL

As last to do; make the homeassisant user member of the dialout group

sudo usermod -a -G dialout homeassistant

REBOOT the Raspberry Pi

Check in the shell if you can see the telegram data from the ‘slimme meter’ with the next command:

cu -l /dev/ttyAMA0 -s 115200 --parity=none -E q

If you see the next strings after a few seconds … then you hardware is talking to you in the Rpi.

Connected.
/Ene5\XS210 ESMR 5.0
1-3:0.2.8(50)
0-0:1.0.0(171105201324W)
0-0:96.1.1(4530303437303030303037363330383137)
1-0:1.8.1(000051.775*kWh)
1-0:1.8.2(000000.000*kWh)
1-0:2.8.1(000024.413*kWh)
1-0:2.8.2(000000.000*kWh)
0-0:96.14.0(0001)
1-0:1.7.  etc. etc.

The last steps with the configuration issues in HA
You can place all the commands in the configurations.yaml or in the dependent files sensors.yaml and groups.yaml

sensors.yaml

sensor:
- platform: dsmr
   port: /dev/ttyAMA0 
   dsmr_version: 4     # Check your hardware type of 'slimme meter' 

groups.yaml

 group:
   meter_readings:
      name: Meter readings
        entities:
          - sensor.power_consumption_low
          - sensor.power_consumption_normal
          - sensor.power_production_low
          - sensor.power_production_normal
          - sensor.gas_consumption

Used links:

 http://domoticx.com/p1-poort-slimme-meter-hardware/
 https://willem.aandewiel.nl/index.php/2019/02/11/home-assistant-integratie-met-de-dsmr-logger/
 http://gejanssen.com/howto/Slimme-meter-uitlezen
1 Like

To play it safe, you should be connecting the top resistor to the 3.3V rail, not 5V.
The Pi GPIO pins are not 5V compatable, and have no internal protection.

Hi,
I have same hardware config as “scdhome” describes but on a RPI4.
I was able to read my meter from ttyS0 till a few days ago, while I had my home assistant on a raspian. Then supervisor suddenly (after update) stopped working. unfortunately I do not have enough knowledge to solve the issue. So I decided to switch to complete HassOS. to be able to boot from USB/SSD I have installed HassOS 5.4.
The issue i’m facing right now is that I can’t find the config.txt. I do not have /boot directory and not the file under /etc.
any idea? any help is appriciated.

Update:
Already SOLVED!