Plugin: Smart Meter DSMR P1 port Reader

This plugin is used to read the Dutch Smart Meters (Slimmemeter) via the P1 port using the DSMR protocol version 3 and up. You can configure the Import/Export, High/Low, and Gas meters you want to have shown on the Vera dashboard. The Gas meter show the gas usage (flow) over the last hour, and it can account for any own power production like solar panels to show a calculated total House usage.

More details are in the UserGuide.pdf.

Version 1.16 Changes:

  • Add Volts and Amps to Line child devices. Removed kWh as these are not per Line.

Version 1.15 Changes:

  • Fix for UI7 check on a new install.

Version 1.14 Changes:

  • Changes for icon handling for Vera UI 7.30.

Version 1.13 Changes:

  • Fix for saving settings on ALTUI.

Version 1.12 Changes:

  • Can reduce number of updates to reduce CPU load on Vera using the Update Frequency setting. I am not seeing a significant change for DSMR
    V4 meters, but for V5 that send data each second it could.
  • Nicer looking on ALTUI

Version 1.10 Changes:

  • Added support for Gas meter being on OBIS channel number 1-4. Replaced meters will use a different channel.
  • Tested with DSMR 5.0 meters. Note that these meters send their data each second rather than once per 10 seconds as older versions do.
    This means a higher load on your Vera.

Version 1.9 Changes:

  • Fix on LogGet function to correct Gas Flow calculation at startup.
  • Removed some obsolete generic functions.
  • Can use local loop IP address on openLuup.

Version 1.8 Changes:

  • Fix for gas reading of DSMR 2.2 and 3.0 meters.
  • Fix for converting meter number with hex values.
  • Child devices wil not show the delete button.

Version 1.7 changes:

  • Fix for occasional spikes in the Gas Flow calculation by now looking at the timestamp from the meter it self.
  • Support for disable attribute so you can disable the plugin without deinstallation
  • Some code optimalizations to reduce CPU load for options that are not enabled.

Version 1.6 has not been published.

Version 1.5 changes:

  • Added option to show three line(phase) power meters to show the wattage per phase. Only useful if you have a three phase connection.
  • Added notifications on nearly all parameters.

Version 1.4 changes:

  • Added support for ALTUI.
  • Now reads the meter numbers and shows them on the control panel.

Version 1.3 changes:

  • Updated for DSMR version 5.0 standard. This includes the voltage, amperes, and power for each Line (Phase); i.e. lines 1-3.
  • The DSMR version of your meter is shown on the Control panel.
  • Added variable AppMemoryUsed so you can see how much memory the plug in uses (I see about 300KB on UI7)

The plugin version 1.15 is now available on the App Market, you can search on Smart Meter.

To force an update http:///port_3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=8342&Version=39692

Note: this plug-in also works on openLuup. However, there is a caveat for Raspberry PI. Raspberry PI Jessie has a bug in the LUA Socket module not resetting the timeout timer when receiving data over an open socket. This results in timeouts. A small modification in the openLuup io.lua module fixes this. See [url=http://forum.micasaverde.com/index.php/topic,39005.0.html]http://forum.micasaverde.com/index.php/topic,39005.0.html[/url] for details. Again, this is only confirmed for use on Raspberry PI Jessie.
Also on openLuup you have to install set2net support. See [url=http://forum.micasaverde.com/index.php/topic,39088.0.html]http://forum.micasaverde.com/index.php/topic,39088.0.html[/url] for the details. In the /ect/ser2net.conf file enter this line

3491:raw:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT
Then in the plug-in IP attribute enter “127.0.0.1:3491”.

Cheers Rene

Hello Rene,

Just updated my UI7 to your new app.
I had some trouble because I used the old way as described at robbshop.nl and things got twisted apparently.
But now after uninstall en re-install everything is working fine. Data is coming in every 10 seconds.
I also have solar panels but I really don’t know how to connect this to the Power generator inside your app.
Is it possible to be more specific on how to achieve this?
Maybe a small howto? I don’t know what z-wave devices to buy and how to connect on the converter.
But what is the benefit of doing so because my export is already showing in your app.
Is a little help possible please?

Thank you very much so far, I am already very happy with this.

Franklin

Hi Franklin,

Good you got it working. I see it is now in the app market (with a small error I see :frowning: ). I will update the information.

It truly depends on how you can measure your solar panel production. I have an Enphase system and that comes with an Envoy controller that I poll using its API. Do you have a plugin on your Vera showing your solar panel production? If not you have to find a way to add that. If there is not a plugin for your brand of solar power converter you can install a KWH meter with a Youless and the Youless plugin (not sure how that works on UI7 though). You can also install an Aeon Labs HEM1 energy meter.

The benefit of including the solar is that you can see how much power your house is actually using. On the smart meter you see only what you export to the net. Your house usage is that export (or import) plus your solar production. At night time, the House and Import(T1/T2) show a similar value, except that the House value will be updated at the Power Generator Update interval and not every 10 seconds.

Let me know how things go.

Cheers Rene

Hello Rene,

I’m new here, just bought an vera edge.
I’m very interested in your app for reading P1 port.
I have an Qbox from Qurrent attached already to my P1. Now i have 2 questions:

  • first: is it possible to attache also the vera edge and the qbox together by splitting the RJ11-cable? i can buy a simple splitter for RJ11.
  • second: i have also a solarpanel reader attached. It is an Eltako Type WSZ12DE-32A. It is connected to the qbox by an Y-cable: the 2 RJ11’s are combined to one RJ11 in the qbox. It is sending an extra set of parameters (don’t know the specs). I send you some more info from the eltako.

Thanks,
Rick

ps: i hope i did this message the right way!

Hi,

I’ve installed the plugin last night.
The electricity is fine, but I still got no Gas readings.

Both values are zero.

Anything I can do?

Same here: no gas readings. I have a V2 smart meter I think.
It used to work with your old plugin, then updating to UI7 broke it, and then someone in the other thread fixed it… And then it stopped working again ;).
It would be great to see it working in this new version, consistently ;).

Otherwise, great work! Keep up!

Hi,

I found the likely issue for the Gas reading on ISK5 meters. Can you upload the attached lua and let me know.

If it still does not work, please set the Log level to Debug and include the log part that shows all lines for one full set of lines from the meter?

Cheers Rene

It works.
Gasreading is correct now.
But I don’t now if consumption also will be correct because we are not using gas now.

Regrads, Floris

Had the same problem seems to work now thanks! ;D

Thanks guys, good to hear.

The Gas reading is updated only once per hour and you need two readings to determine the usage over the last hour. So it would take at least an hour for that to show.

Cheers Rene

[quote=“rick01, post:4, topic:187190”]Hello Rene,

I’m new here, just bought an vera edge.
I’m very interested in your app for reading P1 port.
I have an Qbox from Qurrent attached already to my P1. Now i have 2 questions:

  • first: is it possible to attache also the vera edge and the qbox together by splitting the RJ11-cable? i can buy a simple splitter for RJ11.
  • second: i have also a solarpanel reader attached. It is an Eltako Type WSZ12DE-32A. It is connected to the qbox by an Y-cable: the 2 RJ11’s are combined to one RJ11 in the qbox. It is sending an extra set of parameters (don’t know the specs). I send you some more info from the eltako.

Thanks,
Rick

ps: i hope i did this message the right way![/quote]
Hi Rick,

This is a tad tricky. The smart meter does not use all 6 of the RJ12 wires and I think the Qbox uses two of those spares for reading the Eltako pulses.

I have tried using a RJ11 phone line splitter and that did not work. I read some got it working on older smart meters, but the DSMR V4 meters uses 5 of the 6 RJ12 wires and the older only use 2 or 3.

So I created a simple TTL signal splitter using a SN74LS04 chip, some RJ12 connectors and breadboard. This is what I got from Conrad:
5 stuk 716136 Assmann WSW A-20041 Modulaire inbouwbus Bus, recht Aantal polen: 6P6C Zwart 1 stuks
1 stuk 922694 Western kabel RJ12 6/6 3M SW
1 stuk 530753 Conrad Euro-printplaat, puntraster SU527769 (l x b) 160 mm x 100 mm Rastermaat 2.54 mm Hardpapier met koperlaag
1 stuk 172049 Low Power Schottky TTL Texas Instruments SN74LS04N Soort behuizing DIP-14 Uitvoering HEX inverter

Attached are the schema and a photo to show the end product (do not install in sight ;D). The DSMR V4 supply 5 volts so that is used to power the splitter.

You should connect the splitter directly to the P1 port, and then the Vera and QBox at the readers side.

So if you want to connect multiple devices to a P1 port, be prepared for some old school DIY.

Note that this will only get you the smart meter data and not the solar data that the QBox collects. You would have to ask Qurrent if there is an API you could use to read that and build your own plugin on the Vera to show it there.

Cheers Rene.

Installed the new plugin after getting a newer smart meter, woked flawlessly!!

Hi Twannie,

Just released version 1.3 that displays some extra information for the latest DSMR version 5 meters. One is voltage per phase (line). If you have a meter that new (mine is DSMR version 4.04) you may see those values.

I just pushed it to the app market, but it will take a few days before it is approved.

Cheers Rene

Cool, it looks like I have a version 5 , my device shows “KFM5KAIFA-METER” (installed last week, I had the luck the gasmeter squeaked (piepen))

Mine is still on 1.1, did I miss 1.2???

No, I never released that.

Hi Rene

I can remind you mentioned the ISKA5 meters also shows voltage. I did have a look in the device (variabeles) but i can’t find voltage.
The device shows “Meter Type: KFM5KAIFA-METER”
Can you advise?

Thanks

Hi Twannie,

You have to look at the DSMR version. If that says 40 it will only show line amps and watts, not voltage. Voltage is part of the 5.0 standard and not many will have a meter having that yet. I am not sure if the meters we have (I have the exact same one as you) will be updated as only “non-measurement related software” (what ever that means) is allowed to be updated by the Dutch regulations.

BTW; on the panel you showed for your Virtual Panel does show voltage. Where are you getting that from?

Cheers Rene

Hi Rene

The voltage is coming from an AEON Labs meter.
I just recieved my meter a couple of weeks ago. Where can I see what meter I have?.. I also can’t find amps in the data

Hi Twannie,

Have a look at the Smart meter Reader Control panel. That should now have DSMR version and Line 1,2,3 volts, amps and watts.
Only if DSMR version is 50 I would expect the voltages to be populated.

Ok, I have one of those AEONs still to install. Guess I have to bump it up on my prio list :smiley:

Cheers Rene