We have moved at community.getvera.com

Author Topic: New plugin for reading the gas and electricity usage from a Dutch Smart meter  (Read 102883 times)

Offline cmbeek

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
A wattage can alwyas be seen on one of four child devices.
I agree it would be nice if the current value would also be displayed on the parent decive.

Offline mr leaver

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +2/-0
Yesterday ExportRate2 always showed zero. I knew is was exporting elektricity so something was wrong. I installed the latest version i could find (with the minus sign change) installed it, luup restarted and now it's fine. Im exporting power now officially recording to vera.

Now i wil have to make a plugin for my Kostal piko 4.2 solar converter myself probably. Because export is less than what my pv panels are producing.
« Last Edit: April 18, 2013, 05:28:13 am by rpleever »

Offline mr leaver

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +2/-0
Yesterday during daytime my meter (still) showed values for exportrate1. I think values are not cleared when rates change from 1 to 2 or 2 to 1
So i looked into the code for this plugin and found that the code for export differs from the part for import.
Only there is some code which i dont understand. What does (activeTariff % 2)  do in this piece of code
Code: [Select]
                    -- export rate 2
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", tonumber(string.match(string.sub(data,10), "%d+.%d+"))*-1000.0, findChild(THIS_DEVICE,"ExportRate" .. activeTariff))
                    -- export rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, (findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2)))*-1))

Offline mr leaver

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +2/-0
I changed the code for the plugin which now reports exportrate1 as 0 in stead of leaving it on -160 when activetarrif = 2 (exportrate2)
Code: [Select]
                    -- export rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2))))

Offline informatie

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
How to setup the smartmeter (P1)
« Reply #109 on: June 13, 2013, 06:09:36 pm »
I have a vera3 (purchased 1 week ago), I have a P1-usb cable I downloaded the dutchsmartmeter 1.2.b.zip software I load them in the plugins of mios ( (my plugins)

What are the roles for the json, d_ s_ i_
Create a device oke but what to do have to fill in.

Can or is someone willing to help me out on how to install the plugin. I thought I have made all the steps .
I read the first post on this subject but still strugling

Who can provide me with the correct installation steps ?





Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Have a look here: a description in Dutch: http://gathering.tweakers.net/forum/list_messages/1533251 (you need to scroll a little down)
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline informatie

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Meter are not showing
« Reply #111 on: June 14, 2013, 05:51:46 pm »
Uploaded the files, changed the serial settings  but none of the meters are showing up

Got it working.
« Last Edit: June 20, 2013, 04:24:39 pm by informatie »

Offline Peter

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
How can I see my gaz consumption a day during a year instead of the increasing total of gaz consumption a day?
See attachment

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
I have issues with my Vera. After contacting MCV they come back with:

I've checked the logs from our servers and it seems that your issue is related to : "Sensor Meterkast Verbruik Master", "Sensor Teruglevering Dag - Powermeter ExportRate2", "Sensor Teruglevering Nacht - Powermeter ExportRate1", "Sensor Verbruik Dag - Powermeter ImportRate2" and "Sensor Verbruik Nacht - Powermeter ImportRate1". Each of these 5 devices are reporting the values every 10 seconds to Vera.
 
Can you please try to increase the report interval for those 5 devices and see if you still encounter this issue?

How do I increase the interval from 10 to lets say 30 secs?
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
No one?
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline Snotneus

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +1/-0
@SanderL,

The "Dutch SmartMeter" is sending data over RS232 every 10 seconds.
The best way to increase the update interval would be at the SmartMeter itself, but in my opinion there is no way to realize this.

Second possibility would be changing the implementation file of the SmartMeter plugin in Vera.
You could have the incoming data to only process every second or third time, but the data still would come in every 10 seconds. However it would prevent updating the plugin and its childDevices every 10 seconds.

I have used this plugin myself for a while, but have changed the way the plugin works.
It is still processing the incoming data every 10 seconds, but I first wait until all data has arrived (wait for end of message character "!") giving a more smooth processing.

Because it is combined with my PV monitoring, I do not think my implementation of the SmartMeter would be universally applicable, but if you are familiar with lua and would like to change your copy of the SmartMeter plugin I could copy the file here.

The plugin, however, was never causing problems on my Vera2, also not when it was in its original state, so I doubt that the plugin is the cause of your problems.
Regards.
« Last Edit: November 10, 2013, 01:19:57 pm by Snotneus »

Offline DRuw

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Hi all,
I have made an update on the Vera and I have accidentally broken the cable of the unit as well (at the same time almost).
Fixed the cable and now it does not read anything from the smartmeter it seems....
I really dont know if the issue is the cable or the app (or latest software edition) but who knows how to work this out?
I re-installed the app again a couple of times but I cant get it to work.
Can someone help me troubleshoot?

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
Start with buying new cable
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Link cable to pc and use a freeprogram to the read the meter?
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline DRuw

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
Start with buying new cable
did that...
@Crismaison: Any advise on which program? and will that work with the inverted RX (or does it work because of the inverted RX;)?)
« Last Edit: December 11, 2013, 08:34:45 am by DRuw »