Plugwise Smile P1 integration DSMR4 slimme meter

If @mvieleers can commit them as a PR to https://github.com/plugwise/Plugwise-Smile/tests/p1_full_option that would be great. Simpeler might be to just save the XML files as indicated by both @bouwew above and on the README in https://github.com/plugwise/Plugwise-Smile/tests/ in a zip and attach that to an issue in that repo. Please clean at least your smile-id and some personal data (see that same readme), we’ll have to do that anyway before committing it but I’d rather not publish your smile-id :slight_smile:

Created an issue in the github and attached the files as well as some info on the entities I am missing.

Let me know if I missed anything. Thank you for all your efforts!

Please test plugwise-beta version 0.1.11.

Great effort! All electricity values are displayed now. Gas is not showing though.

new release 0.1.11p also shows gas.
Great job!

Hi fellow P1’s

As @mvieleers indicated yes we support more and more, and just released our new version. Check out the ‘other topic’ for future updates or head directly to https://github.com/plugwise/plugwise-beta/releases/tag/0.2.0 to read the release notes (it is a breaking update and requires HA 0.109 coming out of beta wednesday).

For all our Dutchies around, happy Woningsdag!

How can I convert the sensor.p1_net_electricity_point to kWh per day / month etc ??

if I try :

  • platform: template
    sensors:
    used_energy_today:
    friendly_name: “Today”
    unit_of_measurement: “kWh”
    value_template: “{{ states(‘sensor.p1_net_electricity_point’) | float / 1000 }}”
    icon_template: mdi:flash

How can I get this done ??

thnx

Its not giving my daylight usage, but a very different value. :frowning:

The xyz_point_sensors provide values with the unity Watt.
To turn the values of such a sensor to kWh you need to integrate over time, 1hr. And divide by 1000. So you are doing the 2nd part correct but the 1st part is missing.
Please have a look here: https://www.home-assistant.io/integrations/integration/

Next, you need to integrate once more time, over the time interval you are interested in: 1 day, 1 month, etc.
Please have a look here: https://www.home-assistant.io/integrations/utility_meter/

so in sensors :

  • platform: template
    sensors:
    gebruikte_energie_vandaag_test:
    friendly_name: “Vandaag energy”
    unit_of_measurement: “kWh”
    value_template: “{{ states(‘sensor.p1_net_electricity_point’) | float / 1000 }}”
    icon_template: mdi:flash

  • platform: integration
    source: sensor.gebruikte_energie_vandaag_test
    name: Energie per dag
    unit_prefix: k
    round: 2

and then in utility :

dag_energie_verbuik:
source: sensor.energie_per_dag
cycle: daily

should do the trick ??

As bouwe said, look at https://www.home-assistant.io/integrations/utility_meter/ and the example given, that should give you something like:

utility_meter:
  energy:
    source: sensor.p1_net_electricity_point
    cycle: daily

Specifically see https://www.home-assistant.io/integrations/utility_meter/#advanced-configuration-for-dsmr-users which might make it very easy to copy and paste - especially the second code fragment :slight_smile: Saves you the calculation and the setting of prefixes etc.

No that doesn’t work.
First you need to create the kWh-sensor:

  - platform: integration
    name: net_elect_kwh
    source: sensor.p1_net_electricity_point
    unit_prefix: k
    unit_time: h
    round: 1

Change to name to you liking.

This should give you the kWh-sensor that you can use in the next step, in creating the kWh-counters for a day, week, etc. using the Utility Meter integration.

1 Like

It seems this does not report negative energy?? When also having solar panels ??? It yust stays at 0

Johannes, I’m always happy to help but with this type of short and undetailed feedback I am unable to help you. Please show the yaml-code that you are using, show history-graphs that show the result of a sensor over time, etc.

Also, what is your goal, and why do you want to use the sensor.p1_net_electricity_point as the basis?

Sorry you are right,
What I am trying to achieve is to visualize and register my power usage, (per day)
I already have my solar panels working. But below at the right, ‘energie verbruik vandaag’ stays around 0-1, while my P1 (smile) current has -10 registered .

sensor.p1_net_electricity_point
is the sensor (combined low+high tariff) energy usage in Watt (see image upper right 'stoom verbruik huidig)
As you can see it peaks when I charge my E car (red) and green when PV is delivering power.

Now I want to have a ‘day’ ‘month’ and ‘year’ usage based on that : sensor.p1_net_electricity_point

I try :

in sensor :

  • platform: integration
    source: sensor.p1_net_electricity_point
    name: energie per dag
    unit_prefix: k
    unit_time: h
    round: 1

and in utility :

dag_energie_verbuik:
source: sensor.energie_per_dag
cycle: daily

but it gives me a flat liner… only when using energy it seems to start counting. (it seems it does not want to go below 0.

hope this clarifies my question??

thnx in advance

How does the history graph of the energie_per_dag sensor look like?
For this sensor I’m thinking maybe it’s better to use round: 3, this should result in a higher resolution.

after setting round to 3 yesterday,
for now it looks like :

it should be giving 11,92kwh --> got this from P1 smile app on iPhone , but it shows 1,43 (still have to wait to see if it goes below zero (later today when the sun start shining) but as you can see yesterday it also did not go <0

As you can see solar panels are delivering power, but dag_energie_verbruik is not going down…

I’m not asking about the sensor.dag_energie_verbruik, I’m asking for info on the sensor.energie_per_dag.
I wonder what the integration function is doing with the input from the p1_net_electricity_point sensor. Maybe something goes wrong in that first step.

Sensor.energie_per_dag gives :

generated by :

  • platform: integration
    source: sensor.p1_net_electricity_point
    name: energie per dag
    unit_prefix: k
    unit_time: h
    round: 3

Then converted by utility via :

dag_energie_verbuik:
source: sensor.energie_per_dag
cycle: daily

giving :

While the real usage monitored by my
My Smile p1 (iPhone app) gives :

Ok thanks. Looks like the Utility Meter doesn’t know how to handle the negative part of the curve.
So that’s not gonna work.

I’m thinking, use this

- platform: integration
    name: dag_energie_verbruik
    source: sensor.energie_per_dag
    unit_time: d

For the day sensor.

And use the P1 cumulative consumption and production (kWh) numbers in automations for the week and month numbers. Maybe better to use an automation for the day numbers as well.

Update: I’ve looked in the code of Utility Meter, looks like a negative diff is not allowed, which cause the issue that you see in your result. I’m asking @dgomes on Discord what is the reason for this “bug”.

1 Like