Homey Community Forum

P1 smartmeter (API)

@Koktail, I managed to get the script running with some adjustments to the original script. I changed the init code for the serial port according to an example on GitHub - reneklootwijk/node-dsmr: Parser for the DSMR protocol used on the P1 port of smart meters
Now I receive readable values instead of rubbish.
I will open a pull request on Github for the changes as soon as everything is working.

Now I get data visible in my Homey device, but not all. See screendump:

All 3 ‘current’ readings are missing, but the values are available in the data send to the Homey.
Note: I don’t have a connection to the gas network at my home.

Below the logging of the script with debug logging enabled (I added a few by myself)

pi@raspberrypi:/home/pi/com.p1.smartmeter-dsmr.reader/src# node p1.js
{“message”:“Connection.connect: Entering”,“level”:“debug”}
{“message”:“Connected using serial connection”,“level”:“debug”}
{“message”:“p1 smartmeter is connected!”,“level”:“info”}

{“message”:“SmartMeter: Telegram {“power”:{“equipmentId”:“ZBEV005093737112”,“totalConsumed1”:11223.242,“totalConsumed2”:11337.393,“totalProduced1”:998.707,“totalProduced2”:2222.431,“activeTariff”:1,“actualConsumed”:0.35,“actualProduced”:0,“switchPosition”:1},“gas”:{},“meterModel”:“ISk5\\2MT382-1003”}”,“level”:“debug”}
{ power:
{ equipmentId: ‘ZBEV005093737112’,
totalConsumed1: 11223.242,
totalConsumed2: 11337.393,
totalProduced1: 998.707,
totalProduced2: 2222.431,
activeTariff: 1,
actualConsumed: 0.35,
actualProduced: 0,
switchPosition: 1 },
gas: {},
meterModel: ‘ISk5\2MT382-1003’ }
{“message”:“p1 smartmeter update gas or power”,“level”:“info”}
{“message”:“SmartMeter: Updates {“power”:{“equipmentId”:“ZBEV005093737112”,“totalConsumed1”:11223.242,“totalConsumed2”:11337.393,“totalProduced1”:998.707,“totalProduced2”:2222.431,“activeTariff”:1,“actualConsumed”:0.35,“actualProduced”:0,“switchPosition”:1},“meterModel”:“ISk5\\2MT382-1003”}”,“level”:“debug”}
{“message”:“posted successfully to: https://*******.connect.athom.com/api/app/com.p1/update”,“level”:“info”}


it’s almost like the actualConsumed is ignored for some reason… I have the exact same issue:

{ power:
   { equipmentId: '***************',
     totalConsumed1: ****.973,
     totalConsumed2: ****.046,
     totalProduced1: 0,
     totalProduced2: 0,
     activeTariff: 2,
     actualConsumed: 0.457,
     actualProduced: 0,
     failures: 2,
     failuresLong: 0,
     failureLog: [],
     voltageSagsL1: 2,
     voltageSwellsL1: 0,
     instantaneousVoltageL1: 230,
     instantaneousCurrentL1: 2,
     instantaneousConsumedElectricityL1: 0.457,
     instantaneousProducedElectricityL1: 0 },
   { equipmentId: '***************',
     timestamp: 1610703600,
     totalConsumed: ****.938,
     reportedPeriod: 5 },
  meterModel: '***************',
  dsmrVersion: 5,
  timestamp: 1610703853 }

Homey can show the totalConsumed1 and totalConsumed2, and updates the gas values nicely. But it’s completely ignoring the values in actualConsumed power.

Weird stuff.

Due to the lack of response from the developer I installed the P1 monitor app on my Raspberry and Homey in the mean time. Advantage of that is that it saved all data and can show some nice graphs.

I haven’t see any PR request on GitHub. What’s the issue here?

I think this is the same issue:

Have you tried updating node-dsmr?

As you can see in the loggings above the values seems to be sent correctly to the Homey, but are just not displayed in the Homey device.

1 Like

Somehow my gas usage is hundreds of m³ per hour, all the other values seem fine. Any idea as to why? Also my ‘current usage’ is not shown; but it is on the meter!

After a change to the posting script it shows my usage but negative. If I use 500 Watts…it shows as -500 watts…any idea as to why?

@Chillout & @Sjoerd_Boerhout This problem is also described above

So P1 smart meter app calculates the current consumed and produced values based on resp. instantaneousConsumedElectricityL1 and instantaneousProducedElectricityL1, but also L2 & L3 values. If these are missing, calculation fails.

If you somehow add instantaneousProducedElectricityL2: 0, instantaneousProducedElectricityL3: 0 and instantaneousConsumedElectricityL2: 0, instantaneousConsumedElectricityL3: 0 it is working.

Would be better if P1 smart meter could handle L1 values alone. Looks like lot of people have smart meter without L2 & L3 values.

I discovered this with my solution:
I wrote a Homeyscript to scrape RAW P1 telegram message from youless device and post this to the /update/dsmrreader endpoint. :slight_smile:


I’ve just released V4.0.2 to test:

v4.0.2 - 02.03.2021

  • bugfix missing L1, L2, L3 (L1 L2 L3 values can be undefined)
1 Like

Testing :slight_smile:


It appears that with 4.0.2, there’s still no actual electricy usage showing with my setup.

    { power:
   { equipmentId: 'E00-----------17',
     totalConsumed1: 4266.173,
     totalConsumed2: 4631.341,
     totalProduced1: 0,
     totalProduced2: 0,
     activeTariff: 1,
     actualConsumed: 0.288,
     actualProduced: 0,
     failures: 2,
     failuresLong: 0,
     failureLog: [],
     voltageSagsL1: 2,
     voltageSwellsL1: 0,
     instantaneousVoltageL1: 233,
     instantaneousCurrentL1: 1,
     instantaneousConsumedElectricityL1: 0.288,
     instantaneousProducedElectricityL1: 0 },
   { equipmentId: 'G00----------17',
     timestamp: 1615329004,
     totalConsumed: 4475.362,
     reportedPeriod: 5 },
  meterModel: 'XMX5LG--------86',
  dsmrVersion: 5,
  timestamp: 1615329287 }

The node-dsmr part is made by @ObelixNL, perhaps he can help you out.

1 Like

@Koktail @Chillout Pull request is pending.

Bugfix/support SDKv3 dsmreader by steffjenl · Pull Request #31 · koktaildotcom/com.p1.smartmeter (github.com)

1 Like

Thanks for looking into that. I’ll try to release it to test when I have the time for it.

I’ve just released 4.0.3 to test: P1 Slimme meter | Homey

v4.0.3 - 16.03.2021

  • bugfix upgrade dsmr reader

same problem here. Just installed the latest version of node-dsmr but no live data is shown in homey. Is there already a fix known for this?

Greet tool/app. Thank You for that. My question now is, is it possible to export the data to another platform also? As you probably would guess I am also maintaining a Domoticz database for many years and I want to compare data to last year I guess for now this is impossible with Homey.

Can I send a for example HTTPrequest to my door domoticz installation?

Thank you for helping me in advance.

Cheer Ab

Sames issue persists. Today finally installed the cable on my RPI 4B. All is functioning well except the current power variabele. The data is there, but somehow not imported by the app:

However, the device capabilities in the Developer Tools shows “null”.

No more replies in 2 months on this thread, this cannot or shall not be resolved then (or maybe already is resolved)?


1 Like

Question, looks like the values are not shown correct or they are not correctly collected. When I look at the values of “huidig verbruik” and “teruglevering” they should be switched. (see screenshots)

Same goes for the values in the evening, they are negative.