P1 Monitor (DSMR) with Solution

Hi,

I’m running hassio on a desktop system that is on the 3rd floor but i have a raspberry with P1 Monitor (P1 Mon connected to my Smart Meter with a P1 cable on the first floor.

And i can’t find a way to use the component DSMR to connect to the P1 Mon system.

Does anybody has this running ? And how did you did it ?

Solution : P1 Monitor does have API links that you could use to retrieve data into HA.

Example sensor.yaml:


 - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/smartmeter?limit=1&json=object&round=on
    name: Huidig verbruik
    value_template: '{{ value_json.0.CONSUMPTION_W }}'
    unit_of_measurement: "W"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/smartmeter?limit=1&json=object&round=off
    name: Meterstand hoog
    value_template: '{{ value_json.0.CONSUMPTION_KWH_HIGH | round(2) }}'
    unit_of_measurement: "kWh"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/smartmeter?limit=1&json=object&round=off
    name: Meterstand laag
    value_template: '{{ value_json.0.CONSUMPTION_KWH_LOW | round(2) }}'
    unit_of_measurement: "kWh"
    
  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/financial/day?limit=1&json=object&round=off
    name: Kosten Hoog Tarief
    value_template: '{{ value_json.0.CONSUMPTION_COST_ELECTRICITY_HIGH | round(2) }}'
    unit_of_measurement: "€"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/financial/day?limit=1&json=object&round=off
    name: Kosten Laag Tarief
    value_template: '{{ value_json.0.CONSUMPTION_COST_ELECTRICITY_LOW | round(2) }}'
    unit_of_measurement: "€"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/financial/month?limit=1&json=object&round=off
    name: Maand Hoog Tarief
    value_template: '{{ value_json.0.CONSUMPTION_COST_ELECTRICITY_HIGH | round(2) }}'
    unit_of_measurement: "€"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/financial/month?limit=1&json=object&round=off
    name: Maand Laag Tarief
    value_template: '{{ value_json.0.CONSUMPTION_COST_ELECTRICITY_LOW | round(2) }}'
    unit_of_measurement: "€"

  - platform: rest
    resource: http://ip.adress.p1.mon/api/v1/powergas/day?limit=1&json=object&round=off
    name: Verbruik Per Dag
    value_template: '{{ value_json.0.CONSUMPTION_DELTA_KWH | round(4) }}'
    unit_of_measurement: "kWh"

  - platform: template
    sensors:
      energie_kosten_dag:
        value_template: "{{ states('sensor.kosten_hoog_tarief') | float + states('sensor.kosten_laag_tarief') | float | round(2) }}"
        unit_of_measurement: "€"
        
  - platform: template
    sensors:
      energie_kosten_maand:
        value_template: "{{ states('sensor.maand_hoog_tarief') | float + states('sensor.maand_laag_tarief') | float | round(2) }}"
        unit_of_measurement: "€"

The last 2 platform are my costs for energy, one for day cost and one for total monthly cost.

There are more API links that you can use from P1, you can find them in the settings and then API.
If there are more questions please ask.

And i want to thank the guy that helped me to get started to get P1 Mon data into HA.
Thanks Marcel.

I have the same situation RPI connected to the Smart Meter (P1) and Hassio on a NUC somewhere else. I use DSMR Reader [https://github.com/dennissiemensma/dsmr-reader] on the RPI and use MQTT (Mosquito add-on) in Hassio.
This gives me also Gas consumption and price information

Thanks, yes i also found DSMR Reader. But i got P1 Monitor working in Hassio.
Some other user from P1 Monitor helped me with the correct API links.
Now i got all the information in Hassio from my Smart Meter :slight_smile:

Could you please document your solution here. That is a big part of the forum, leaving details of how you fixed something so as to help others in the future.

Yeah sure :slight_smile:

I posted the solution in my first post.

Sorry so you did. :slight_smile:

Thanks for sharing as I was looking for a solution for the same situation.

1 Like

I have it up and running now for 12 days and it’s working great.

Added yesterday and it works great, checking if I can add the gas as well in the overview