Skip to content

Custom EspHome sensor for reading P1 port on dutch smart meters with ESP module for Home Assistant

Notifications You must be signed in to change notification settings

nldroid/CustomP1UartComponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Note

This component isn't needed anymore because esphome supports the DSMR protocol now in the standard library: DMSR Component

I leave the page online for reference and the hardware info.

CustomP1UartComponent

This is my first custom component for EspHome. It can be used to read DSMR data from the P1 port of dutch smart meters with an ESP module and pubish the result in Home Assistant.

The work is based on these projects:

Hardware

I used a Wemos D1 mini to connect to the P1 port but it will probably work with most ESP boards. You need some kind of hardware inverter because the UART component doesn't support inverting the signal with a software setting. Port 5 from the P1 connector goes to pin 1 (A1) from the 7404. Output pin 2 from the 7404 goes to port D2 on the Wemos. Port D5 from the Wemos is connected to port 2 from the p1 connector. This is used to request a message from the meter. R1 is needed for my Iskra meter. It won't send any telegrams when it's not there.

Schema

Schema

Example bread board

Bread board

Software

Just add the .h file in your config folder and see the .yaml file for usage

Limitations

The software is only usable for meters with 8N1 serial communication. This is the case for newer dsmr protocols. Older procols use 7E1. You can change the software and shift the char one bit (c &= ~(1 << 7);). Real old dsmr protocols don't have a CRC at the end of a telegram and the dsmr parser that i use, doesn't support these old protocols.

Experimental board with case

Board case

About

Custom EspHome sensor for reading P1 port on dutch smart meters with ESP module for Home Assistant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages