ESPHome powered P1 meter (2024)

For a long time I was avoiding ESPHome on my esp-based P1 readers. Not that it’s bad, au contraire, I love it. It was my lack of knowledge in getting it to work. I tried it, didn’t work, so I “left it on the shelf”.

Until now …

Esp-link was for me the best way. It’s exactly the same thing as an USB cable, only via tcp. Personally I keep using tcp, as I use dsmr-reader as main logging tool. For many I’ve noticed that Home Assistant is enough (and that’s fine). For those I wanted a better/easier way to connect the reader to Home Assistant.

Luckily an important person within the Home Assistant team pointed to nldroid on GitHub who had it working the way I wanted it the first time. He has made a custom component CustomP1UartComponent. He explained it perfectly and without issues it worked straight away 😃

You need the library dsmr_p1_sensor.h and the configuration (all documented on his GitHub).

The config yaml:

esphome: name: esp_dsmr platform: ESP8266 board: d1_mini includes: - dsmr_p1_uart.h libraries: - "Dsmr"wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "esp_dsmr_uart Fallback Hotspot" password: ""captive_portal:# Enable logginglogger: level: DEBUG esp8266_store_log_strings_in_flash: False# Enable Home Assistant APIapi: password: ""ota: password: "" uart: - rx_pin: D2 baud_rate: 115200 id: uart_bus sensor: - platform: custom lambda: |- auto dsmr_p1_sensor = new CustomP1UartComponent(id(uart_bus)); App.register_component(dsmr_p1_sensor); return {dsmr_p1_sensor->s_energy_delivered_tariff1, dsmr_p1_sensor->s_energy_delivered_tariff2, dsmr_p1_sensor->s_energy_returned_tariff1, dsmr_p1_sensor->s_energy_returned_tariff2, dsmr_p1_sensor->s_power_delivered, dsmr_p1_sensor->s_power_returned, dsmr_p1_sensor->s_voltage_l1, dsmr_p1_sensor->s_voltage_l2, dsmr_p1_sensor->s_voltage_l3, dsmr_p1_sensor->s_current_l1, dsmr_p1_sensor->s_current_l2, dsmr_p1_sensor->s_current_l3, dsmr_p1_sensor->s_power_delivered_l1, dsmr_p1_sensor->s_power_delivered_l2, dsmr_p1_sensor->s_power_delivered_l3, dsmr_p1_sensor->s_power_returned_l1, dsmr_p1_sensor->s_power_returned_l2, dsmr_p1_sensor->s_power_returned_l3, dsmr_p1_sensor->s_gas_device_type, dsmr_p1_sensor->s_gas_valve_position, dsmr_p1_sensor->s_gas_delivered}; sensors: - name: "Consumption Low Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Consumption High Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Return Low Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Return High Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Actual Consumption Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Actual Delivery Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Instant Voltage L1 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Voltage L2 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Voltage L3 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Current L1 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Instant Current L2 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Instant Current L3 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Power Delivered L1 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Delivered L2 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Delivered L3 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L1 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L2 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L3 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Gas device type Sensor" - name: "Gas valve position Sensor" - name: "Gas Meter M3 Sensor" unit_of_measurement: m3 accuracy_decimals: 3 

Adding TCP server functionality

Ok, it is working perfectly, still I wanted the option to connect via TCP/Telnet. Luckily I had a component seen on GitHub from Oxan van Leeuwen. He made a custom component stream_server.cpp and stream_server.h.

The needed config is shown below:

esphome: # ... includes: - stream_server.h - stream_server.cppuart: id: uart_bus # ... custom_component: - lambda: |- auto stream_server = new StreamServerComponent(id(uart_bus)); return {stream_server};

So, can those two be combined?

Yes it can 🥳

I ran in to some “issues”. Like WiFi settings. I wanted it to be plug & play, so no WiFi config and starting with Hotspot. Connect to the Hotspot, and there join it to your own wireless network. The ssid couldn’t be empty, so for formality I entered there “dummy_ssid”. A non existing network. Therefor it wil start automatically the hotspot after several tries (which will fail as the network doesn’t exist).

Update 15 December 2020:

It seems that if you’re not using ssid, but network (with no network defined) that it goes straight into hotspot (jay, success!). Yet now it is not showing the list of scanned networks, only the option to fill in the ssid and password/secret.

The code as it is now:

esphome: name: de_slimme_meter platform: ESP8266 board: d1_mini includes: - dsmr_p1_uart.h - stream_server.h - stream_server.cpp libraries: - "Dsmr"wifi: networks: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "De Slimme Meter" password: ""captive_portal:web_server: port: 80 # Enable logginglogger: level: DEBUG esp8266_store_log_strings_in_flash: False# Enable Home Assistant APIapi: password: ""ota: password: ""uart: - rx_pin: D7 baud_rate: 115200 id: uart_p1 - tx_pin: D0 rx_pin: D1 baud_rate: 115200custom_component: - lambda: |- auto stream_server = new StreamServerComponent(id(uart_p1)); return {stream_server};sensor: - platform: custom lambda: |- auto dsmr_p1_sensor = new CustomP1UartComponent(id(uart_p1)); App.register_component(dsmr_p1_sensor); return {dsmr_p1_sensor->s_energy_delivered_tariff1, dsmr_p1_sensor->s_energy_delivered_tariff2, dsmr_p1_sensor->s_energy_returned_tariff1, dsmr_p1_sensor->s_energy_returned_tariff2, dsmr_p1_sensor->s_power_delivered, dsmr_p1_sensor->s_power_returned, dsmr_p1_sensor->s_voltage_l1, dsmr_p1_sensor->s_voltage_l2, dsmr_p1_sensor->s_voltage_l3, dsmr_p1_sensor->s_current_l1, dsmr_p1_sensor->s_current_l2, dsmr_p1_sensor->s_current_l3, dsmr_p1_sensor->s_power_delivered_l1, dsmr_p1_sensor->s_power_delivered_l2, dsmr_p1_sensor->s_power_delivered_l3, dsmr_p1_sensor->s_power_returned_l1, dsmr_p1_sensor->s_power_returned_l2, dsmr_p1_sensor->s_power_returned_l3, dsmr_p1_sensor->s_gas_device_type, dsmr_p1_sensor->s_gas_valve_position, dsmr_p1_sensor->s_gas_delivered}; sensors: - name: "Consumption Low Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Consumption High Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Return Low Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Return High Tarif Sensor" unit_of_measurement: kWh accuracy_decimals: 3 - name: "Actual Consumption Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Actual Delivery Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Instant Voltage L1 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Voltage L2 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Voltage L3 Sensor" unit_of_measurement: V accuracy_decimals: 3 - name: "Instant Current L1 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Instant Current L2 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Instant Current L3 Sensor" unit_of_measurement: A accuracy_decimals: 3 - name: "Power Delivered L1 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Delivered L2 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Delivered L3 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L1 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L2 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Power Returned L3 Sensor" unit_of_measurement: W accuracy_decimals: 3 filters: - multiply: 1000 - name: "Gas device type Sensor" - name: "Gas valve position Sensor" - name: "Gas Meter M3 Sensor" unit_of_measurement: m3 accuracy_decimals: 3

Room for improvement?

Yes there is. At time of writing, the hotspot will start after one minute when it is not connecting to a wireless network. I wish this to be straight away. No minute delay. This I will look into and try to get it done ✅

Well as of the update of 15 December, it goes straight into hotspot mode, yet without the list of scanned devices. I’ve seen that list and I want that list, so still room for improvement.

ESPHome powered P1 meter (2024)

FAQs

How to take a meter reading on a single phase watt hour meter? ›

Single rate digital meter

It will show 5 numbers in black or white, and might be followed by 1 or more red numbers. To read the meter: Write down the first 5 numbers shown from left to right. Ignore any other numbers.

What are the voltage and current limits of a meter socket for a self contained kilowatt hour meter? ›

The term "self-contained meter" refers to the standard watt-hour meter or k Wh meter which is commonly used to measure electrical energy use for most residential customers. Standard self-contained watt-hour meters can generally handle currents up to 200 amps and voltages up to 480 volts.

What is the reading on a watt hour meter actually a measure of? ›

The electric watt-hour meter is used by the power company to measure the energy used in a given time period and bill the customer for that consumption.

What is a normal meter reading? ›

They record two readings, one for your day usage and one for night usage. Day usage is called 'normal' and night usage is called 'low'.

How many amps can a power meter handle? ›

Electric meter: Your electric meter is probably outside your home. See if your meter has an amperage rating printed on its face, or on a label affixed to its body. It might say CL200, which means it can handle a maximum of 200 Amps.

Do you need a CT cabinet for a 400 amp service? ›

Current Transformer (CT) metering (Singe-phase & Three-Phase) Services greater than 400 amp (320amps continuous current) require CT metering.

What is the maximum voltage that will come out of your wall socket in your house? ›

Domestic sockets. Figure 1. Outlet layouts from around the world. Domestic electrical outlets supply 120 volts in North America and 220-240 volts in Europe, with most nations having outlets supplying voltages similar to one of those two values.

What is the measurement of single phase energy using watt hour meter? ›

Multiply the total reading by the appropriate multiplier to get the total energy consumption in kilowatt-hours. Example Calculation: Suppose a meter has dials with readings of 4, 2, 8, and 5, with multipliers x1, x10, x100, and x1000, respectively. The total reading is 4285 kWh.

How to give ovo meter readings? ›

Manually sending a meter reading with the OVO Energy app
  1. Click on Account.
  2. Choose meter readings.
  3. Then pick to give an Electricity or Gas reading.
  4. You'll see a handy Help option if you need support taking your reading.
  5. Enter your reading into the box using your phone keypad.
  6. Then click send – and you're done!

Is a single phase watt hour meter a smart meter? ›

The single phase smart Watt hour meter is an advanced meter that uses an ultra-high precision SOC chip and large-scale integrated circuit to measure energy consumption.

Top Articles
Grandma's Famous Cranberry Salad Recipe
Easy Turkish-Style Leeks Recipe in Olive Oil
Wmaz 13
Digitaler Geldbeutel fürs Smartphone: Das steckt in der ID Wallet-App
Your Blog - Sheri Blonde
Craigslist The Big Island
Booked On The Bayou Houma 2023
Events - R Consortium
Cbse Score Conversion 2022
Chs.mywork
Maine Coon Craigslist
El Puerto Harrisonville Mo Menu
Sofia the baddie dog
Lecture Tutorials For Introductory Astronomy Answer Guide
Craiglist Tulsa Ok
Black Panther Pitbull Puppy For Sale
9192464227
Mcallen Craiglist
Bonduel Amish Auction 2023
Dominion Post Obituaries Morgantown
Elmira Star Gazette Obit
Dawat Restaurant Novi
Ashley Kolfa*ge Leaked
Diabetes Care - Horizon Blue Cross Blue Shield of New Jersey
Bfri Forum
Greensboro, NC Breaking News Headlines Today | Ground News
Reasonabiu
Southern Food Buffet Near Me
Leonards Truck Caps
Roxplayhouse
Ufc 281 Tapology
Bolly2Tolly Sale
Liveops Nation Okta Com Sign In
2005 Volvo XC 70 XC90 V70 SUV Wagon for sale by owner - Banning, CA - craigslist
Marissa.munoz17
Nationsotc.com/Bcbsri
Myrtle Beach Armslist
Everstart Maxx Jump Starter 1200 Manual
Air Quality Index Endicott Ny
Shiawassee County 911 Active Events
Unraveling The Mystery Behind Campinos Leaked: A Deep Dive
Ryker Webb 2022
Son Blackmailing Mother
South Dakota Bhr
Craigslist Cars For Sale By Owner Memphis Tn
1 Filmy4Wap In
Mexican cartel leader 'El Mayo' Zambada pleads not guilty to US charges
Criagslist Orlando
Cloud Cannabis Grand Rapids Downtown Dispensary Reviews
Papitop
Right Wrist Itching Superstition
Cpc 1190 Pill
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 6359

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.