All Projects → fliphess → esp8266_p1meter

fliphess / esp8266_p1meter

Licence: GPL-3.0 license
dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to esp8266 p1meter

Esp Mqtt Json Multisensor
(OBSOLETE) ESP MQTT JSON Multisensor for Home Assistant. Supported sensors include the TEMT6000 light, AM312 PIR, DHT22 temperature/humidity sensors. RGB led supports flash, fade, and transition. Over-The-Air (OTA) uploading, too!
Stars: ✭ 323 (+368.12%)
Mutual labels:  nodemcu, homeassistant
hass-miwifi
MiWiFi for Home Assistant
Stars: ✭ 116 (+68.12%)
Mutual labels:  homeassistant
heatzy-home-hassistant
Climate Home Assistant component for Heatzy Pilot
Stars: ✭ 22 (-68.12%)
Mutual labels:  homeassistant
maestrogateway
Manage MCZ pellet stoves that are equipped with Maestro technology
Stars: ✭ 30 (-56.52%)
Mutual labels:  homeassistant
cookiecutter-homeassistant-custom-component
Cookiecutter template for Home Assistant custom component
Stars: ✭ 37 (-46.38%)
Mutual labels:  homeassistant
Cayenne-MQTT-ESP
Cayenne MQTT ESP8266, ESP32 & NodeMCU Library
Stars: ✭ 87 (+26.09%)
Mutual labels:  nodemcu
Home-Assistant Config
BeardedTinker Home Assistant configuration. Feel free to browse, edit, tweak, improve, criticize and suggest.
Stars: ✭ 241 (+249.28%)
Mutual labels:  homeassistant
LennoxiComfort
Home Assistant custom component for controlling Lennox iComfort WiFi and AirEase Comfort Sync thermostats.
Stars: ✭ 22 (-68.12%)
Mutual labels:  homeassistant
sensor.rpi power
A Custom component for Home-Assistant that checks if your Raspberry Pi power supply is giving enough voltage from the kernel.
Stars: ✭ 105 (+52.17%)
Mutual labels:  homeassistant
breaking changes
Component to show potential breaking_changes in the current published version based on your loaded components
Stars: ✭ 83 (+20.29%)
Mutual labels:  homeassistant
addon-chrony
chrony - Home Assistant Community Add-ons
Stars: ✭ 23 (-66.67%)
Mutual labels:  homeassistant
ha custom component
Home Assistant Custom Component of BMW Connected Drive
Stars: ✭ 21 (-69.57%)
Mutual labels:  homeassistant
sensor.greenely
Custom component to get usage data and prices from Greenely for Home Assistant
Stars: ✭ 41 (-40.58%)
Mutual labels:  homeassistant
ics
Integration that displays the next event of an ics link (support reoccuring events)
Stars: ✭ 48 (-30.43%)
Mutual labels:  homeassistant
bootstrap-grid-card
Bootstrap grid in Lovelace UI
Stars: ✭ 25 (-63.77%)
Mutual labels:  homeassistant
Deebot-for-Home-Assistant
Vacuum component for Ecovacs Deebot Vacuums
Stars: ✭ 204 (+195.65%)
Mutual labels:  homeassistant
homeassistant-afvalwijzer
Provides sensors for some Dutch waste collectors
Stars: ✭ 119 (+72.46%)
Mutual labels:  homeassistant
hive
My home infrastructure
Stars: ✭ 31 (-55.07%)
Mutual labels:  homeassistant
ioTank
Indoor environment monitor based on Esp8266
Stars: ✭ 15 (-78.26%)
Mutual labels:  nodemcu
homeassistant-config
My Home Assistant YAML configuration
Stars: ✭ 249 (+260.87%)
Mutual labels:  homeassistant

esp8266_p1meter

Software for the ESP2866 that sends P1 smart meter data to an mqtt broker (with OTA firmware updates)

08-05-2021: I've not used this sketch myself for several years now and as such it became a bit outdated: It supports only older meters with version 2.2 and 2.0 and the development has halted. I recommend people with newer meters to have a look at this fork instead.

Connection of the P1 meter to the ESP8266

ESP8266 Pin P1 Pin
GND GND
3V3 RTS
DATA (RXD) D2

To connect my Landys and Gyr E350 (ZCF110), I used a 10K resistor connected between DATA (RXD) and RTS. Many howto's mention RTS requires 5V (VIN) to activate the P1 port, but for me 3V3 suffices.

RJ11 P1 connetor

Data Sent

All metrics are send to their own MQTT topic. The nodemcu sends out to the following MQTT topics:

sensors/power/p1meter/consumption_low_tarif 2209397
sensors/power/p1meter/consumption_high_tarif 1964962
sensors/power/p1meter/actual_consumption 313
sensors/power/p1meter/instant_power_usage 313
sensors/power/p1meter/instant_power_current 1000
sensors/power/p1meter/gas_meter_m3 968922
sensors/power/p1meter/actual_tarif_group 2
sensors/power/p1meter/short_power_outages 3
sensors/power/p1meter/long_power_outages 1
sensors/power/p1meter/short_power_drops 0
sensors/power/p1meter/short_power_peaks 0

As I don't have solar panels (yet) I do not collect the data for power returns as I don't have any. They are however easy to add if you know the codes used.

Home Assistant Configuration

I use this for home assistant sensors.yaml:

- platform: mqtt
  name: P1 Consumption Low Tarif
  unit_of_measurement: 'kWh'
  state_topic: "sensors/power/p1meter/consumption_low_tarif"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Consumption High Tarif
  unit_of_measurement: 'kWh'
  state_topic: "sensors/power/p1meter/consumption_high_tarif"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Actual Power Consumption
  unit_of_measurement: 'kW'
  state_topic: "sensors/power/p1meter/actual_consumption"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Instant Power Usage
  unit_of_measurement: 'kW'
  state_topic: "sensors/power/p1meter/instant_power_usage"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Instant Power Current
  unit_of_measurement: 'A'
  state_topic: "sensors/power/p1meter/instant_power_current"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Gas Usage
  unit_of_measurement: 'm3'
  state_topic: "sensors/power/p1meter/gas_meter_m3"
  value_template: "{{ value|float / 1000 }}"

- platform: mqtt
  name: P1 Actual Tarif Group
  state_topic: "sensors/power/p1meter/actual_tarif_group"

- platform: mqtt
  name: P1 Short Power Outages
  state_topic: "sensors/power/p1meter/short_power_outages"

- platform: mqtt
  name: P1 Long Power Outages
  state_topic: "sensors/power/p1meter/long_power_outages"

- platform: mqtt
  name: P1 Short Power Drops
  state_topic: "sensors/power/p1meter/short_power_drops"

- platform: mqtt
  name: P1 Short Power Peaks
  state_topic: "sensors/power/p1meter/short_power_peaks"

The automations are yours to create. And always remember that sending alerts in case of a power outtage only make sense when you own a UPS battery :)

Thanks to

This sketch is mostly copied and pasted from several other projects. Standing on the heads of giants, big thanks and great respect to the writers and/or creators of:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].