The Vera Community forums have moved!

General => Power Management => Topic started by: bfromdruten on May 31, 2012, 03:48:56 pm

Title: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on May 31, 2012, 03:48:56 pm
I just finished a basic plugin for Vera to read electricity and gas usage using the P1 port found on the new Dutch smart meters.

To use the plugin you have to connect the P1 port to your Vera. This can be done with a  5 Volt cable from FTDI (TTL-232R-5V-WE) which can he bought here http://www.antratek.nl/USB-adapter.html (http://www.antratek.nl/USB-adapter.html)

The P1 port uses a reversed serial protocol so your need to reverse the RX pin. This can be done using the FTDI tool known as FT_PROG  found here http://www.ftdichip.com/Support/Utilities.htm (http://www.ftdichip.com/Support/Utilities.htm) (thanks to Verkenner on the domoticaforum). Don't  forget to Cycle port after programming.

Connect a RJ11 plug to the FTDI cable using the layout:
pin2=Red(Request=+5Volt)
pin3=black (GND)
pin5=Yellow(Data)

Upload the following files using the UI5 GUI (apps=>develop apps=>Luup files):
   - D_dutchSmartMeter.json
   - D_dutchSmartMeter.xml
   - I_dutchSmartMeter.xml
   - S_dutchSmartMeter.xml
Create a new device using apps=>develop apps=>Create device. Use D_dutchSmartMeter.xml as Upnp Device Filename and enter the device name at the field Description (e.g. meterkast). Click create device and wait till the device shows on the dashboard.

After the device is created you have to configure the serial port. First attach the cable. Go to apps=>develop apps=>serial port configuration and select the correct USB device. Set the serial parameters to 9600,even,7bits,1stop bit
In the dropdown box select the name you used creating your device.

After a short while the plugin should show the electricity and gas meter values and actual usage.

For more information see:
http://www.maartendamen.com/2012/04/new-smart-meter-installed-iskra-me382-and-landis-gyr-gasmeter-e06140/ (http://www.maartendamen.com/2012/04/new-smart-meter-installed-iskra-me382-and-landis-gyr-gasmeter-e06140/)
http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104&hilit=smart+meter+p1&start=30 (http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104&hilit=smart+meter+p1&start=30)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: futzle on May 31, 2012, 10:08:01 pm
Awesome work.  (I wish the smart meters here were as easy to interface with!)

This (http://www.intra2net.com/en/developer/libftdi/index.php) looks like a Linux tool that you might be able to use to configure the Invert RXD bit in the EEPROM of the FTDI chip.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Thiemen on June 01, 2012, 01:45:47 pm
Nice work!

I already read the post on the blog, now all i have to do is wait for a new smartmeter to be installed ;-)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 07, 2012, 06:37:29 am
This sounds very promissing. So I can connect the dutch smartmeter to my veralight usb-port?
RJ11 usually has 4 wires. How can I connect it to pins 2,3 and 5?
Is in/reverting the RX pin difficult? Manual looks complicated for a non-electrician.....

Thanks for sharing this feature!!!


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 07, 2012, 10:33:14 am
Two questions that crossed my mind:
How does the plugin handle production of (solar) energy?
How does the plugin handle Dutch double meters?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 07, 2012, 01:19:32 pm
@cmbeek:
You have to make one-end of the cable yourself, but using the cable mentioned this is an easy job. You only need 3 wires because nothing is done with tx

Besides the gas meter, the plugin actualy reads four different electric meter values. The amount used and the amount delivered back to the net. Both the low-rate values and high-rate values (so four in total). Currently the plugin creates one total and displays/stores this value. In future versions it would be nice to split the four meters. The plugin currently also knows if it is using the low-rate or high-rate, but nothing is done with it. If the plugin would know the kwh price, it could calculate your electricity bill.

Now only have to wait for the new UI5 datamine plugin to make some nice charts!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 07, 2012, 02:24:11 pm
@bfromdruten: You have convinced me!. I have just ordered the required cable. Hopefully by next week i will be abel to see my electricity and gas meter values on my vera. Can't wait......
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Jackpost on June 08, 2012, 03:44:52 pm
Received cable today...Works Great....

This is a cheaper and more accurate solution than my Envir.

Any chance modifying the plugin to show the 4 individual values instead of 1 total?

Thanks
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 11, 2012, 02:46:47 pm
I received the cable today. Reversing serial protocol was easy. The plugin is now showing watts and kWh's.
The gas value is still showing zero m3's.

To be clear: The plugin is showing the sum of to values of electricity intake from the net. It does not subtract(or show) the  (solar)electricity delivered to the net.

A plugin showing the 4 seperate values of take-in and production would indeed be a welcome improvement.
I studied the code myself, but I could not make anything of it.


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 11, 2012, 05:22:02 pm
@cmbeek I will try this week to modify the plugin by creating child devices for each value.
Is your gas meter connected to your electrical meter? Can you send me your plugin logging?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 12, 2012, 12:14:45 am
@bfromdruten The gas meter is not connected to the electrical meter by wire, but they "communicate" wireless.
As soon as a I figure out how to get tot the logfiles i will send you my plugin logging.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 13, 2012, 03:22:03 am
@bfromdruten
Below is the data I finally found in de logfiles. The current plugin displays de sum of the two values in bold.
I would be very pleased if there would be a plugin creating device(s) displaying all available values.

50   "   06/13/12"   8:59:12.07   "3   luup_log:60: MeterType: [XMX5XMXABCE000018061] <0x2e935680>"   
50   "   06/13/12"   8:59:12.12   "3   luup_log:60: Meter data: ""0-0:96.1.1(39373936353039382020202020202020)"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.16   "4   luup_log:60: Power meter import rate 1: 180.577000 <0x2e935680>"   
50   "   06/13/12"   8:59:12.17   "3   luup_log:60: Power meter import rate 2: 122.484000 <0x2e935680>"   
50   "   06/13/12"   8:59:12.21   "0   luup_log:60: Power meter export rate 1: 133.324000 <0x2e935680>"   
50   "   06/13/12"   8:59:12.23   "3   luup_log:60: Power meter export rate 2: 232.075000 <0x2e935680>"   
50   "   06/13/12"   8:59:12.25   "3   luup_log:60: Currently active tariff: [0002] <0x2e935680>"   
50   "   06/13/12"   8:59:12.27   "3   luup_log:60: CurrentWatts: [00000.00] <0x2e935680>"   
50   "   06/13/12"   8:59:12.32   "2   luup_log:60: Meter data: ""1-0:2.7.0(00000.00*kW)"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.32   "4   luup_log:60: Meter data: ""0-0:17.0.0(999*A)"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.33   "3   luup_log:60: Meter data: ""0-0:96.3.10(1)"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.35   "3   luup_log:60: Meter data: ""0-0:96.13.1()"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.37   "3   luup_log:60: Meter data: ""0-0:96.13.0()"" <0x2e935680>"   
50   "   06/13/12"   8:59:12.37   "3   luup_log:60: Meter data: ""!"" <0x2e935680>"   
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 13, 2012, 05:43:36 pm
@cmbeek: looking at your log, it looks like the gas reading is not send to your meter. I will create a new plugin version with more logging.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 13, 2012, 05:48:45 pm
Hi all,

Attached a new version. With this version separate PowerMeter devices are created for each tariff (import / export). Using the active tariff the current usage is distributed. Gas usage is still registered at the ' master'  device. Good luck.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 14, 2012, 12:06:03 am
@bfromdruten: Thanks a million!! Works the way I want it to work. Excellent job!!
I spend half of yesterday studying the code myself, but it would have taken weeks before I would have gotten as far a you did.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 14, 2012, 12:40:02 pm
@cmbeek: Thanks, but...does your gas meter work?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on June 14, 2012, 04:14:12 pm
@bfromdruten: My gasmeter is still not showing up in vera. I 've searched my logfiles but cannot find any "gas"values.

A bit off topic, but maybe a explanation of the gasmeter not showing:
This is the link to the manual of my smart meter: http://www.stedin.net/SiteCollectionDocuments/Consumenten_en_kleinzakelijk/Slimme%20meter/Handleiding%20slimme%20meter%20ZCF120ABd%20of%20ZMF120ABd.pdf  (http://www.stedin.net/SiteCollectionDocuments/Consumenten_en_kleinzakelijk/Slimme%20meter/Handleiding%20slimme%20meter%20ZCF120ABd%20of%20ZMF120ABd.pdf).
I was told that the gasmeter communicates with the smartmeter, whereas the smartmeter communicates with the "netbeheerder".
The meter has been installed only 7 weeks ago. Maybe installation was not 100% succesfull?
My new provider (Greenchoice) also seems to have problems getting meterreadings from the "netbeheerder".
I will give it some time.....



Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 15, 2012, 04:19:11 pm
Attached new version. Reset of usage on plugin after tariff changes.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: hschenkelaars on June 16, 2012, 01:52:10 am
@bfromdruten : Hi I'm just stepping into Domotica and wants to start measuring my power consumption. I was thinking to go for the NUON E-Manager but after investigating Vera it was clear that this is a better solution. I was convinced to go for vera when reading your post of measuring the dutch smart meter. My question is if the gas value can be read now, not a showbreaker for me, and if charting works on UI5? I want to buy the vera3 but am not sure it can be downgraded to UI4. Thx in advance for your reply.

regards
Hans Schenkelaars
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 16, 2012, 07:12:41 pm
@bfromdruten:

could you be so kind to make a step by step instruction for maken the correct cable and especialy the redirecting / reprogramming of the cable

thanks for your advice
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 20, 2012, 06:30:27 am
@bfromdruten:

have installed your plugin and have the following querry;

is is possible to have the readings sent by email to a certail email adress at a certain interval; (ie every monday at 12 hrs or so)

the reason is to monitor the consumption and record it in a seperate program
with out having a second pc running 24/7

your respond is highly appriciated


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 25, 2012, 11:46:29 am
@bfromdruten:

can you how i can find the data for the gas meter and the meter 1 and meter 2

if i read your I_dutchSmartMeter correctly the you save the data in "Gas" and "KWH"


at the moment i have created the scedule to sent once a week at monday at 1200 hrs an email to my self.

my idea is to sent the last taken value of the gas meter, e meter 1 and 2 at that moment

if i repeat the same event the next week i get the readigs from one week later

to get this we need to save the data from Gas en KWH (1&2) every time the data is taken from the serial port and every time overwritten.


can you advise and comment
thanks in advance


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 25, 2012, 01:43:00 pm
@huib: You can use the gas value from the parent device and the kwh values from powermeter1 and powermeter2. You can read the values by using luup code:

local METER_DEV_ID = 139
local METER1_DEV_ID = 140
local METER2_DEV_ID = 141

local gas= luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter", "gas",  METER_DEV_ID )
local kwh1= luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "kwh",  METER1_DEV_ID )
local kwh2= luup.variable_get(" urn:micasaverde-com:serviceId:EnergyMetering1 ", "kwh",  METER2_DEV_ID )

I don't know how to get these values into a e-mail, because e-mail is something I don't use from the Vera.

Why don't you use the excelent dataMine plugin to collect all values? If you don't have storage space you can setup a schedule to ftp the data files to another server.

Thanks,
Bernard
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 25, 2012, 03:38:29 pm
@bfromdruten:

i do not want to run  a second server, cause i am dutch, and i have the vera already running 24/7

i will try to fit in your comment in the luup for the mail and will post it here

one observation i faced that for the cable from antratek is is required to teke the driver from the supplier and install manually during the installation proces, otherwise it will not work



Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 25, 2012, 05:16:31 pm
@huib: you don't need a second server for dataMine. Just a usb memorystick where logging is stored. Works perfect.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 26, 2012, 05:33:01 am
@bfromdruten;


i have on the verelite only one usb which is now used for the meterkast reading
 

at the moment i recieve the following email

== Meterstanden van Tue Jun 26 11:23:10 2012, gas = 0, kwh1 = 0, kwh2 = 0 ==

so i get no data from the meterkast

i took the id device from the powermeter (s) but it does not work
which id i have to take

rgds

== quote ==
local smtp = require("socket.smtp")

        local SMTP_SERVER = "xxx.xxx.xx"
        local SMTP_PORT = "25"
        local USER_SENDING = "<xxxx.xxx@xxxxx.xxx>"
        local USER_RECEIVING = "<xxxxxxxxx@xxxxx.xxl>"

        local METER_DEV_ID = 27
        local METER1_DEV_ID = 34
        local METER2_DEV_ID = 35

local gas= luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter", "gas",  METER_DEV_ID ) or "0"
local kwh1= luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "kwh",  METER1_DEV_ID ) or "0"
local kwh2= luup.variable_get(" urn:micasaverde-com:serviceId:EnergyMetering1 ", "kwh",  METER2_DEV_ID ) or "0"

        local from = USER_SENDING
        local rcpt = {USER_RECEIVING}

        local mesgt = {
            headers = {
                to = USER_RECEIVING,
                subject = "Meterstanden van " .. os.date("%c")
            },
            body = "Meterstanden van "  .. os.date("%c") .. ", gas = " .. gas .. ", kwh1 = " .. kwh1 .. ", kwh2 = " .. kwh2
            }

        local r, e = smtp.send{
            from = from,
            rcpt = rcpt,
            source = smtp.message(mesgt),
            server = SMTP_SERVER,
            port = SMTP_PORT,
          }

        if (e) then
            luup.log("Yikes " ..  e)
        end
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on June 26, 2012, 06:18:23 am
Yes...found the issue. The capitals are not correct. The code should be:

local gas= luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas",  METER_DEV_ID ) or "0"
local kwh1= luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH",  METER1_DEV_ID ) or "0"
local kwh2= luup.variable_get(" urn:micasaverde-com:serviceId:EnergyMetering1 ", "KWH",  METER2_DEV_ID ) or "0"

About dataMine...why don't you use a USB hub?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on June 26, 2012, 08:01:34 am
@bfromdruten;

i got it now working

== result of out punt ==
Meterstanden van Tue Jun 26 13:54:04 2012, gas = 268.509, kwh1 = 416.009, kwh2 = 379.405
on weekly bases i enter the data in to ECOHOME and see the results

thanks for the assistance
about the datamine will be next puzzle

the luup is now as follows;

== quote ==
local smtp = require("socket.smtp")

        local SMTP_SERVER = "xxx.xxx.xxl"    -- < local server
        local SMTP_PORT = "25"
        local USER_SENDING = "<veralite@xxx.xxx>"  --< from
        local USER_RECEIVING = "<xxx@xxxxxxl>"  -- < to

        local METER_DEV_ID = 27
        local METER1_DEV_ID = 34
        local METER2_DEV_ID = 35

local gas= luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas",  METER_DEV_ID ) or "0"
local kwh1= luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH",  METER1_DEV_ID ) or "0"
local kwh2= luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH",  METER2_DEV_ID ) or "0"

        local from = USER_SENDING
        local rcpt = {USER_RECEIVING}

        local mesgt = {
            headers = {
                to = USER_RECEIVING,
                subject = "Meterstanden van " .. os.date("%c")
            },
            body = "Meterstanden van "  .. os.date("%c") .. ", gas = " .. gas .. ", kwh1 = " .. kwh1 .. ", kwh2 = " .. kwh2
            }

        local r, e = smtp.send{
            from = from,
            rcpt = rcpt,
            source = smtp.message(mesgt),
            server = SMTP_SERVER,
            port = SMTP_PORT,
          }

        if (e) then
            luup.log("Yikes " ..  e)
        end
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on July 01, 2012, 01:32:10 pm
@bfromdruten;
what i have to do to not show ''Powermeter ExportRate 1 & 2"

is it only modify the I_dutchSmartMeter and put --

            -- Create devices needed if not exist
            addPowerMeterDevice("ImportRate1")
            addPowerMeterDevice("ImportRate2")
         --   addPowerMeterDevice("ExportRate1")
         --   addPowerMeterDevice("ExportRate2")

or do i need todo more?

please advise

rgds
huib
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on July 14, 2012, 09:38:35 am
@huib
Yes..you are correct.

In a few days I will add this functionality as device setting, so you can configure the device to have import and/or export meters. I'm also planning to add an average use to the gas meter value (instead of only the total meter value).
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on August 06, 2012, 12:01:13 am
@bfromdruten Still very happy with you plugin for Dutch Smart meter. After some calling and mailing with my energyprovider I finally get the gasmeter values to my vera.
Next problem: How can i get this value displayed in SQ-remote. Sq-remote only seems to be able to display celsius, watts and kWh? Any idea of suggestion?

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on August 06, 2012, 02:11:34 pm
@cmbeek: I don't own a sq-remote, so I really can't help you on this one.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: futzle on August 06, 2012, 06:00:30 pm
How can i get this value displayed in SQ-remote.

You can't. SQRemote can only display a preset list of variable types. Custom plugin variables (as m^3 are) are unknown to SQRemote.

I recall that there was a request with Square Connect to allow users to ask for any custom variable to be displayed. As far as I know it hasn't been implemented yet.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Alphaxe on October 17, 2012, 05:23:43 am
Hi All,

I am new at this forum and an living in the Netherlands.

I follow this the products of micasaverde now for few months and want to buy an Vera Lite solution for home automation.
One of the first thinks i going to do is to connect it with my dutch smart meter with p1 port and also for security and light switching, the house i'm going to use for it is build at this moment so i do not now yet which smart meter is placed.

Can someone place some screenshots of the graphs that er made with the vera lite. is it also possible to log longterm usage to get nice overview of usage in different periods.

Hopefully can someone place some screenshots of the log results, so i can decide if this is the solution i looking for to monitor and log gas and engergy usage.

Regards,

Alphaxe
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: JaapvanEkris on October 22, 2012, 03:37:32 am
Hi,

I am also considering building the cable and requesting a smart meter. In all fairness, it is cheaper and better than hooking up converters from the meters, or buying seperate meters.

The Vera Lite comes with a Ergy Energy plugin (ergyenergy.com) which can be hooked up to any device. I haven't entered a "global" energy consumption meter yet, but the readback from my switches has proven much insight already. In Vera you can add a expected energy consumption for every switch, even if it doesn't measure energy consumption. What I can read back from ergy is pretty valuable because it not only shows Watts, but also Watt-hours. I now see my big energy wasters.

The default account is Lite, with almost no data storage. There are bigger accounts, the one for $20 allows you to go back 13 months in history.

Jaap
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on October 24, 2012, 02:23:25 pm
@bfromdruten;

could a ask for a proposal which might be incorporated in your plug; to have an option to see the total consumption over the last 24 hrs and to see the consumption over the last periode of chosen time.

an idea could be that each hour at X.00 the value of low and high electricity and gas are stored in a file at location {x} and the consumption over the last hour / last 24 hours can be made visible
the same for the the data of midnight and begining of each month. the are stored in a other file, so the daily and monthly trend can be made visible
if the value's are over write the old data the files wil not become very big.

please be so kind to have a look into it

rgds
huib



Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Jacob on October 24, 2012, 04:10:42 pm
I have installed the plugin to read-out my smart meter and it works brilliantly.
Electrical in- and export as well as the gas consumption.
To calculate and log the daily consumption I have made a Scene that runs every day at 07:00 and make use of some VariableContainer plugin's.
This date is in turn read by and stored in the DataMine plugin.
As I have no particular knowledge in Scene programming I have read the various solutions offered in this forum.
I think it is an appropriate moment to thank all persons offering their knowledge and time to come with these fantastic building blocks for everyone to develop his own home automation.

Jacob
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: ROBBshop on November 06, 2012, 10:52:26 am
@bfromdruten..
Thanks for you're app, it works perfect!
I have a solar request
In my Vera i see the actual PowerUsage (Watt) 1-0:1.7.0
If possible i would also like to see the value of 1-0:2.7.0 (solarpower to grid)
Maybe its an option that when the 1st is zero the displayed value changes to the power returned to the grid (with a - sign)
to show the actual return to the grid.
If you're too busy maybe we can do it ourselves when you give us some instructions...
Many thanks!!!!


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bfromdruten on November 07, 2012, 12:59:05 pm
@robvanbrunschot
I don't have any solar panels, so I can't test, but isn't it possible to use and deliver electricity back at the same moment? If so, separate devices is an better option. I also rather not use the same variable for two things, because the datamine data collection would not see the difference.

Thanks
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: ROBBshop on November 09, 2012, 05:17:04 pm
@bfromdruten: Let me rephrase my question: (very politely)
Can u help us to change you're code that when the variable 1-0:1.7.0 is 0 (not using power from the grid) the variable displayed for actual Power usage will be the negative of 1-0:2.7.0 (being the power returned to the grid?). My goal is to display what my house Is using out of the grid, or feeding back into it. I understand this does not account for the total usage at that moment.

The other way would be to just add 1-0:2.7.0 to the variable list and then rewrite the way it is displayed (may be the easier way from a coding standpoint....

I hope u understand what I mean.
Where not to lazy to do it ourselves :) we just don't know how :)
Thanks so much!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Crismaison on December 17, 2012, 10:43:37 am
Great plugin, works like a charm. Just a shame my sq connect does not allow me to show the gas usage

Edit... With the help of Huibs post I am able to send a mail at a certain time to receive the actual usage.
Would it be possible to send a weekly mail which compares the value of date1 and date2 and tells me the usage of that week.
I would love to get a weekly mail with my usage that week.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on December 28, 2012, 06:55:05 am
Hi,

Made some small changes for users who produce their own energy eg with with solar systems. Only file edited is "I_dutchSmartMeter.xml".

Changes:
1)    Edited  -- Check current watts section --
       Renamed this section to  -- Check current watts import --
       Added comments for documentation (and my own understanding of the code  ;D)
       Logging messages extended with word Import to make a difference with the added section by me
2)    Added Section -- Check current watts export --
       This section has the same structure as -- Check current watts import --
       Produced watts have minus mark (-) in front of the number as suggested by robvanbrunschot
       The root device will show the actual usage or production

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DiscoveryTD5 on January 02, 2013, 07:36:53 am
Hi,
I am following this tread and was wondering is anybody could post some screenshots from the plugin in use. Thanks
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on January 05, 2013, 07:05:59 am
Post/message 1 has some screenshots. Here another screenshot attached of the smartmeter plugin.

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on January 10, 2013, 02:57:20 am
Hi people.

having read this topic and since i have a vera lite since november 2012 and a dutch smartmeter since 2-1-2012 i ordered a serial cable on ebay (antratek does not have it in stock)
I already have my alarm system hooked up on serial so i hope a second cable on usb hub will work.

Is there a way to get a extra meter for gas as a separate device ?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: ROBBshop on January 10, 2013, 04:37:21 am
@bfromdruten : THANKS!!!!! :) gonna try it today and will let you know.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: ROBBshop on January 11, 2013, 06:03:21 am
@bfromdruten : Works perfect!!!! Really happy with it. Tried to sent you a message, but i can't. If you sent me a message to info@robbshop.nl I have something for u as a thank you (if you want, no obligations).
I have attached a photo of the - value (so my solarpanels are producing more than my usage)


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: MarQuez on January 11, 2013, 08:13:01 am
@bfromdruten

Would be possible that you create a separate gas meter just like the 4 separate power meters?
Now the standard meter (actual  use, tariff and gas) doesn't show anything on mobile apps.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on January 18, 2013, 10:14:00 am
@cmbeek or others who might know:
Ive got the smartmeter installed today and cable works like a charm....except the gas meter.
Any idea what to do (I see you had the same problem... what solved it?)
Thanks guys!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on January 18, 2013, 10:48:09 am
@druw I am not sure what solved it......
But it started working after asking my electricity company (greenchoice) why my smartmetersettings were not showing on their website. I guess they changed some settings which also resulted in showing gasmetervalues in the vera plugin......
Sorry, I can not help you with a more specific solution.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on January 18, 2013, 11:16:31 am
Wow, you are quick:)
Ive called Liander (network service) and the meter wasnt in their system yet (duh).
It seems that the meter values need to be pulled one time by them remotely in order to let the electricity meter and the gasmeter connect (and keep connected).
Since its RF, I hope it won't mess with my RFXCOM which is 2 meters up from the gas meter;)
If it doesnt work in I week, I need to call back...
Thanks for the direct response and for others: keep this in mind when you also receive a seperate gas and electricity meter which are not connected by cable...
(I wonder how the gasmeter receives power for his operation..)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Brighters on January 23, 2013, 06:40:01 am
How can I check that the P1 is sending any data at all?? I am not receiving anything, and the tool FT PROG does not seem to be able to display the current data.

I have attached a photo on how I connected it. I used a standard RJ11 cable, and used the red, black and yellow cable. I have put the blank ends into the black plug of the FTDI 5v USB converter.

I connected the USB cable to my netbook and I configured the chip to reverse the RX. I use Putty to monitor the COM-port but I am not seeing ANY data.... :(
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on January 23, 2013, 04:49:34 pm
@Zaphod

No idea, maybe you should check, double check.

At https://sites.google.com/site/nta8130p1smartmeter/  (https://sites.google.com/site/nta8130p1smartmeter/) you can find some additional info. At that site you can download  file  P1 Datalogger V5.rar https://sites.google.com/site/nta8130p1smartmeter/downloads/P1%20Datalogger%20V5.rar?attredirects=0&d=1 (https://sites.google.com/site/nta8130p1smartmeter/downloads/P1%20Datalogger%20V5.rar?attredirects=0&d=1). It also contains a small manual about the cable in dutch (RJ11 Convertercable.pdf). Maybe in there you find some hints.

Another good option is to post a message at domoticaforum http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104 (http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104)

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Brighters on January 24, 2013, 05:42:35 am
Switching the red and black cables from the RJ11 solved it. Apparently the cables do change over time... (of the FTDI)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 01, 2013, 04:12:32 pm
finaly its working , two usb serial cable's later (one 8 weeks waiting ebay china 7 euro and a dutch cable one dag waiting 25 euro).
The cable was not the problem.
Its was the meter.  The meterman came removed the seal. plugt-in a connector (intern). place the cover back. did make a new seal.
And It did work like a charm.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 02, 2013, 05:29:45 am
The  Dutch Smart Meter is not working with the envoy  sun pannels.
the dutch smart meter stays on 10 Watt
and the export stays on 0 Watt
the total count of al meters increased as expected
What is wrong in my settings?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 02, 2013, 06:31:45 am
@Peter, some optional steps you can do:
1) Restart LUUP
2) Reload VERA Interface
3) Force browser refresh, clear cache memory (Control-F5, or by the options of your browser)
4) Restart VERA
5) Delete Device & reinstall Meter Device
6) Check your logfiles and the values your meter produces 

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 02, 2013, 10:14:17 am
I have tryed al the steps but it is not helping.

this what i found in the log file:
50   02/02/13 16:11:38.254   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2e85d680>
50   02/02/13 16:11:38.274   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2e85d680>
50   02/02/13 16:11:38.294   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2e85d680>
50   02/02/13 16:11:38.304   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2e85d680>
50   02/02/13 16:11:38.354   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2e85d680>
50   02/02/13 16:11:38.374   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2e85d680>
50   02/02/13 16:11:38.424   luup_log:117: Gas meter reading in next line <0x2e85d680>
50   02/02/13 16:11:38.444   luup_log:117: Gas meter: [00709.601] <0x2e85d680>
06   02/02/13 16:11:38.445   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 709.601 now: 709.601 #hooks: 1 upnp: 0 v:0xfd48e0/NONE duplicate:1 <0x2e85d680>
50   02/02/13 16:11:38.454   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2e85d680>
50   02/02/13 16:11:38.464   luup_log:117: Meter data (not processed): "!" <0x2e85d680>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 03, 2013, 01:26:58 pm
Have you posted all energymetering parts from your log file?

It should start with something like...
01/27/13 22:00:29.130   Device_Variable::m_szValue_set device: 143 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: MeterType was: XMX5XMXABCE000034509 now: XMX5XMXABCE000034509 #hooks: 0 upnp: 0 v:0xb2cf00/NONE duplicate:1 <0x328b3680>

Now it looks like you do not get all messages... Have you looked in a terminal session at the raw output from your meter?

Look at http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104 (http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104) for examples of raw messages?

Do you get a complete telegram?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: woodyboy on February 03, 2013, 05:11:53 pm
Has somebody expiriences with reading a P1 from a Stedin ZCF120ABd? I've spending three days now and finally I think the problem is in the meter ???. I've tried it with a FTDI cable and a CMOS interface circuit, but on the Request input I read zero ?A while connected and while not connected the request port reads an infinite impedance. When connected the data output is continious low (about 0,2V) sinking >10mA dependent of the pull up resistor. Do I need a pull restistor on the data output? In my opinion it is an open collector output. The P1 companion standard stated a typical 5mA input current for the request line. Can somebody confirm to me that the request input current is about 5mA, then i know for sure that the fault is in the meter. TIA
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on February 04, 2013, 10:50:31 am
@Woodyboy: I don't know much about input currents. What I do know is that I have the exact same meter as you do (ZCF120ABd) and the meter is working fine with the vera plugin of this topic.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 04, 2013, 01:08:12 pm
this are the logs with brutgrink-com:

Code: [Select]
08   02/04/13 19:05:30.472   JobHandler_LuaUPnP::HandleActionRequest argument newLuaPattern=brutgrin <0x2f9c5680>
06   02/04/13 19:05:30.473   Device_Variable::m_szValue_set device: 105 service: urn:a-lurker-com:serviceId:LogViewer1 variable: ctrl_chr[35;1mLuaPatternctrl_chr[0m was: brutgrink-com now: brutgrin #hooks: 0 upnp: 0 v:0xf0d190/NONE duplicate:0 <0x2f9c5680>
06   02/04/13 19:05:34.595   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:34.774   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:35.024   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:44.614   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:44.794   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:45.044   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:54.635   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:54.814   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:05:55.064   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:04.664   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:04.835   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:05.085   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:14.684   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:14.864   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:15.114   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:24.705   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:24.884   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:25.134   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:34.725   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:34.904   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:35.155   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:44.744   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:44.924   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:45.174   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:54.774   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:54.944   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:06:55.204   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:04.794   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:04.974   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:05.224   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:14.815   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0xf0d170/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:14.994   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0xf6dcd8/NONE duplicate:1 <0x2f305680>
06   02/04/13 19:07:15.244   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 726.762 now: 726.762 #hooks: 1 upnp: 0 v:0xf6dcf8/NONE duplicate:1 <0x2f305680>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 04, 2013, 01:13:34 pm
@ woodyboy

My meter is also from Stedin.

my problem was that; the p1 connector was internal not connected (behind the seal).
The meterman from stedin fixt it for me.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: woodyboy on February 04, 2013, 03:50:36 pm
Peter, Thanks for your reply. I'm in doubt, because the data line is sinking current, but the request line looks isolated. My meter is from Stedin too. Maybe it is the same problem. I think I'll contact Stedin to solve the problem.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 06, 2013, 06:52:49 am
how can get my export meters right?
my dutch smart meter is always shows 10 watt when i have to much sun power.
And my export value is always -0 watt
a strange thing is that in datamine I have a "exportrate 2, KWH" but not a "exportrate 2, Watt" as I have a "exportrate 1, KWH" and a "exportrate 1, Watt".




this i my log file:

Code: [Select]
06   02/06/13 12:46:55.430   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:05.020   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:05.210   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:05.450   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:15.040   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:15.230   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:15.470   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:25.070   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:25.250   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:25.490   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:35.090   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:35.280   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:35.520   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:45.110   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:45.292   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:45.540   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:55.130   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:55.320   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:47:55.560   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:05.150   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:05.340   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:05.580   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:15.180   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:15.429   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:15.600   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:25.200   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:25.403   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:25.630   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:35.220   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:35.430   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:35.649   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:45.240   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:45.450   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:45.670   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:55.260   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:55.470   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:48:55.690   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:05.290   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:05.460   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:05.720   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:15.310   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:15.520   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:15.740   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:25.330   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:25.540   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:25.760   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:35.350   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:35.560   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:35.781   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:45.370   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:45.580   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:45.800   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:55.400   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:55.603   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:49:55.820   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:05.420   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:05.630   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:05.850   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:15.440   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:15.650   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:15.870   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:25.460   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:25.670   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:25.890   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:35.480   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:35.710   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:35.910   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:45.510   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:45.721   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:45.930   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:55.530   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:55.812   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
06   02/06/13 12:50:55.963   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 06, 2013, 07:34:22 am
i Found more interesting log:

Vera: /var/log/cmh/LuaUPnP.log
Code: [Select]

50   02/06/13 13:27:00.479   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:00.480   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:00.509   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:00.510   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:00.520   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:00.539   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:00.559   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:00.569   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:00.619   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:00.639   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:00.690   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:00.709   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:00.710   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:00.719   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:00.729   luup_log:117: Meter data (not processed): "!" <0x2facc680>
50   02/06/13 13:27:10.299   luup_log:117: MeterType: [XMX5XMXABCE000031755] <0x2facc680>
06   02/06/13 13:27:10.300   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:10.349   luup_log:117: Meter data (not processed): "0-0:96.1.1(39383239363039342020202020202020)" <0x2facc680>
50   02/06/13 13:27:10.379   luup_log:117: Power meter ImportRate1: 743.028000 <0x2facc680>
50   02/06/13 13:27:10.409   luup_log:117: Power meter ImportRate2: 600.031000 <0x2facc680>
50   02/06/13 13:27:10.429   luup_log:117: Power meter ExportRate1: 22.852000 <0x2facc680>
50   02/06/13 13:27:10.460   luup_log:117: Power meter ExportRate2: 86.341000 <0x2facc680>
50   02/06/13 13:27:10.479   luup_log:117: Currently active tariff: [0002] <0x2facc680>
06   02/06/13 13:27:10.480   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:10.499   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:10.500   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:10.529   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:10.530   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:10.549   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:10.559   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:10.579   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:10.590   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:10.640   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:10.659   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:10.719   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:10.729   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:10.730   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:10.749   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:10.750   luup_log:117: Meter data (not processed): "!" <0x2facc680>
08   02/06/13 13:27:15.436   JobHandler_LuaUPnP::HandleActionRequest argument newLuaPattern=117 <0x3058c680>
06   02/06/13 13:27:15.437   Device_Variable::m_szValue_set device: 105 service: urn:a-lurker-com:serviceId:LogViewer1 variable: ctrl_chr[35;1mLuaPatternctrl_chr[0m was: Exportrate now: 117 #hooks: 0 upnp: 0 v:0x93f3f8/NONE duplicate:0 <0x3058c680>
50   02/06/13 13:27:20.320   luup_log:117: MeterType: [XMX5XMXABCE000031755] __LEAK__ this:331776 start:3780608 to 0x1073000 <0x2facc680>
06   02/06/13 13:27:20.320   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:20.369   luup_log:117: Meter data (not processed): "0-0:96.1.1(39383239363039342020202020202020)" <0x2facc680>
50   02/06/13 13:27:20.399   luup_log:117: Power meter ImportRate1: 743.028000 <0x2facc680>
50   02/06/13 13:27:20.429   luup_log:117: Power meter ImportRate2: 600.031000 <0x2facc680>
50   02/06/13 13:27:20.459   luup_log:117: Power meter ExportRate1: 22.852000 <0x2facc680>
50   02/06/13 13:27:20.480   luup_log:117: Power meter ExportRate2: 86.344000 <0x2facc680>
50   02/06/13 13:27:20.503   luup_log:117: Currently active tariff: [0002] <0x2facc680>
06   02/06/13 13:27:20.503   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:20.529   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:20.530   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:20.549   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:20.550   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:20.569   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:20.589   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:20.599   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:20.619   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:20.669   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:20.679   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:20.739   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:20.749   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:20.750   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:20.769   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:20.770   luup_log:117: Meter data (not processed): "!" <0x2facc680>
50   02/06/13 13:27:30.349   luup_log:117: MeterType: [XMX5XMXABCE000031755] <0x2facc680>
06   02/06/13 13:27:30.350   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:30.399   luup_log:117: Meter data (not processed): "0-0:96.1.1(39383239363039342020202020202020)" <0x2facc680>
50   02/06/13 13:27:30.419   luup_log:117: Power meter ImportRate1: 743.028000 <0x2facc680>
50   02/06/13 13:27:30.449   luup_log:117: Power meter ImportRate2: 600.031000 <0x2facc680>
50   02/06/13 13:27:30.479   luup_log:117: Power meter ExportRate1: 22.852000 <0x2facc680>
50   02/06/13 13:27:30.500   luup_log:117: Power meter ExportRate2: 86.348000 <0x2facc680>
50   02/06/13 13:27:30.530   luup_log:117: Currently active tariff: [0002] <0x2facc680>
06   02/06/13 13:27:30.530   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:30.549   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:30.550   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:30.569   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:30.570   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:30.589   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:30.609   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:30.619   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:30.639   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:30.690   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:30.709   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:30.760   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:30.769   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:30.770   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:30.789   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:30.790   luup_log:117: Meter data (not processed): "!" <0x2facc680>
50   02/06/13 13:27:40.369   luup_log:117: MeterType: [XMX5XMXABCE000031755] <0x2facc680>
06   02/06/13 13:27:40.370   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:40.419   luup_log:117: Meter data (not processed): "0-0:96.1.1(39383239363039342020202020202020)" <0x2facc680>
50   02/06/13 13:27:40.440   luup_log:117: Power meter ImportRate1: 743.028000 <0x2facc680>
50   02/06/13 13:27:40.469   luup_log:117: Power meter ImportRate2: 600.031000 <0x2facc680>
50   02/06/13 13:27:40.499   luup_log:117: Power meter ExportRate1: 22.852000 <0x2facc680>
50   02/06/13 13:27:40.530   luup_log:117: Power meter ExportRate2: 86.351000 <0x2facc680>
50   02/06/13 13:27:40.551   luup_log:117: Currently active tariff: [0002] <0x2facc680>
06   02/06/13 13:27:40.552   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:40.569   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:40.570   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:40.589   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:40.590   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:40.609   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:40.629   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:40.649   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:40.659   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:40.709   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:40.729   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:40.779   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:40.799   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:40.800   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:40.809   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:40.810   luup_log:117: Meter data (not processed): "!" <0x2facc680>
50   02/06/13 13:27:50.389   luup_log:117: MeterType: [XMX5XMXABCE000031755] <0x2facc680>
06   02/06/13 13:27:50.390   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mMeterTypectrl_chr[0m was: XMX5XMXABCE000031755 now: XMX5XMXABCE000031755 #hooks: 0 upnp: 0 v:0x93f3d8/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:50.439   luup_log:117: Meter data (not processed): "0-0:96.1.1(39383239363039342020202020202020)" <0x2facc680>
50   02/06/13 13:27:50.469   luup_log:117: Power meter ImportRate1: 743.028000 <0x2facc680>
50   02/06/13 13:27:50.490   luup_log:117: Power meter ImportRate2: 600.031000 <0x2facc680>
50   02/06/13 13:27:50.519   luup_log:117: Power meter ExportRate1: 22.852000 <0x2facc680>
50   02/06/13 13:27:50.550   luup_log:117: Power meter ExportRate2: 86.355000 <0x2facc680>
50   02/06/13 13:27:50.579   luup_log:117: Currently active tariff: [0002] <0x2facc680>
06   02/06/13 13:27:50.580   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mActiveTariffctrl_chr[0m was: 2 now: 2 #hooks: 1 upnp: 0 v:0x99ff50/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:50.589   luup_log:117: CurrentWattsImport: [0000.00] <0x2facc680>
50   02/06/13 13:27:50.590   luup_log:117: CurrentActiveTariffImport: [2] <0x2facc680>
50   02/06/13 13:27:50.619   luup_log:117: CurrentWattsExport: [0000.00] <0x2facc680>
50   02/06/13 13:27:50.620   luup_log:117: CurrentActiveTariffExport: [2] <0x2facc680>
50   02/06/13 13:27:50.629   luup_log:117: Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>
50   02/06/13 13:27:50.649   luup_log:117: Meter data (not processed): "0-0:96.3.10(1)" <0x2facc680>
50   02/06/13 13:27:50.669   luup_log:117: Meter data (not processed): "0-0:96.13.1()" <0x2facc680>
50   02/06/13 13:27:50.679   luup_log:117: Meter data (not processed): "0-0:96.13.0()" <0x2facc680>
50   02/06/13 13:27:50.729   luup_log:117: Meter data (not processed): "0-1:96.1.0(3238303131303038323332303533313132)" <0x2facc680>
50   02/06/13 13:27:50.749   luup_log:117: Meter data (not processed): "0-1:24.1.0(03)" <0x2facc680>
50   02/06/13 13:27:50.799   luup_log:117: Gas meter reading in next line <0x2facc680>
50   02/06/13 13:27:50.819   luup_log:117: Gas meter: [00737.611] <0x2facc680>
06   02/06/13 13:27:50.820   Device_Variable::m_szValue_set device: 117 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ctrl_chr[35;1mGasctrl_chr[0m was: 737.611 now: 737.611 #hooks: 1 upnp: 0 v:0x99ff70/NONE duplicate:1 <0x2facc680>
50   02/06/13 13:27:50.829   luup_log:117: Meter data (not processed): "0-1:24.4.0(1)" <0x2facc680>
50   02/06/13 13:27:50.839   luup_log:117: Meter data (not processed): "!" <0x2facc680>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 06, 2013, 04:03:09 pm
no one can help me?  I did some changes in I_dutchSmartMeter.xml but nothing helped
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on February 06, 2013, 04:18:07 pm
@Peter
The only help I can provide is confirming that the datamine plugin indeed keeps displaying 10 watts when there is more electricity produces bij solar power than there is used within the house.....
My datamine plugin is showing the same symptoms.


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 06, 2013, 05:09:30 pm
  @cmbeek i thought I did something wrong, but it is the plugin. :P
Do you also have  no exportrate meter 2 - Watt?
And the same error's in the log like "Meter data (not processed): "0-0:17.0.0(999*A)" <0x2facc680>"
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on February 07, 2013, 12:13:51 am
@Peter

I also am missing a exportrate2.
In the attached xml file i posted a part of my logging.
In Line number 18 is the place where i would expect exportrate2 to appear. But in line number 18 there is an Error message which contains number 43 which happens to be the id of my export rate number2.......?

I will investigate a bit more after work......
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 07, 2013, 04:13:51 pm
maybe I found the problem, i have changed a line in I_dutchSmartmeter.xml from

luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, (findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2)))*-1))

In to

luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, findChild(THIS_DEVICE,"ExportRate" .. ((1+(activeTariff % 2))*-1)))

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 07, 2013, 04:26:03 pm
@Peter @cmbeek

It is a good idea to use a terminal program and to catch the full telegram of your smart meter produces. This will tell us of your problem can be fixed. Maybe your meter does not fill all fields of the P1 protocol. Maybe your meter has not all values, as posted in the eneco forum: https://forum.eneco.nl/groene-stroom-wind-zonne-energie-e-a-93/p1-poort-slimme-meter-4786/ (https://forum.eneco.nl/groene-stroom-wind-zonne-energie-e-a-93/p1-poort-slimme-meter-4786/)

The raw messaage should be something like:

Quote
!
/ACE5ACE4KGPRS

0-0:96.1.0*255(0505514284290517)
1-0:1.8.0*255(006066.388*kWh)
1-0:1.8.1*255(003918.196*kWh)
1-0:1.8.2*255(002148.192*kWh)
1-0:2.8.0*255(000905.811*kWh)
1-0:2.8.1*255(000496.123*kWh)
1-0:2.8.2*255(000409.688*kWh)
0-0:96.14.0*255(02)
1-0:15.7.0*255(000110*W)
0-0:17.0.0*255(0100*A)
0-0:96.3.10*255(1)
!

For more information on the protocol and how to get the telegram see http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104 (http://www.domoticaforum.eu/viewtopic.php?f=71&t=6104)
 or http://blog.hekkers.net/2012/09/11/processing-the-smart-meter-data-3/ (http://blog.hekkers.net/2012/09/11/processing-the-smart-meter-data-3/) or http://www.bwired.nl/weblog.asp?id=456 (http://www.bwired.nl/weblog.asp?id=456)

The protocol translates to:

Quote
#define P1PU1  "1-0:1.8.1"      // total power usage normal tariff
#define P1PU2  "1-0:1.8.2"      // total power usage low tariff
#define P1PD1  "1-0:2.8.1"   // total delivered power normal tariff
#define P1PD2  "1-0:2.8.2"   // total delivered power low tariff
#define P1TIP  "0-0:96.14.0"    // tariff indicator power
#define P1PUC  "1-0:1.7.0"   // current power usage
#define P1PDC  "1-0:2.7.0"   // current power delivery
#define P1GTS  "0-1:24.3.0"   // timestamp gas usage sample


There could also be different versions of the P1 protocol. If you know the raw output (the terminal message) of your meter you can edit the file "I_dutchSmartMeter.xml". In it you have to look for  the part " -- Check current watts import/export". Here you could change the script and make it search for the headers your meter produces. After we know the difference we can make a new unified version of the script, which supports different versions of the protocol.

@Peter

I saw you posted while I was typing. Good you found your way to "I_dutchSmartMeter.xml". This is indeed the place to fix problems.

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 07, 2013, 04:29:19 pm
I did that, but i did not found a problem with headers in the output used in de code.

1-0:2.7.0(0000.00*kW) is the export from the sun pannels ( is now zero, it is night in holland)

/XMX5XMXABCE000031755

0-0:96.1.1(39383239363039342020202020202020)
1-0:1.8.1(00745.852*kWh)
1-0:1.8.2(00608.968*kWh)
1-0:2.8.1(00022.852*kWh)
1-0:2.8.2(00090.739*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.82*kW)
1-0:2.7.0(0000.00*kW)
0-0:17.0.0(999*A)
0-0:96.3.10(1)
0-0:96.13.1()
0-0:96.13.0()
0-1:96.1.0(3238303131303038323332303533313132)
0-1:24.1.0(03)
0-1:24.3.0(130207210000)(00)(60)(1)(0-1:24.2.0)(m3)
(00740.665)
0-1:24.4.0(1)
!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 07, 2013, 04:36:40 pm
@Peter

Thanks for the raw telegram. Now we know the telegram is complete we know it can be fixed in the code. I saw you changed theI_dutchSmartmeter.xml. So keep us informed. If this fixes the problem post the complete package, so other users can help to test the improved code.

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 07, 2013, 05:01:08 pm
It was not the problem.

I thought why there is a bracket arround findChild by import rate 1, which is not  arround findchild by export rate.
But when I changed it, I saw my actual usage was changed to 0 watt on my Dutch smart Meter.

-- import rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, findChild(THIS_DEVICE,"ImportRate" .. (1+(activeTariff % 2))))

-- export rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, (findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2)))*-1))
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 08, 2013, 04:45:50 am
@Peter,

In post 64 I see 6 devices:
1) Main device
2) Import Meter 1 (child device)
3) Import Meter 2 (child device)
4) Export Meter 1 (child device)
5) Export Meter 2 (child device)
6) Solar Panels/Envoy (???)

In my setup I only got the first 5 devices (see picture post 43) and no separate "solardevice". Is this device created by the plug in? Maybe this is the source of your plugin not working?

Mark
 
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 08, 2013, 11:28:02 am
the Envoy is another mios vera plugin for sun pannels  from enlighten : (https://enlighten.enphaseenergy.com/public_systems)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 08, 2013, 11:40:47 am
I think the problem is the meter. The total from 1-0:2.8.2 is going up, but with 1-0:2.7.0(0000.00*kW) mostly happens nothing  ???

look attachmend

Code: [Select]
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.02.08 13:11:12 =~=~=~=~=~=~=~=~=~=~=~=

/XMX5XMXABCE000031755

0-0:96.1.1(39383239363039342020202020202020)
1-0:1.8.1(00752.358*kWh)
1-0:1.8.2(00611.225*kWh)
1-0:2.8.1(00022.852*kWh)
1-0:2.8.2(00091.943*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.01*kW)
1-0:2.7.0(0000.00*kW)
0-0:17.0.0(999*A)
0-0:96.3.10(1)
0-0:96.13.1()
0-0:96.13.0()
0-1:96.1.0(3238303131303038323332303533313132)
0-1:24.1.0(03)
0-1:24.3.0(130208130000)(00)(60)(1)(0-1:24.2.0)(m3)
(00749.014)
0-1:24.4.0(1)
!
/XMX5XMXABCE000031755

0-0:96.1.1(39383239363039342020202020202020)
1-0:1.8.1(00752.358*kWh)
1-0:1.8.2(00611.225*kWh)
1-0:2.8.1(00022.852*kWh)
1-0:2.8.2(00091.947*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(0000.00*kW)
1-0:2.7.0(0000.01*kW)
0-0:17.0.0(999*A)
0-0:96.3.10(1)
0-0:96.13.1()
0-0:96.13.0()
0-1:96.1.0(3238303131303038323332303533313132)
0-1:24.1.0(03)
0-1:24.3.0(130208130000)(00)(60)(1)(0-1:24.2.0)(m3)
(00749.014)
0-1:24.4.0(1)
!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on February 08, 2013, 12:53:24 pm
@Peter

Looking at your putty log it appears to be your meter. Look at https://forum.eneco.nl/groene-stroom-wind-zonne-energie-e-a-93/p1-poort-slimme-meter-4786/ (https://forum.eneco.nl/groene-stroom-wind-zonne-energie-e-a-93/p1-poort-slimme-meter-4786/) seems others have exactly the same. Maybe it is not implemented or a bug of this specific type of smartmeter. Maybe you could search some more on the brand and model-number of your meter. What model and number do you have?

Mark
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on February 08, 2013, 01:16:48 pm
@ mfp looks like the same problem. I don't have eneco so I can't react to the post.

He now use a workaround in his software by every 5 minutes the P1 output process and, each time it calculate the difference in the readings.
This therefore gives the consumption or redelivery every 5 min, but I don't no how to use this in the plugin .

a picture  8)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on February 23, 2013, 07:31:47 am
Newbie: Is this available in the app store of vera? under what name?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: joost1981 on February 23, 2013, 07:45:44 am
I ordered a P1 -> USB cable (http://www.wirelesswonen.nl/Webwinkel-Product-22714125/Kabel-tbv-Slimme-meter.html) and plugged it in my Vera2 (UI5). Works like a charm!! ;D

Thank you for your good work!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: joost1981 on February 23, 2013, 07:47:46 am
Newbie: Is this available in the app store of vera? under what name?

I was not able to find it in the app store, installed it manually as explained in this forum.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on February 24, 2013, 04:38:50 am
Newbie: Is this available in the app store of vera? under what name?

I was not able to find it in the app store, installed it manually as explained in this forum.

There are several versions under several postst... what is the latest? version "b"?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Ric on February 24, 2013, 06:02:05 am
I bought my smart meter cable at http://www.robbshop.nl/overige/slimme-meter-kabel-detail (http://www.robbshop.nl/overige/slimme-meter-kabel-detail) They have good prices and free delivery.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 01, 2013, 08:45:18 am
Hi all,

everything is in place. Plugin installed, cable connected, devices are there, datamine is working (for other devices for months). But no meters yet... they will probaly come monday. (and that could be the answer for my question, but I doubt it is).

In advance I have a question.

I have used datamine for all kinds of logging of other sensors. Also for this pluging I would like to monitor and mine. When I want to select the devices/values to log, I can only choose "1" device: Gas.

I can choose: Powermeter InportRate1 (till 4) and they all show as gas...

How can I log:
Day usage
Night usage
Gas
(I don't deliver back energy).

Any good tips? Experiences?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on March 01, 2013, 03:03:10 pm
@sandertl

Have a look at the dutch meter additional plugin
There you have a daily high low and gas recording
Further a monthy and yearly recording

Rgds
Huib
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 02, 2013, 01:41:48 am
@sandertl

Have a look at the dutch meter additional plugin
There you have a daily high low and gas recording
Further a monthy and yearly recording

Rgds
Huib

Huib,

Thanks for your reply.

Of course I need the data next to other data that is in datamine. So question is still valid and unanswered.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 04, 2013, 03:48:12 am
It was not the problem.

I thought why there is a bracket arround findChild by import rate 1, which is not  arround findchild by export rate.
But when I changed it, I saw my actual usage was changed to 0 watt on my Dutch smart Meter.

-- import rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, findChild(THIS_DEVICE,"ImportRate" .. (1+(activeTariff % 2))))

-- export rate 1
                        luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", 0, (findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2)))*-1))


Peter,

you have posted this and another message about the "(". Did it help? Was it meant to "not be" there?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 04, 2013, 03:56:25 am
And another question:

The "Powermeter ImportRate2" is showing 2 values...
when I click the configure button is shows 0.107 KWH and after closing the realt time value is given (as in picture)...

Shouldn't the value "Powermeter ImportRate2" be the same as "actual usage" of the master device?

RESOLVED: after a while and a reboot is was gone.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 06, 2013, 10:51:09 am
Any thoughts on how I can acheive a "seperate" Gasmeter device (besides the 4 seperate existing devices)? Now the gas value is given in the master device. Electric values are also passed through to the four seperate values (day/night/in/out).

Thanks.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 12, 2013, 11:23:50 am
After upgading to Vera3 (from Vera2) I cannot read my metervalues anymore...

Failed to open IO Port is the error on top of Vera.

have tried several things...  change IOdevice number (is 102 and tried 101 and 103)... removed the meterkast device and recreated (but now I only have 1 out of 5 previous devices). Values keep empty.

what could be wrong with my settings? the serial port setting is as follows attached.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on March 12, 2013, 01:45:29 pm
Databit should be on 8 and not on 7.

Verstuurd van mijn ASUS Transformer Pad TF300T met Tapatalk
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 12, 2013, 01:53:15 pm
Hi mfp, why? P1 is 7 bits. See also first post.

After the device is created you have to configure the serial port. First attach the cable. Go to apps=>develop apps=>serial port configuration and select the correct USB device. Set the serial parameters to 9600,even,7bits,1stop bit
In the dropdown box select the name you used creating your device.

Btw have tried to be sure.... same problem.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on March 12, 2013, 03:18:33 pm
You`re right confused the settings with another device, your settings are correct. Can you see anaything in your logfile?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on March 12, 2013, 03:20:00 pm
Where can I find the logfile for this?

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on March 12, 2013, 04:05:57 pm
Login with a a client like telnet. On Windows you can use puTTY.

You can find the logfile in var/log/cmh/LuaUPnP.log. With vi you could read the file.

If you are on windows you could also transfer the file to the windows machine and read it over there. To do this you could use the tool WinSCP.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: MarQuez on March 16, 2013, 02:46:04 pm
Any thoughts on how I can acheive a "seperate" Gasmeter device (besides the 4 seperate existing devices)? Now the gas value is given in the master device. Electric values are also passed through to the four seperate values (day/night/in/out).

Thanks.

I also tried to achieve this by editing some files but i never got it working (not even close). Would be nice if someone could fix that, or give advice on how to do this.

Also someone know if it is possible to change the code so that the data can be taken from a raspberry pi with ser2net where the p1 cable is connected to?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Xanlle on March 17, 2013, 04:44:51 pm
Would it be possible to use 'Actual usage' (watt) as input for the Datamine plugin's dashboard tab?

The manual reads: "The whole-house gauge provides the current whole house energy use. It is a sum of all the whole house energy categories..."

'Actual usage' collected with the Dutch Smart meter plugin equals the 'whole house energy usage', but the datamine plugin needs to know  that. Possible?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: MarQuez on March 20, 2013, 04:21:22 am
I found already a way to connect the plugin to my raspberry pi. 
The app IPSerial Plugin which can be found in the app store does the trick.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on March 24, 2013, 12:36:37 pm
@Xanlle

Read the excellent manual by Chris http://forum.micasaverde.com/index.php/topic,13057.0.html (http://forum.micasaverde.com/index.php/topic,13057.0.html). In it you can read that for whole house you just have to use category 1 and the selected device is put in the category whole house. This works for this device.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on March 27, 2013, 06:45:15 pm
Is it possible to see the difference in  kWh of solar power every min in a datamine graph?
This is because my dutchmeter can't show current returned power(Watts).
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on April 17, 2013, 01:27:23 pm
Today i installed solar panels but...... The smartmeter plugin does not show export actual usage. Is that correct ?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on April 17, 2013, 02:15:16 pm
I don't know if it is correct. What i do know is that is exactly the same as in my situation.
When exporting electricity it shows 0 or 10 or -10.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on April 17, 2013, 04:56:33 pm
I don't know if it is correct. What i do know is that is exactly the same as in my situation.
When exporting electricity it shows 0 or 10 or -10.
Strange i'd expect a watt number for export too
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: cmbeek on April 17, 2013, 11:43:43 pm
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.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on April 18, 2013, 05:25:50 am
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.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on June 05, 2013, 03:04:31 am
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))
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on June 06, 2013, 03:42:54 am
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))))
Title: How to setup the smartmeter (P1)
Post by: informatie 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 ?




Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Crismaison on June 14, 2013, 05:09:21 am
Have a look here: a description in Dutch: http://gathering.tweakers.net/forum/list_messages/1533251 (you need to scroll a little down)
Title: Meter are not showing
Post by: informatie 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.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on October 17, 2013, 01:23:32 pm
How can I see my gaz consumption a day during a year instead of the increasing total of gaz consumption a day?
See attachment
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on October 23, 2013, 04:51:12 am
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?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on November 09, 2013, 04:19:29 am
No one?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Snotneus on November 10, 2013, 12:49:37 pm
@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.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on December 10, 2013, 03:26:03 pm
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?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on December 10, 2013, 03:42:03 pm
Start with buying new cable
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Crismaison on December 10, 2013, 03:46:10 pm
Link cable to pc and use a freeprogram to the read the meter?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on December 10, 2013, 04:05:34 pm
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;)?)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Crismaison on December 10, 2013, 04:07:53 pm
http://www.smartmeterdashboard.nl/home
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on December 10, 2013, 04:28:01 pm
I am really going to be honest by saying that I really dont know anything much about this stuff.
I usually stick with zwave but this was an easy addition... well it was...
The cable type should be the correct one right?
I will try to get the V6 P1 datalogger to work on my old laptop (battery=dead) tomorrow but I hope I can figure out what to do exactly...
Is there any easy way to see on my Vera if it is receiving data?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on December 11, 2013, 02:03:26 am
Yes, in the vera logging there should be some action
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: DRuw on December 11, 2013, 05:59:29 am
Tried the cable in a old laptop with the software etc.
Does not show any activity ???
The Chip can be accessed with the pc and the signal is inverted but it does not seem the actual meter is giving signals??
Could by P1 port be defective or something?
Any idea how i can check this or how to troubleshoot?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mr leaver on December 13, 2013, 02:09:03 am


Did you reverse the signals and cycle port after programming the port (FTDI tool)

http://forum.micasaverde.com/index.php/topic,10736.msg74910.html#msg74910
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on December 19, 2013, 04:19:03 pm
@bfromdruten; can you assist in the following;

have changed the p1 connection from usb to tcp by using a tll/tcp adapter
the info is now coming from an IP adress (192.168.2.80:1470)

what need i to change in your files to get it working
thanks
huib
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: huib on December 22, 2013, 09:43:40 am
have changed the usb input into netwerk input. have changed the input from p1 into ttl>tcp and via a fixed ip adress i read now the data

i have changed the files from original ino input via ip

only i get a lot of warnings in the log file

luup_iop_open 0xe67360 args 3 bad device/ip/port <0x2f96a680>

some body some advice?

huib
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on December 22, 2013, 12:10:52 pm
Huib hope you get a response quickly. I've experienced this part of the forum not so responsive.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on December 24, 2013, 09:01:40 am
Hi all, snotneus has offered me a help. Thanks for that snotneus, but I think it is not so applicable for me, is it? However, if you or anone can help me to alter the file to proces data every 1/3 of the time? That would be very great! Thanks in advance.

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?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on December 24, 2013, 01:27:52 pm
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.


Could you post your implementation file? I am curious what you have changed to wait for end of message character "!"
I also made modifications to the file for the PV-installation.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Snotneus on December 26, 2013, 03:43:51 am
Hi,

I have attached the implementation file.
I had to make a copy because I had to remove some Email addresses, which are used to send the meter values once each month.
For the rest the source is as it runs fine on my Vera2.

Waiting for the end of message character "!" is copied in below (it is part of the attached file):

###########################################
function doProcess(data)
   if (string.find(data, strImpMeterKwh1) ~= nil) then
      smImpMeterKwh1 = data;
   elseif (string.find(data, strImpMeterKwh2) ~= nil) then
      smImpMeterKwh2 = data;
   elseif (string.find(data, strExpMeterKwh1) ~= nil) then
      smExpMeterKwh1 = data;
   elseif (string.find(data, strExpMeterKwh2) ~= nil) then
      smExpMeterKwh2 = data;
   elseif (string.find(data, strImpCurWatt) ~= nil) then
      smImpCurWatt = data;
   elseif (string.find(data, strExpCurWatt) ~= nil) then
      smExpCurWatt = data;
   elseif (string.find(data, strImpMeterM3) ~= nil) then
      smTimeStampM3 = data   --Bijv: 0-1:24.3.0(130315180000)(00)(60)(1)(0-1:24.2.1)(m3)
      doGasReading = true;
   elseif (doGasReading == true) then
      doGasReading = false;
      smImpMeterM3 = data;
   end;

   if (string.find(data, strComplete) == nil) then
      return;
   end;
###########################################

The function continues of course, but look at the last three lines.
strComplete is defined as local strComplete = "!" at start up of the program.
Also the strings like strImpMeterKwh1 etc are initialised at startup

So as long as no character "!" has been recieved, processing of data is interrupted.

When the incoming data from the Smartmeter is handled this way, it is also very easy to limit updating the device and its children by just adding a counter after the last three lines, which also escapes from further processing, until the counter is greater then three, or whatever.

Hope this makes sense.

If something is not clear, let me know and I will try to explain.

Regards.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on December 27, 2013, 05:03:26 pm
@Snotneus I renamed the file to  I_dutchSmartMeter, can I leave D_dutchSmartMeter.(xml/json) and S_dutchSmartMeter.xml as the where?
and I have also a gas meter. Do I have to change local doGasReading = false; to "true"
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Snotneus on December 28, 2013, 01:25:45 am
@Peter, no, the I_EnergyMeter.xml does not match with the original files and the variable "doGasReading" should not be changed. It only exists to indicate that the next incoming string is gas data.

I have shared the source code only as an example how it would be possible to get a smoother processing of incoming data (at least to my opinion) and to show a possibility to add a kind of delay in updating the device.

The I_EnergyMeter.xml is developed to accommodate  my own special needs and not to have a universal meter reading device.
You will be better off to use the original smartMeter plug-in.

You can however use some parts of the I_EnergyMeter to change the I_DutchSmartMeter.xml, but be carefull to use the right variables.

Regards.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on December 28, 2013, 03:36:58 pm
@Snotneus Thank you.  I will look at the code to see if I can find a Way to reduce the number of measurements.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on December 28, 2013, 03:38:33 pm
@peter, if you succeed PLEASE let me know how
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: pingreply on February 13, 2014, 01:44:51 am
Has anyone had any success with a DSMR 4.0 smart meter? I've gotten one and I'm not getting any information from the port.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 02, 2014, 12:24:50 pm
Hi, for the DSMR 4 meters you should set the serial port to 115200 8N1. Works for me after some start up issues. Nice app!

If I now can figure out to show the output of my Enphase Envoy solar system I would be a happy camper.

Cheers Rene.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on March 17, 2014, 05:28:15 pm
Hi you all,

recently i had a Kaifa smart meter installed and with the cable from wireless wonen, the beta 2b plugin and settings of the serial port to 115200 8N1, I'm receiving data about the electricity. however the gasmeter doesn't show updating info and stays on 0 m3.

Any suggestions (using vera 3)

Thnx so far

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Crismaison on March 17, 2014, 05:43:14 pm
Is the gasmeter connected to the electricitymeter?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on March 18, 2014, 12:30:29 pm
Yeah it's one of thos landys gyr or so, connects over the air
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on March 18, 2014, 01:16:41 pm
I had the same problem. The gasmeter should be registered on the electricity meter. A call to the electricity company (Eneco) solved it. They had to pair them and give in some registration codes. After that they called in on the smart meter, 10 minutes later the p1 port started giving the gas usage output.

Verstuurd vanaf mijn ASUS Transformer Pad TF700T met Tapatalk 4

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on March 19, 2014, 10:31:39 am
These new meters were recently installed in anticipation of solar energy. during the installation de technici did show me that the gasmeter was paired to the Kaifa. in addition he told me that if either one would fail both needed to be replaced since the are coupled.
one of these days i'll phone the company to ask. I'll try to get a log file as well and maybe some clever guy can shed some light.
how can i het some pictures from the Vera 3 dashboard to attach? import 1 and 2 (powermeter) and actual usage show values compatible with the Kaifa (exept the gas).

Thanks so far
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 20, 2014, 09:38:58 am
Hi,
For me it took Stedin and Eneco 6 weeks to figure out how to get my meter linked to the network. Up to that point it only counted on the T1 and T1- tarrifs and no gas. Now it all works and I found I had to tweak the I_dutchSmartMeter.xml file as the codes seemed a little different. I changed this bit
--       if (string.sub(data, 1, 10) == "0-1:24.3.0") then
--                    luup.log("Gas meter reading in next line")
--                    indGasComming = 1
--                else
                    ---------------------------------------------------------------------------------------------
                    -- Check if we have to process gas meter
                    ---------------------------------------------------------------------------------------------
--                 if (indGasComming == 1) then
        if (string.sub(data, 1, 10) == "0-1:24.2.1") then
                        luup.log("Gas meter: [" .. string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+") .. "]")
                        luup.variable_set("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas", tonumber(string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+")), THIS_DEVICE)
                    ---------------------------------------------------------------------------------------------
                    -- Check if we have to process energy IMPORT meter(s)
                    ---------------------------------------------------------------------------------------------
                    elseif (string.sub(data, 1, 7) == "1-0:1.8") then

I also took out the end statement that goes with the  if (indGasComming == 1) then

I'm not posting the complete file as I made more changes to calculate my real usage accounting for my solar pannels.
Cheers Rene.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on March 24, 2014, 09:57:52 am
Hi Rene,

Tried to change wat I think you did but then  my LUA doesn't start up properly so that I've to revert back to the original xml file.

furthermore I don't see a code in the what I suppose is there telegram content like "0-1:24.3.0" which might mean that the meter is not sending info from the gasmeter. I did speak to a chap from Enexis who told me that the meter could be read on their side.

50   03/23/14 15:26:02.878   luup_log:58: Meter data (not processed): "1-0:21.7.0(00.234*kW)" <0x2d7e7680>
50   03/23/14 15:26:02.908   luup_log:58: Meter data (not processed): "1-0:22.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:02.938   luup_log:58: Meter data (not processed): "1-0:41.7.0(00.021*kW)" <0x2d7e7680>
50   03/23/14 15:26:02.968   luup_log:58: Meter data (not processed): "1-0:42.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:02.998   luup_log:58: Meter data (not processed): "1-0:61.7.0(00.146*kW)" <0x2d7e7680>
50   03/23/14 15:26:03.028   luup_log:58: Meter data (not processed): "1-0:62.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:03.038   luup_log:58: Meter data (not processed): "!0844" <0x2d7e7680>
08   03/23/14 15:26:08.029   JobHandler_LuaUPnP::HandleActionRequest device: 0 service: urn:micasaverde-com:serviceId:HomeAutomationGateway1 action: LogIpRequest <0x2d5e7680>
08   03/23/14 15:26:08.030   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1 <0x2d5e7680>
08   03/23/14 15:26:08.030   JobHandler_LuaUPnP::HandleActionRequest argument action=LogIpRequest <0x2d5e7680>
08   03/23/14 15:26:08.030   JobHandler_LuaUPnP::HandleActionRequest argument IpAddress=192.168.1.22 <0x2d5e7680>
08   03/23/14 15:26:08.031   JobHandler_LuaUPnP::HandleActionRequest argument MacAddress=68:9c:70:77:35:0d <0x2d5e7680>
50   03/23/14 15:26:11.828   luup_log:58: MeterType: [KFM5KAIFA-METER] <0x2d7e7680>
06   03/23/14 15:26:11.829   Device_Variable::m_szValue_set device: 58 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: MeterType was: KFM5KAIFA-METER now: KFM5KAIFA-METER #hooks: 0 upnp: 0 v:0xc2c650/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:11.858   luup_log:58: Meter data (not processed): "1-3:0.2.8(40)" <0x2d7e7680>
50   03/23/14 15:26:11.889   luup_log:58: Meter data (not processed): "0-0:1.0.0(140323152614W)" <0x2d7e7680>
50   03/23/14 15:26:11.929   luup_log:58: Meter data (not processed): "0-0:96.1.1(4530303033303030303031363437363133)" <0x2d7e7680>
50   03/23/14 15:26:11.959   luup_log:58: Power meter ImportRate1: 227.128000 <0x2d7e7680>
06   03/23/14 15:26:11.959   Device_Variable::m_szValue_set device: 66 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 227.127 now: 227.128 #hooks: 0 upnp: 0 v:0xc10240/NONE duplicate:0 <0x2d7e7680>
50   03/23/14 15:26:11.989   luup_log:58: Power meter ImportRate2: 291.216000 <0x2d7e7680>
06   03/23/14 15:26:11.989   Device_Variable::m_szValue_set device: 67 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 291.216 now: 291.216 #hooks: 0 upnp: 0 v:0xc10240/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:12.018   luup_log:58: Power meter ExportRate1: 0.000000 <0x2d7e7680>
06   03/23/14 15:26:12.019   Device_Variable::m_szValue_set device: 68 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 0 now: 0 #hooks: 0 upnp: 0 v:0xc10240/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:12.048   luup_log:58: Power meter ExportRate2: 0.000000 <0x2d7e7680>
06   03/23/14 15:26:12.049   Device_Variable::m_szValue_set device: 69 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 0 now: 0 #hooks: 0 upnp: 0 v:0xc10240/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:12.078   luup_log:58: Currently active tariff: [0001] <0x2d7e7680>
06   03/23/14 15:26:12.079   Device_Variable::m_szValue_set device: 58 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ActiveTariff was: 1 now: 1 #hooks: 0 upnp: 0 v:0xc2c670/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:12.108   luup_log:58: CurrentWattsImport: [00.400] <0x2d7e7680>
50   03/23/14 15:26:12.109   luup_log:58: CurrentActiveTariffImport: [1] <0x2d7e7680>
06   03/23/14 15:26:12.109   Device_Variable::m_szValue_set device: 58 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 401 now: 400 #hooks: 1 upnp: 0 v:0xc0fce0/NONE duplicate:0 <0x2d7e7680>
50   03/23/14 15:26:12.110   luup_log:33: Entered getErgyRegKey_ui5 <0x2d7e7680>
50   03/23/14 15:26:12.204   luup_log:33: New customer ID3 <0x2d7e7680>
06   03/23/14 15:26:12.205   Device_Variable::m_szValue_set device: 33 service: urn:micasaverde-com:serviceId:EEM-Plugin1 variable: GotKey was: 1 now: 1 #hooks: 0 upnp: 0 v:0xc2e468/NONE duplicate:1 <0x2d7e7680>
06   03/23/14 15:26:12.210   Device_Variable::m_szValue_set device: 58 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 401,552,3015,1395584762,3363 now: 400,551,3015,1395584772,3373 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2d7e7680>
06   03/23/14 15:26:12.211   Device_Variable::m_szValue_set device: 66 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 401 now: 400 #hooks: 1 upnp: 0 v:0xc0fce0/NONE duplicate:0 <0x2d7e7680>
50   03/23/14 15:26:12.212   luup_log:33: Entered getErgyRegKey_ui5 <0x2d7e7680>
50   03/23/14 15:26:12.305   luup_log:33: New customer ID3 <0x2d7e7680>
06   03/23/14 15:26:12.306   Device_Variable::m_szValue_set device: 33 service: urn:micasaverde-com:serviceId:EEM-Plugin1 variable: GotKey was: 1 now: 1 #hooks: 0 upnp: 0 v:0xc2e468/NONE duplicate:1 <0x2d7e7680>
06   03/23/14 15:26:12.310   Device_Variable::m_szValue_set device: 66 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 401,552,3015,1395584762,3363 now: 400,551,3015,1395584772,3373 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2d7e7680>
06   03/23/14 15:26:12.311   Device_Variable::m_szValue_set device: 67 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 1 upnp: 0 v:0xc0fce0/NONE duplicate:1 <0x2d7e7680>
50   03/23/14 15:26:12.312   luup_log:58: CurrentWattsExport: [00.000] <0x2d7e7680>
50   03/23/14 15:26:12.313   luup_log:58: CurrentActiveTariffExport: [1] <0x2d7e7680>
06   03/23/14 15:26:12.313   Device_Variable::m_szValue_set device: 68 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: -0 now: -0 #hooks: 1 upnp: 0 v:0xc0fce0/NONE duplicate:1 <0x2d7e7680>
01   03/23/14 15:26:12.314   GetLuaInterface can't find device type: 3/0xd48d60 str: -69 <0x2d7e7680>
01   03/23/14 15:26:12.314   luup_variable_set interface 0xcdb790 args 4 <0x2d7e7680>
50   03/23/14 15:26:12.315   luup_log:58: Meter data (not processed): "0-0:17.0.0(999.9*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.316   luup_log:58: Meter data (not processed): "0-0:96.3.10(1)" <0x2d7e7680>
50   03/23/14 15:26:12.318   luup_log:58: Meter data (not processed): "0-0:96.7.21(00010)" <0x2d7e7680>
50   03/23/14 15:26:12.319   luup_log:58: Meter data (not processed): "0-0:96.7.9(00007)" <0x2d7e7680>
50   03/23/14 15:26:12.321   luup_log:58: Meter data (not processed): "1-0:99.97.0(1)(0-0:96.7.19)(000101000036W)(2147483647*s)" <0x2d7e7680>
50   03/23/14 15:26:12.348   luup_log:58: Meter data (not processed): "1-0:32.32.0(00000)" <0x2d7e7680>
50   03/23/14 15:26:12.378   luup_log:58: Meter data (not processed): "1-0:52.32.0(00000)" <0x2d7e7680>
50   03/23/14 15:26:12.408   luup_log:58: Meter data (not processed): "1-0:72.32.0(00001)" <0x2d7e7680>
50   03/23/14 15:26:12.438   luup_log:58: Meter data (not processed): "1-0:32.36.0(00000)" <0x2d7e7680>
50   03/23/14 15:26:12.478   luup_log:58: Meter data (not processed): "1-0:52.36.0(00000)" <0x2d7e7680>
50   03/23/14 15:26:12.488   luup_log:58: Meter data (not processed): "1-0:72.36.0(00000)" <0x2d7e7680>
50   03/23/14 15:26:12.518   luup_log:58: Meter data (not processed): "0-0:96.13.1()" <0x2d7e7680>
50   03/23/14 15:26:12.590   luup_log:58: Meter data (not processed): "0-0:96.13.0()" <0x2d7e7680>
50   03/23/14 15:26:12.638   luup_log:58: Meter data (not processed): "1-0:31.7.0(001*A)" <0x2d7e7680>
50   03/23/14 15:26:12.698   luup_log:58: Meter data (not processed): "1-0:51.7.0(000*A)" <0x2d7e7680>
50   03/23/14 15:26:12.768   luup_log:58: Meter data (not processed): "1-0:71.7.0(000*A)" <0x2d7e7680>
50   03/23/14 15:26:12.798   luup_log:58: Meter data (not processed): "1-0:21.7.0(00.233*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.828   luup_log:58: Meter data (not processed): "1-0:22.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.858   luup_log:58: Meter data (not processed): "1-0:41.7.0(00.021*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.888   luup_log:58: Meter data (not processed): "1-0:42.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.918   luup_log:58: Meter data (not processed): "1-0:61.7.0(00.145*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.948   luup_log:58: Meter data (not processed): "1-0:62.7.0(00.000*kW)" <0x2d7e7680>
50   03/23/14 15:26:12.949   luup_log:58: Meter data (not processed): "!63A0" <0x2d7e7680>
 this is wat I see in a terminal . after this the whole process starts again

Thanks again

Thijs
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 26, 2014, 11:54:16 am
Hi Thijs,

I have the exact same Kaifa meter as you and the line for the Gas meter looks something like this.
0-1:24.2.1(101209110000W)(12785.123*m3)

This is also how it shows per the DSMR 4 standard http://www.gpx.nl/pdf/poort-P1-voorbeeld-2012.pdf

I do not see a line like that in your output, so no idea where it is hiding at. You could connect the cable to a PC USB port and look at the full output to see if you can find a possible string for the Gas meter. Note that is you have Stadsverwarming or something like that things would be different.

Cheer Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on April 03, 2014, 12:28:30 pm
hai Rene,

thanks for your input. i've got no stadsverwarming so that's not the problem. i'll phone enexis again since i really think the connection doesn't connect as it should be.

in this part of the forum one of the members noted that after the meter was actually read by the company it started sending values for gas as well. 

for bfromdruten thanks for your work and also for mfp for their work

 ;D ;D ;D ;D ;D ;D
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: 2linker on April 07, 2014, 01:55:35 pm
I also have installed the device, and get nothing. I have a Landis & Gyr smart meter, newest version, DSMR4.0, so I set the serial port to 115200-8-N-1.

I have read through this topic and found the following:
Yes, in the vera logging there should be some action
I am a new Vera user, so I need to be sure. If I should see some action, I should see this on the page 'My alerts', right? I select the smart meter device and then the actions should show, right?
If this is the case, then I have a problem: no action at all. What can be the problem?

Thanks for any help.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Peter on April 07, 2014, 02:16:13 pm
the vera log can be viewed by:

http://Ipadres-Vera/port_3480/data_request?id=lr_al_info&fnc=getLog&app=localapp or install a log viewer plugin en filter on dutch.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: 2linker on April 08, 2014, 05:23:24 am
Thanks! I will try this next week. Why not now? Because I found out that the 'standard' cable does not work with the newest Landis & Gyr smart meters. I need to have a different cable. I found and ordered that one on Smart Meter Dashboard.
Let's hope that Landis did not change the data protocol as well ...
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: 2linker on April 10, 2014, 01:44:21 pm
Didn't need to check the vera log, because the new cable did the trick: I get the data. Gas meter remains zero, but that is something I will check with the provider.
I think this is important info for new users of the plugin: when you get the Landis & Gyr E350 or ZCF110, you need to have another cable. Om Smart Meter Dashboard, it is called: 'Type DSMR 2/3/4 (V2)'.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on May 01, 2014, 04:50:35 am
Hi everybody,

In the meantime I've had my stuff (smart meter) fixed since I've found out that my Landis Gyr did not send to the Kaifa. This was fixed yesterday and for information purpose, by cycling through the readings on the Kaifa one now sees a notice in the form " GAS + sr number of the Landys". via terminal(or Putty in a Windows environment) there is now a new line in the telegram indicating readout of the gasmeter.

So its important to check if the gasmeter is actually coupled.

Next step is to adjust the I-dutchsmartmeter.xml for readout of the line itself which is the following:
50   04/30/14 10:31:48.598   luup_log:58: Meter data (not processed): 0-1:24.2.1(140430100000S)(00241.036*m3)" <0x2e1dd680>
50   04/30/14 10:31:48.628   luup_log:58: Meter data (not processed): "0-1:24.4.0(1)" <0x2e1dd680> 

Maybe Reneboer has the answer but adjusting like he suggested lets my Lua crash (stops functioning).

To Reneboer I've send a PM since he didn't want to share the whole file but if somebody else got the solution please let me know.

in short:


I've bought a P1 cable from wireless wonen and this seems to work but they don't mention anything about versions regarding DSMR 2/3/4 or something similar

Greetings Thijs
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on May 01, 2014, 07:21:49 am
Thijs, whay version is your dsmr? Its noted on your meter.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Unikraan on May 01, 2014, 05:01:08 pm
My configuration:
Vera Lite.
E-meter: Kaifa MA305
Gas meter:  Landis&Gyr G350
Cable: FTDI RS232 > USB

The telegram from the Dutch smart meter is:
/KFM5KAIFA-METER

1-3:0.2.8(40)
0-0:1.0.0(140430004552S)
0-0:96.1.1(4530303033303030303032313239313133)
1-0:1.8.1(000231.094*kWh)
1-0:1.8.2(000277.981*kWh)
1-0:2.8.1(000066.164*kWh)
1-0:2.8.2(000174.446*kWh)
0-0:96.14.0(0001)
1-0:1.7.0(02.104*kW)
1-0:2.7.0(00.000*kW)
0-0:17.0.0(999.9*kW)
0-0:96.3.10(1)
0-0:96.7.21(00030)
0-0:96.7.9(00018)
1-0:99.97.0(2)(0-0:96.7.19)?(140402084849S)(0000000535*s)?(000101000019W)(2147483647*s)
1-0:32.32.0(00000)
1-0:52.32.0(00000)
1-0:72.32.0(00000)
1-0:32.36.0(00000)
1-0:52.36.0(00000)
1-0:72.36.0(00000)
0-0:96.13.1()
0-0:96.13.0()
1-0:31.7.0(000*A)
1-0:51.7.0(007*A)
1-0:71.7.0(001*A)
1-0:21.7.0(00.198*kW)
1-0:22.7.0(00.000*kW)
1-0:41.7.0(01.705*kW)
1-0:42.7.0(00.000*kW)
1-0:61.7.0(00.202*kW)
1-0:62.7.0(00.000*kW)
0-1:24.1.0(003)
0-1:96.1.0(4730303136353631323034373737313133)
0-1:24.2.1(140430000000S)(00235.232*m3)
0-1:24.4.0(1)
!A89C

In this telegram the gas reading works fine.
But, in Vera the readout for the electricity is working fine, the gas readout is 0.

This is the I_dutchSmartMeter.xml code:

 -- Data row has been received via serial. Process
        ---------------------------------------------------------------------------------------------
        function dutchSmartMeterIncoming(data)
            if (string.len(data) > 0) then
                if (string.sub(data, 1, 10) == "0-1:24.2.1") then
                    luup.log("Gas meter reading in next line")
                    indGasComming = 1
                else
                    ---------------------------------------------------------------------------------------------
                    -- Check if we have to process gas meter
                    ---------------------------------------------------------------------------------------------
                    if (indGasComming == 1) then
                        luup.log("Gas meter: [" .. string.match(data, "%d+.%d+") .. "]")
                        luup.variable_set("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas", tonumber(string.match(data, "%d+.%d+")), THIS_DEVICE)

Here is a pice of the LuaUPnP log:
50   05/01/14 22:50:26.945   luup_log:91: MeterType: [KFM5KAIFA-METER] <0x2d8bf680>
06   05/01/14 22:50:26.946   Device_Variable::m_szValue_set device: 91 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: MeterType was: KFM5KAIFA-METER now: KFM5KAIFA-METER #hooks: 0 upnp: 0 v:0xa19490/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:26.975   luup_log:91: Meter data (not processed): "1-3:0.2.8(40)" <0x2d8bf680>
50   05/01/14 22:50:27.015   luup_log:91: Meter data (not processed): "0-0:1.0.0(140501225050S)" <0x2d8bf680>
50   05/01/14 22:50:27.036   luup_log:91: Meter data (not processed): "0-0:96.1.1(4530303033303030303032313239313133)" <0x2d8bf680>
50   05/01/14 22:50:27.065   luup_log:91: Power meter ImportRate1: 238.095000 <0x2d8bf680>
06   05/01/14 22:50:27.066   Device_Variable::m_szValue_set device: 98 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 238.095 now: 238.095 #hooks: 0 upnp: 0 v:0xa22400/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.096   luup_log:91: Power meter ImportRate2: 284.732000 <0x2d8bf680>
06   05/01/14 22:50:27.096   Device_Variable::m_szValue_set device: 99 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 284.731 now: 284.732 #hooks: 0 upnp: 0 v:0xa22400/NONE duplicate:0 <0x2d8bf680>
50   05/01/14 22:50:27.125   luup_log:91: Power meter ExportRate1: 66.164000 <0x2d8bf680>
06   05/01/14 22:50:27.126   Device_Variable::m_szValue_set device: 100 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 66.164 now: 66.164 #hooks: 0 upnp: 0 v:0xa22400/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.155   luup_log:91: Power meter ExportRate2: 188.066000 <0x2d8bf680>
06   05/01/14 22:50:27.156   Device_Variable::m_szValue_set device: 101 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 188.066 now: 188.066 #hooks: 0 upnp: 0 v:0xa22400/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.175   luup_log:91: Currently active tariff: [0002] <0x2d8bf680>
06   05/01/14 22:50:27.176   Device_Variable::m_szValue_set device: 91 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ActiveTariff was: 2 now: 2 #hooks: 0 upnp: 0 v:0xa0be48/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.205   luup_log:91: CurrentWattsImport: [00.579] <0x2d8bf680>
50   05/01/14 22:50:27.206   luup_log:91: CurrentActiveTariffImport: [2] <0x2d8bf680>
06   05/01/14 22:50:27.206   Device_Variable::m_szValue_set device: 91 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 582 now: 579 #hooks: 0 upnp: 0 v:0xa22360/NONE duplicate:0 <0x2d8bf680>
06   05/01/14 22:50:27.207   Device_Variable::m_szValue_set device: 91 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 582,639,963,1398977417,1218 now: 579,638,963,1398977427,1228 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2d8bf680>
06   05/01/14 22:50:27.208   Device_Variable::m_szValue_set device: 99 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 582 now: 579 #hooks: 0 upnp: 0 v:0xa22360/NONE duplicate:0 <0x2d8bf680>
06   05/01/14 22:50:27.209   Device_Variable::m_szValue_set device: 99 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Log was: 582,639,963,1398977417,1218 now: 579,638,963,1398977427,1228 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2d8bf680>
06   05/01/14 22:50:27.209   Device_Variable::m_szValue_set device: 98 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0xa22360/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.235   luup_log:91: CurrentWattsExport: [00.000] <0x2d8bf680>
50   05/01/14 22:50:27.236   luup_log:91: CurrentActiveTariffExport: [2] <0x2d8bf680>
06   05/01/14 22:50:27.236   Device_Variable::m_szValue_set device: 101 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: -0 now: -0 #hooks: 0 upnp: 0 v:0xa22360/NONE duplicate:1 <0x2d8bf680>
06   05/01/14 22:50:27.237   Device_Variable::m_szValue_set device: 100 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 0 upnp: 0 v:0xa22360/NONE duplicate:1 <0x2d8bf680>
50   05/01/14 22:50:27.265   luup_log:91: Meter data (not processed): "0-0:17.0.0(999.9*kW)" <0x2d8bf680>
50   05/01/14 22:50:27.295   luup_log:91: Meter data (not processed): "0-0:96.3.10(1)" <0x2d8bf680>
50   05/01/14 22:50:27.325   luup_log:91: Meter data (not processed): "0-0:96.7.21(00030)" <0x2d8bf680>
50   05/01/14 22:50:27.355   luup_log:91: Meter data (not processed): "0-0:96.7.9(00018)" <0x2d8bf680>
50   05/01/14 22:50:27.456   luup_log:91: Meter data (not processed): "1-0:99.97.0(2)(0-0:96.7.19)(140402084849S)(0000000535*s)(000101000019W)(2147483647*s)" <0x2d8bf680>
50   05/01/14 22:50:27.485   luup_log:91: Meter data (not processed): "1-0:32.32.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.515   luup_log:91: Meter data (not processed): "1-0:52.32.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.545   luup_log:91: Meter data (not processed): "1-0:72.32.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.575   luup_log:91: Meter data (not processed): "1-0:32.36.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.605   luup_log:91: Meter data (not processed): "1-0:52.36.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.635   luup_log:91: Meter data (not processed): "1-0:72.36.0(00000)" <0x2d8bf680>
50   05/01/14 22:50:27.665   luup_log:91: Meter data (not processed): "0-0:96.13.1()" <0x2d8bf680>
50   05/01/14 22:50:27.725   luup_log:91: Meter data (not processed): "0-0:96.13.0()" <0x2d8bf680>
50   05/01/14 22:50:27.785   luup_log:91: Meter data (not processed): "1-0:31.7.0(000*A)" <0x2d8bf680>
50   05/01/14 22:50:27.845   luup_log:91: Meter data (not processed): "1-0:51.7.0(000*A)" <0x2d8bf680>
50   05/01/14 22:50:27.905   luup_log:91: Meter data (not processed): "1-0:71.7.0(001*A)" <0x2d8bf680>
50   05/01/14 22:50:27.945   luup_log:91: Meter data (not processed): "1-0:21.7.0(00.156*kW)" <0x2d8bf680>
50   05/01/14 22:50:27.965   luup_log:91: Meter data (not processed): "1-0:22.7.0(00.000*kW)" <0x2d8bf680>
50   05/01/14 22:50:27.995   luup_log:91: Meter data (not processed): "1-0:41.7.0(00.074*kW)" <0x2d8bf680>
50   05/01/14 22:50:28.045   luup_log:91: Meter data (not processed): "1-0:42.7.0(00.000*kW)" <0x2d8bf680>
50   05/01/14 22:50:28.055   luup_log:91: Meter data (not processed): "1-0:61.7.0(00.349*kW)" <0x2d8bf680>
50   05/01/14 22:50:28.085   luup_log:91: Meter data (not processed): "1-0:62.7.0(00.000*kW)" <0x2d8bf680>
50   05/01/14 22:50:28.115   luup_log:91: Meter data (not processed): "0-1:24.1.0(003)" <0x2d8bf680>
50   05/01/14 22:50:28.146   luup_log:91: Meter data (not processed): "0-1:96.1.0(4730303136353631323034373737313133)" <0x2d8bf680>
50   05/01/14 22:50:28.266   luup_log:91: Gas meter reading in next line <0x2d8bf680>
50   05/01/14 22:50:28.295   luup_log:91: Gas meter: [0-1] <0x2d8bf680>
01   05/01/14 22:50:28.296   luup_variable_set interface 0xabfed8 no Gas/(null) <0x2d8bf680>
50   05/01/14 22:50:28.305

What pice of code do i have to change to read the gas value's?
Thanks so far,
Wim
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on May 02, 2014, 11:36:25 am
Hi SanderL

I've got a DSMR is 4
 :)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on May 09, 2014, 08:26:56 am
Hi,

I removed most of my cusomizations from this version. I have not tested it but it should help you when you have a DSMR 4 meter.
    <functions>
      -- Modified version of dutchSmartMeter from Brutgrink
      
      -- Service IDs we use
      MY_SERVICE_ID = "urn:brutgrink-com:serviceId:dutchSmartMeter"

        ---------------------------------------------------------------------------------------------
      -- Utility functions
        ---------------------------------------------------------------------------------------------
      -- Log wrapper so we can quickly turn it off and on for debugging
      function do_writeLog(sMessage)
--         luup.log(sMessage)
      end
      -- Do a optimized Get and Set function
      local function luup_var_get(name, service, device)
         return luup.variable_get(service or MY_SERVICE_ID, name, device or THIS_DEVICE)
      end
      -- Only set variable when changed. This reduces Vera memory writes and logging.
      local function luup_var_set (name, value, service, device)
         service = service or MY_SERVICE_ID
         device = device or THIS_DEVICE
         local old = luup_var_get(name, service, device)
         if tostring(value) ~= old then
            luup.variable_set(service, name, value, device)
         end
      end
        -- Thanks to guessed for this snippet.
        function findChild(parentDevice, label)
            for k, v in pairs(luup.devices) do
                if (v.device_num_parent == parentDevice and v.id == label) then
                    return k
                end
            end

            -- Dump a copy of the Global Module list for debugging purposes.
            for k, v in pairs(luup.devices) do
                do_writeLog("Device Number: " .. k ..
                       " v.device_type: " .. tostring(v.device_type) ..
                        " v.device_num_parent: " .. tostring(v.device_num_parent) ..
                        " v.id: " .. tostring(v.id))
            end
        end
 

        ---------------------------------------------------------------------------------------------
      -- Module startup
        ---------------------------------------------------------------------------------------------
        function dutchSmartMeter_Startup(lul_device)
            THIS_DEVICE = lul_device
            do_writeLog("Starting dutchSmartMeter device: " .. tostring(lul_device))
            -- get child devices
            for k, v in pairs(luup.devices) do
                if (v.device_num_parent == lul_device) then
                    do_writeLog( "Found child device, lets save! id " .. tostring(v.id) .. " device " .. tostring(v.device_type))
             
                    if (tostring(v.device_type) == POWER_SERVICE_ID) then
                        powerMeterCount = powerMeterCount + 1
                        powerMeterDevice[powerMeterCount] = v.id
                    end
                end
            end
             
         -- Assure device variables exist
            local gasMeter = luup_var_get("Gas")
            local activeTariff = luup_var_get("ActiveTariff")
            local meterType = luup_var_get("MeterType")
            if ((gasMeter or "") == "") then
                luup_var_set("Gas", 0)
            end
            if ((activeTariff or "") == "") then
                luup_var_set("ActiveTariff", 0)
            end   
            if ((meterType or "") == "") then
                luup_var_set("MeterType", "Unknown")
            end   
         
            -- Create devices needed if not exist
            addPowerMeterDevice("ImportRate1")
            addPowerMeterDevice("ImportRate2")
            addPowerMeterDevice("ExportRate1")
            addPowerMeterDevice("ExportRate2")
        end
     
        -- Add device is not yet found
        function addPowerMeterDevice(meterID)
            -- If we can't find a device add a new child meterID
            if findChild(THIS_DEVICE, meterID) == nil then
                local child_devices = luup.chdev.start(THIS_DEVICE); 

                -- First add all 'old' children to the tree
                for teller = 1, powerMeterCount do
                    luup.chdev.append(THIS_DEVICE, child_devices, powerMeterDevice[teller], "Powermeter " .. powerMeterDevice[teller] ,
                    POWER_SERVICE_ID,"D_PowerMeter1.xml","","",false)
                end

                -- Now add the new device to the tree
                do_writeLog("Tree buildup, now add " .. meterID)

                luup.chdev.append(THIS_DEVICE, child_devices, meterID, "Powermeter " .. meterID ,
                  POWER_SERVICE_ID,"D_PowerMeter1.xml","","",false)

                powerMeterCount = powerMeterCount + 1
                powerMeterDevice[powerMeterCount] = meterID
           
                -- Synch the new tree with the old three
                do_writeLog("Start sync")
                luup.chdev.sync(THIS_DEVICE, child_devices)
                do_writeLog("End sync")       
            end       
        end

        ---------------------------------------------------------------------------------------------
        -- Smart Meter Data row has been received via serial. Process
        ---------------------------------------------------------------------------------------------
        function dutchSmartMeterIncoming(data)
         local meterGridUsage = 0
            if (string.len(data) > 0) then

                -- Check if we have to process gas meter. Tested only with DMSR 4 meter!
            if (string.sub(data, 1, 10) == "0-1:24.2.1") then
                    do_writeLog("Gas meter: [" .. string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+") .. "]")
                    luup_var_set("Gas", math.floor(tonumber(string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+"))))

               -- Check if we have to process energy IMPORT meter(s)
                elseif (string.sub(data, 1, 7) == "1-0:1.8") then
                    local meterValue = tonumber(string.match(string.sub(data,10), "%d+.%d+"))
                    local meterID = string.match(string.sub(data,9), "%d+")

                    do_writeLog(string.format("Power meter ImportRate%s: %f",meterID,meterValue))
                    luup_var_set("KWH", math.floor(meterValue), ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ImportRate" .. meterID))
                -- Set meterstand afname value (T1 ot T2) value
               luup_var_set("meterT"..meterID, math.floor(meterValue))
                       
                -- Check if we have to process energy EXPORT meter(s)
                elseif (string.sub(data, 1, 7) == "1-0:2.8") then
                    local meterValue = tonumber(string.match(string.sub(data,10), "%d+.%d+"))
                    local meterID = string.match(string.sub(data,9), "%d+")

                    do_writeLog(string.format("Power meter ExportRate%s: %f",meterID,meterValue))
                    luup_var_set("KWH", math.floor(meterValue), ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ExportRate" .. meterID))
               -- Set meterstand teruglever value (T1- ot T2-) value
               luup_var_set("meterT"..meterID.."m", math.floor(meterValue))
                       
                -- Check current tariff
                elseif (string.sub(data, 1, 11) == "0-0:96.14.0") then
                    do_writeLog("Currently active tariff: [" .. string.match(string.sub(data,12), "%d+") .. "]")
                    luup_var_set("ActiveTariff", tonumber(string.match(string.sub(data,12), "%d+")))

                -- Check current watts import
                elseif (string.sub(data, 1, 9) == "1-0:1.7.0") then
                    -- get active tariff variable         
                    local activeTariff = luup_var_get("ActiveTariff")

                    do_writeLog("CurrentWattsImport: [" .. string.match(string.sub(data,10), "%d+.%d+") .. "]")
                    do_writeLog("CurrentActiveTariffImport: [" .. activeTariff .. "]")

                    -- Current Grid import value   
                    if (tonumber(string.match(string.sub(data,10), "%d+.%d+"))*1000.0 > 0) then
                  luup_var_set("Watts", tonumber(string.match(string.sub(data,10), "%d+.%d+"))*1000.0)
                    end

               -- import rate 2
                    luup_var_set("Watts", tonumber(string.match(string.sub(data,10), "%d+.%d+"))*1000.0, ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ImportRate" .. activeTariff))
                    -- import rate 1
                    luup_var_set("Watts", 0, ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ImportRate" .. (1+(activeTariff % 2))))

                -- Check current watts export
                elseif (string.sub(data, 1, 9) == "1-0:2.7.0") then
                    -- get active tariff variable         
                    local activeTariff = luup_var_get("ActiveTariff")

                    do_writeLog("CurrentWattsExport: [" .. string.match(string.sub(data,10), "%d+.%d+") .. "]")
                    do_writeLog("CurrentActiveTariffExport: [" .. activeTariff .. "]")

                    -- Current Grid export value   
                    if (tonumber(string.match(string.sub(data,10), "%d+.%d+"))*1000.0 > 0) then
                  luup_var_set("Watts", tonumber(string.match(string.sub(data,10), "%d+.%d+"))*-1000.0)
                    end

                    -- export rate 2
                    luup_var_set("Watts", tonumber(string.match(string.sub(data,10), "%d+.%d+"))*-1000.0, ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ExportRate" .. activeTariff))
                    -- export rate 1
                    luup_var_set("Watts", "-0", ENGERGY_SERVICE_ID, findChild(THIS_DEVICE,"ExportRate" .. (1+(activeTariff % 2))))
                                                         
                -- Check meter type
                elseif (string.sub(data,1,1) == "/") then
                    do_writeLog("MeterType: [" .. string.sub(data,2) .. "]")
                    luup_var_set("MeterType", string.sub(data,2))
                else
               -- Do not log this unless really needed. New smart meters produce a lot of data.
--                    do_writeLog(string.format("Meter data (not processed): %q",data))
                end
            end           
        end

    </functions>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: intveltr on May 10, 2014, 11:15:11 am
I'm trying to get this working with a DSMR 4, but no luck so far.  I'm using an FTDI cable, reversed the RX pin, programmed and cycled the port.  I tried both the listed port settings as well as the settings recommended for this meter (115200, 8N1) but no data is coming through.  The logs do not show anything that would indicate incoming data either.

I've also connected the cable to a laptop and tried reading the port directly via Putty.  No joy either :(

Any suggestions as to what to try next?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mfp on May 11, 2014, 04:36:34 pm
@Unikraan

Have you tried deleting your device and afterward recreating the device? When gas reading is disabled it will stay on zerro.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: tyfoon on May 12, 2014, 06:05:05 am
In have the same problem. DSMR 4 meter and I get electricity readings after changing the serial settings to 15200, 8, N,1 but no gas readings (stays at 0 in Vera).

I called the 'netbeheerder' and they say the gasmeter is linked and they get readings. When cycling trough the electricity meter I also get and entry GAS and an 8 digit number.

What would be the best next step in which order? Change the XML, re-install the plugin or discuss with the 'netbeheerder' again? If the lather; what should I ask them as it is difficult to discuss with them on the phone if they say all is ok on their side.

p.s. my understanding is that I can also read the raw data via Terminal on my Macbook. After connecting directly to the USB; how do I connect via Terminal?

UPDATE; Replaced i_dutchsmartmeter.xml with attached one and I now get Gas reading. I now see it is only total Gas consumption; I was actually hoping it was also actual gas consumption.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Unikraan on May 12, 2014, 05:42:05 pm
@ MFP:
Yes, I have deleted first the Smart Meter App.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: tyfoon on May 18, 2014, 05:07:21 pm
Ok, strange.

After I had disconnected the USB hub (to move the Vera) and reconnected I have problems now getting electricity readings. After deleting and re-installing all (just to make sure) I get GAS reading but no electra readings anymore.

Any suggestions?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on May 19, 2014, 01:39:34 am
Check serial settings and correct serial port! Had the same few days ago during MCV support session. MCV found out after trouble shooting.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: piperpilot on May 19, 2014, 07:18:25 am
@Reneboer

Hi Rene , works like a charm.
actually I'm reading two separate meeting devices, Vera 3 and Qbox via a Y-Splitter for the P1 cable.

Thanks a million times for Your great work

 ;D ;D ;D ;D
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: intveltr on July 16, 2014, 03:16:03 pm
Still no luck getting this to work, even though all the components seem ok.  I've tried reading my meter using the FTDI cable and a laptop:
1- Mess with the signal wire = putty puts out some gibberish, so the cable, USB serial port and terminal work
2- Scope shows a signal burst every 10 seconds from the meter, so the P1 port is hooked up and working
3- When connected to the meter, putty shows nothing (not even rubbish)

Anyone else have any luck reading data from a Landis Gyr S350 meter, and if so, what cable do you use?  I'm using the FTDI USB cable (5v), though I read on a blog that certain cables that work on DSMR 2.x - 3.x meters and some 4.x meters will not work on the Landis Gyr one, and they offer a separate cable for this. 
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on July 16, 2014, 03:41:29 pm
http://www.smartmeterdashboard.nl/blog/nieuweslimmemetersinomloop
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: intveltr on July 16, 2014, 04:12:11 pm
http://www.smartmeterdashboard.nl/blog/nieuweslimmemetersinomloop

Thanks, I poked around a bit and found that L&G neglected to add a pull-up resistor to the data line in their meter.  Through that link I found that the fix is to simply add a resistor (1.2k) between VCC and Data.

The cable now works, and the plugin is reading power consumption :)  I am not getting readings from the gas meter, so I'll check with Stedin tomorrow to see if they actually paired them.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: tyfoon on July 17, 2014, 07:22:03 am
You can see if the gas is linked by cycling through the electricity meter (via button on meter).

I Also still don't have gas reading. It worked for some time (see also other post in this thread)

Verstuurd vanaf mijn Nexus 5 met Tapatalk

Title: Dutch Smart meter download
Post by: informatie on July 20, 2014, 12:58:38 pm
Waar ik nu een complete set van software voor mijn vera3 downloaden.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on July 20, 2014, 01:01:35 pm
RTF
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: informatie on July 20, 2014, 03:32:21 pm
dank je voor de tip.
De bestanden in de ZIP-file zijn van 12 mei.
Ik ben gewoon op zoek naar de laatste juiste, want er zijn wat aanpassingen geweest.
Dat vind ik terug op het forum.
 
Oke I read in english. It's a pitty but I go for it thx.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Sender on July 20, 2014, 03:34:57 pm
The forum is English... Vera as well... everyone running this plugin managed to get this working via this forum. Just start at post 1 and read till the last one. Then decide what to use.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: wimlem on July 24, 2014, 02:23:33 pm
installed the P1 cable today on my vera lite. Had it already working with domoticz, but now with vera! :)

have DSMR4.0 and used serial port 115200 8N1.

Many thanx guys for the app.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: edraket on August 27, 2014, 07:20:01 pm
@tyfoon -used the attached I_DutchSmartmeter.xml of your recent post. After uploading to the vera lite en reload, it could actually read a gas value. But it directly stopped reading the electra values .. and messed up the Datamine logging. I was comparing this version with the orgininal version of the file -which showed electra but no gas- and noticed there are some difference.

What to do to get the code working?  And any ideas why a change of code could mess up Datamine? (BTW - only reason why I still using Datamine is because of the nice integration of its graphical support in ImperiHome, an Android app).

-edraket-
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: edraket on August 30, 2014, 11:28:45 am
I solved the problem in the code, I couldn't get the string.match code to work, so I decided to use the string.sub function, since the offset of the gasstring is always the same. And because the data is a string, you have to convert the string to an number.
The code "0-1:24.2.1" is actually the line containing the gasvalue: if you get that, you know that your smartmeter works: I have a L+G wireless connected to the Kaifa and the Kiafa is connected to my Vera Lite. You can use the luup.log function to check what your data content actually is.

        function dutchSmartMeterIncoming(data)
            if (string.len(data) > 0) then
                 if (string.sub(data, 1, 10) == "0-1:24.2.1") then
                    luup.log("Gas meter reading in next line")
      -- formaat 0-1:24.2.1(140828150000S)(00048.320*m3)
        -- luup.log(data)
      gasstring = string.sub(data,27, -6)
      gasvalue = tonumber(gasstring)
      -- luup.log(string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+"))


                    indGasComming = 1
                else
                    ---------------------------------------------------------------------------------------------
                    -- Check if we have to process gas meter
                    ---------------------------------------------------------------------------------------------
                    if (indGasComming == 1) then
         
         luup.log("Gas meter: [" .. gasstring .. "]")
                        luup.variable_set("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas", gasvalue, THIS_DEVICE)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: tyfoon on September 01, 2014, 07:59:40 am
Hi Edraket, cool; Do I understand correctly that this both is working fine now for you both gas and electra? If yes, can you post the total file so I'm sure nothing is going wrong with copy-paste.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: edraket on September 04, 2014, 07:41:20 am
Right! Works with both gas and electricity. Attached the whole set of the plugin, since I've noticed that they all seem to belong together. That's why you have to do some prep's before using them:

First, check that you have the same D_dutchSmartMeter (xml and json), I_dutchSmartMeter.xml and S_dutchSmartMeter.xml as in the attachment. E.g by comparing date stamps, filesizes and do some code verifications. In the attachment there's a 5th file, that's the original ("old") I_dutchSmartMeter.xml which I took to change into the new I_dutchSmartMeter.xml.

If your plugin is the same as I have in the attachement, you can simply replace your I_dutchSmartMeter.xml  with the code in my one. Big advantage of this approach is that you don't have to delete the device and you don't loose your Datamine data. But be absolutely sure: the first time I did it this way, I had a plugin that wouldn't work anymore and I lost all of my Datamine data!

If your plugin is not the same, than you have to save your Datamine data first (if using that plugin). Then, remove the device of the plugin, restart your vera (take the powerplug off and on) and reload all the four files of the plugin from the attachment. I've noticed that a simple reload doesn't work all the time...

Create the new device. Since the device will probably get a new device ID, you have to reassign the variables in Datamine (and other Luup code if you have). And of course, make sure that you've set the serial port configuration settings to match : 115200b-nonep-8db-1sb.

Note that I haven't found a way to reload the saved Datamine data. Maybe there are ways, I just haven't tried them. Bollocks!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: tyfoon on September 04, 2014, 02:26:40 pm
Super! All is working  now!! p.s. I had the same version so only had to update one file
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: hinod on September 12, 2014, 10:39:07 am
Being a newby I experienced that Vera has a steep learning curve.
In general I have my Vera working.

I want to connect my P1 ( I do have it and have used it already with BeNext en HomeWizzard)
Could one of you give me a hint regarding the upload of the plugin and the programming adjustments to make.

1. Downloaded the zip-file from the message by EdRaket of September 4th; is that the plugin?
2. What do I then
2a have looked at apps --> develop apps --> create design (have just installed Ui7)
2b but there is so much to fill in ....

3. have started looking at http://gathering.tweakers.net/forum/list_messages/1533251
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 17, 2014, 03:53:13 pm
Thanks for the plugin.
Since two days I have a KFM5 KAIFA DSM4 and connected it with a PL2303 via an usb-hub to my VeraLite. To get this working as a second ttyusb it took some time, to say the least  ;D. But I now have an Arduino on ttyusb0 and the smartmeter on ttyusb1.
No gas readings yet but I know this can take a few days. Already 'connected' the readings to DataYours for the graphs.

@hinod, sorry have never seen UI7 and not many others did yet I think.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: wimlem on September 18, 2014, 02:52:20 am
Being a newby I experienced that Vera has a steep learning curve.
In general I have my Vera working.

I want to connect my P1 ( I do have it and have used it already with BeNext en HomeWizzard)
Could one of you give me a hint regarding the upload of the plugin and the programming adjustments to make.

1. Downloaded the zip-file from the message by EdRaket of September 4th; is that the plugin?
2. What do I then
2a have looked at apps --> develop apps --> create design (have just installed Ui7)
2b but there is so much to fill in ....

3. have started looking at http://gathering.tweakers.net/forum/list_messages/1533251

1. Yes it is.
2. Check robbshop (http://www.robbshop.nl/over-z-wave/z-wave-projecten/slimme-meterkabel-installeren). Create the device with "D_dutchSmartMeter.xml".

After that, you need to open the "serial port configuration" and i don't think that page works with UI7, it stays empty. I contacted support and the fixed this for me.

That is all and after that there will be 5 new instances on the dashboard.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 18, 2014, 04:49:15 am
Does everyone have both counters running for high/low-tariff (dag en nacht)?
I noticed that I have just one of the devices counting and yesterday-evening thought that would be the night-tariff, but today there is still only one device updating. Will check the meter itself tonight after work but in luup.log I see a lot of messages with "not processed":

Code: [Select]
50      09/18/14 10:39:54.663   luup_log:130: Meter data (not processed): "0-0:96.13.1()" <0x2f315680>
50      09/18/14 10:39:54.723   luup_log:130: Meter data (not processed): "0-0:96.13.0()" <0x2f315680>
50      09/18/14 10:39:54.783   luup_log:130: Meter data (not processed): "1-0:31.7.0(000*A)" <0x2f315680>
50      09/18/14 10:39:54.843   luup_log:130: Meter data (not processed): "1-0:51.7.0(000*A)" <0x2f315680>
50      09/18/14 10:39:54.904   luup_log:130: Meter data (not processed): "1-0:71.7.0(000*A)" <0x2f315680>
50      09/18/14 10:39:54.935   luup_log:130: Meter data (not processed): "1-0:21.7.0(00.043*kW)" <0x2f315680>
50      09/18/14 10:39:54.965   luup_log:130: Meter data (not processed): "1-0:22.7.0(00.000*kW)" <0x2f315680>
50      09/18/14 10:39:55.013   luup_log:130: Meter data (not processed): "1-0:41.7.0(00.080*kW)" <0x2f315680>
50      09/18/14 10:39:55.023   luup_log:130: Meter data (not processed): "1-0:42.7.0(00.000*kW)" <0x2f315680>
50      09/18/14 10:39:55.053   luup_log:130: Meter data (not processed): "1-0:61.7.0(00.077*kW)" <0x2f315680>
50      09/18/14 10:39:55.083   luup_log:130: Meter data (not processed): "1-0:62.7.0(00.000*kW)" <0x2f315680>
50      09/18/14 10:39:55.084   luup_log:130: Meter data (not processed): "!4D20"

Is that normal?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 18, 2014, 04:07:51 pm
Just checked on the meter itself and it seems it is 'stuck' on tariff T1. Day and night....
When I cycle through the display it shows T2 is 0 KW but also the current usage. Just no cumulative.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 18, 2014, 04:13:09 pm
Anyone noticed the effect of this plugin on Vera's memory?
It is clearly visible where I started using the plugin.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: wimlem on September 19, 2014, 02:41:57 am
Just checked on the meter itself and it seems it is 'stuck' on tariff T1. Day and night....
When I cycle through the display it shows T2 is 0 KW but also the current usage. Just no cumulative.

Works perfect over here. Does the meter use the T1 and T2?

Anyone noticed the effect of this plugin on Vera's memory?
It is clearly visible where I started using the plugin.

Not that i know of, but i guess you are not using a standard tool to monitor the Vera?

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 19, 2014, 03:28:33 am
As I said, on the meter itself I can cycle through the display and look at the T1 and T2 figures. But only T1 is counting, T2 is "00000" in the lower part of the display. So it never switches from T1 to T2. Maybe this will be solved when the gas-reading is enabled.
The graph is made with the DataYours plugin, the successor of DataMine.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: fbockstael on September 19, 2014, 09:37:34 pm
@ Edraket
Message 30-08-2014

You are the best.
This is working like a charm.
Been searching for several weeks what I was doing wrong.
Tried your code and all my troubles disappeared.
Thanks.

Franklin




Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on September 22, 2014, 11:20:38 am
@C4Vette,

I had the same issue, meter just counting at T1 and no gas reading. I called the energy network company and they concluded the new meter must be defective. After a second visit of the installer he found that the meter replacement never made it into the administration of the energy network company (Stedin in my region). After some calling back and forth by the installer they found the correct information and after about three - four days things started to work as expected.

So give them a ring and ask for the installer to come over again. I would not try to confince them your self as the installer was from a different company and he knew who to call at both ends and what to ask.

Success Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: hinod on September 23, 2014, 03:48:27 am
Ui7 Serial Port Configuration not working.

As wimlem indicated a week ago there seems to be a problem with Serial Port Configuration under the new UI7. I seem to have that problem (also).

Is this a confirmed bug?
Is there a solution?
Should I downgrade to UI5?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: wimlem on September 24, 2014, 03:00:21 am
Ui7 Serial Port Configuration not working.

As wimlem indicated a week ago there seems to be a problem with Serial Port Configuration under the new UI7. I seem to have that problem (also).

Is this a confirmed bug?
Is there a solution?
Should I downgrade to UI5?

It is a bug indeed. There is another topic somewhere on this forum about this.

the solution for me was to contact support. They can fix it for you, so you don't have to downgrade ;-)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Trey T on September 30, 2014, 11:52:20 am
Man, you all are so high-tech. Is there a simpler way to interface it to monitor my usage?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on September 30, 2014, 03:43:50 pm
Man, you all are so high-tech. Is there a simpler way to interface it to monitor my usage?
Simpler? It is just a telephone-wire from the smart meter to an USB-converter connected to Vera.
Maybe vera is for the tweaker kind of guy, but I like it that way. Simplest solution is probably 'Toon' from Eneco.
Just ask about what you need help with.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on October 11, 2014, 02:15:59 pm
@C4Vette,

I had the same issue, meter just counting at T1 and no gas reading. I called the energy network company and they concluded the new meter must be defective. After a second visit of the installer he found that the meter replacement never made it into the administration of the energy network company (Stedin in my region). After some calling back and forth by the installer they found the correct information and after about three - four days things started to work as expected.

So give them a ring and ask for the installer to come over again. I would not try to confince them your self as the installer was from a different company and he knew who to call at both ends and what to ask.

Success Rene
Reporting back:
It took them more then three weeks but now I have T1 and T2 and gas showing in the app. Cool!

Cross-post, but does anyone plot the figures of the gas meter in DataYours?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: edraket on November 22, 2014, 03:59:05 pm
I'm using the gasmeter value of the plugin together with the VariableContainer plugin in Imperihome. Works good, but I like to get it in there as a energymeter (KMH/watts). So I can use the widgets of an energymeter in Imperihome.
Any ideas how to get the total usage of gas (m3) in KMH and the actual usage in Watts?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on November 25, 2014, 01:56:00 am
I'm using the gasmeter value of the plugin together with the VariableContainer plugin in Imperihome.
That is what I do too; put the reading from the gasmeter in VContainer as Variable1 (named 'Total'). This is done with the use of a little LUA in a scene. This scene runs every minute and subtracts the previous reading from the new reading and puts it in Variable2 (named 'CurrentGas'). Doing this with LUA in a scene you can manipulate the figures any way you want. I have DataYours2 than read the 'CurrentGas' and plot it but it doesn't look pretty yet. The sampling isn't correct I guess.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: C4Vette on November 25, 2014, 02:25:53 am
@edraket  (funny, my name is Ed and I'm sometimes called edraket)
About the calculation from m3 to kwh I found this link: http://www.ukpower.co.uk/home_energy/gas_meter_readings (http://www.ukpower.co.uk/home_energy/gas_meter_readings)

Explaining that it is just a little math that kan be done with LUA before putting it in Vcontainer.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: edraket on November 29, 2014, 09:24:22 am
I found a pretty simple solution to get the gasmeter data of the dutchsmartmeter plugin  into Imperihome. Since I don't have a solarsystem I'm using one of the exportmeters of the dutchsmartmeter plugin to hold the values of the gasmeter. Since the exportmeter child is of the devicetype powermeter, it can handle a total value in KMH and an actual value in Watts. In Imperhome you will get 3 widgets: the third one is the graphic, which is build on the logged actual values. And there you will need Datamine(! no longer support and development but still the only way to use the graphics of Imperihome together with vera!).

Simply put the values of the gasmeter in this powermeter:

-- Use Exportrate1 for gasvalues
                        local meterID = "ExportRate1"


-- put gasvalue in GasRate KMH powermeter as a string
         luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH", gasstring, findChild(THIS_DEVICE,meterID))


-- Calculate fake Watts and put in a string as Watts
         local activegas = luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas", THIS_DEVICE)
         if activegas > 0 then
            activegas = (activegas - gasvalue) * 1000
         activegasstring = tostring(activegas)

         luup.variable_set("urn:micasaverde-com:serviceId:EnergyMetering1", "Watts", activegasstring, findChild(THIS_DEVICE,meterID))


Because the actual changes of gasusage are small, I multiply by 1000. Nice but not a need.

This code I added to the dutchsmartmeter plugin, but could also put into a Lua scipt, as C4Vette suggest.

Now I have the actual gas usage in "watt" and the total gas in "KMH".

Imperihome lets you change the units, so the value can be shown als "m3" in stead of Watts or KMH.

Since I'm not using ergy monitor of Vera, that's no problem. But, if you like, you could recalc from m3 to KWH using the link C4Vette in his previous message.

It once again proved to me the flexibility of the vera system....


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Otje on December 11, 2014, 12:45:20 pm
@C4Vette

thanks for hinting towards the Vcontainer.
i was also intrested in gas usage during the day and thanks to Vcontainer and some lua i can now monitor the gas usage in intervals during the day.

I also noted that the Gas usage is reported only every hour? I was under the impression that similar to kWh usage the gas usage was reported every 10 seconds, when the serial line is polled.

does everybody have the same experience or is it only me?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on December 15, 2014, 12:35:06 pm
Hi Otje,

The Gas value is included in the 10 second poll. However, it does not change that often is my experience. I have not looked if it is once an hour or quicker. However, looking at the DSRM 4.0 standard it probably is the hourly value. See page 14 : http://www.gpx.nl/pdf/poort-P1-voorbeeld-2012.pdf

Cheers rene.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Otje on December 15, 2014, 01:45:57 pm
Hi

you are right, the document says: Last hourly value in M3. This confirms my reading

thank you very much for confirming.

now it does not make sense for me to calculate 1 min or 5 min consumption in my graphs and i can take a sample each hour (Datamine will also love this...)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bartandeweg on February 19, 2015, 02:24:45 pm
Someone any idea how to get the plugin to show the data right in the interface? See attached screenshot. The text is scrambled.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 03:31:41 am
Someone any idea how to get the plugin to show the data right in the interface? See attached screenshot. The text is scrambled.

Same issue here
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 05:11:46 am
I will try to fix this and let you know
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 23, 2015, 07:10:12 am
Hi,

There is a significant difference between UI5/6 and UI7 in this. Before the default width of a scene group was 3 button witdths, i.e. "x": "3" even if you set it to 1, 2 or 6. And if you want to make it wider, the device on the panel had to get wider as well ("x">"4" in the top definition) else the values would not be shown.

However, with the new UI7 layout, the width of the device is fixed. Now the scene group x means the number of columns you like to use and you can make it 1, 2, 3 or 15. The higher the number of columns, the narrower they get. If you now position a control in the control group mapping to that scene group you place the control relative of the number of columns. Example will help;
 SceneGroup "x": "1", means you can use a value between 0 and 1 from left to right.
 SceneGroup "x": "3", means left 0 -1 is first column, 1-2 is second and 2-3 is third, but still on that same left to right width.

I think the quickest and most compatible change is to SceneGroup with "id": "1" and change "x": "6" to "x": "3". I cannot test my assumption right now, but give it a shot.

Cheers Rene.


Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 09:26:17 am
I will try to fix this and let you know

I messed around a bit and here is the version showing better in UI7
I also changed the text into dutch.
Just install the .json through "apps">"Develep apps">"luup files"
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bartandeweg on February 23, 2015, 10:57:18 am
I messed around a bit and here is the version showing better in UI7
I also changed the text into dutch.
Just install the .json through "apps">"Develep apps">"luup files"

Nice. Thanks for your time on this.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Jacob on February 23, 2015, 01:33:01 pm
@TwannieM
How did you get that nice icon
Jacob
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 03:52:54 pm
I uploaded the item to google and changed the code to link to it.
I am still looking for the dir on the vera where the uploaded files are stored
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 05:19:20 pm
Do someone happen to know a place where you can share small images with everyone like, forever?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 23, 2015, 05:22:41 pm
Would it be possible to create a seperate device for gas?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 24, 2015, 03:59:55 am
Hi,

It depends on the UI version you have where the icons get stored. Not so nice and no real idea why but just a fact of Vera  ;)

On UI5  /www/cmh/skins/default/icons
On UI6  /www/cmh_ui6/skins/default/icons
On UI7 /www/cmh/skins/default/img/devices/device_states/

One more caveat. When you use your own local icons, they will not show when you access your Vera remotely. When you keep this as a URL to an image on the internet it will always show.

You can find all this information on the wiki pages http://wiki.micasaverde.com/ (http://wiki.micasaverde.com/)

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 24, 2015, 06:22:27 am
Hi,

It depends on the UI version you have where the icons get stored. Not so nice and no real idea why but just a fact of Vera  ;)

On UI5  /www/cmh/skins/default/icons
On UI6  /www/cmh_ui6/skins/default/icons
On UI7 /www/cmh/skins/default/img/devices/device_states/

One more caveat. When you use your own local icons, they will not show when you access your Vera remotely. When you keep this as a URL to an image on the internet it will always show.

You can find all this information on the wiki pages http://wiki.micasaverde.com/ (http://wiki.micasaverde.com/)

Cheers Rene

Hi, I am aware of that but.
You can upload png files too by the luup upload... i was just wondering where they are stored
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 24, 2015, 07:15:05 am
Hi, I am aware of that but.
You can upload png files too by the luup upload... i was just wondering where they are stored
Hi Twannie,
You cannot upload images via the LUUP upload. Images you will have to use WinSCP or something like that for. The upload function puts all files in one location only (/etc/cmh-lu if I remember correctly without checking) and compresses them. Upload is only intended for the xml, json, js and lua files.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 24, 2015, 07:39:41 am
Hi Rene

I accidentally uploaded an png file which was accepted and in the list..
I also noticed other png and aother files in the luup list.
When I click on download I can download them
Maybe this is different in UI7?

groetjes
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 24, 2015, 10:21:50 am
Hi Twannie,

The upload function will indeed accept any file type. It just won't do anything with them. They are just wasting space really. It is the same for all UI version as far as I know.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 24, 2015, 10:38:06 am
Thanks Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 25, 2015, 07:46:22 am
I did some testing and I know now how the positioning works (what Rene means), also on page 2 (details page)
I will fix that too and upload the corrected file (with proper positioning code)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 25, 2015, 10:22:43 am
Check  :D
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 25, 2015, 10:55:02 am
Well done. :)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 25, 2015, 04:59:05 pm
Thanks
Rene, can you use a round function or something like that in a json file? (For the gas)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 26, 2015, 04:48:45 am
Hi Twannie,

The json is a static definition of how a plug in will display variables, labels, buttons etc. You can handle more complex pages in JavaScript. The learning curve is quite steep also because you are almost blind to what is happening with the code you write. If you want to manipulate a value you best do that in the LUA code.

A good starting point is this post http://forum.micasaverde.com/index.php/topic,17300.msg133938.html#msg133938 (http://forum.micasaverde.com/index.php/topic,17300.msg133938.html#msg133938) as it has many links to useful pages.

Two tools I recommend; LuaTest and InfoViewer. Search the forum on the details.

Also in my own experience I am starting to be less worried that something looks nice on the Vera UI, but more important that I can see when I need in the Apps so I can do my day to day operating from those apps. The UI I more and more just use to configure it all and then go back to the apps.

Cheers Rene.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 26, 2015, 05:36:44 am
Hi Renee

I see your point and I agree.. but, I also have my laptop before me almost all day long  ;)
I am just starting with the Vera. So slowly I will try to nove into functionality and data manipulation. I only have experience in programmin with VBA though so it will take some time.
For example I am trying to change variabeles on a z-wave device, also very new to me, but that is off topic.

Cheers and thanks
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 26, 2015, 05:40:40 am
where can i  get infoviewer rene?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 27, 2015, 04:32:13 am
Could I put this in the startup luup?
local GasTotaal = luup.variable_get("urn:brutgrink-com:serviceId:dutchSmartMeter","Gas",372) (actually it should be a format of only whole numers)

and how can I get this in my json or am I thinking wrong here?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on February 27, 2015, 08:35:54 am
Hi Twannie,

You can put that in but it would not show in any json to display. That can only be done via a plugin that populates the variables you want to see. On the wiki pages you find information how to do that. That, looking at many other plug ins and tons of free time will get you a working plug in  ;)

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on February 27, 2015, 01:32:19 pm
hahaha... thanks Rene, see if we can find that time  ;)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: Brighters on March 01, 2015, 04:48:34 pm
Somehow UI7 does not see my serial cable.... Any clues? It used to work on UI5...

EDIT: Reboot did the trick :)

EDIT 2: Gasmeter remains 0. This used to work in UI5. Any suggestions?


LOG:

0   03/01/15 23:20:10.516   luup_log:78: MeterType: [ISk5\2MT382-1003] <0x2ec68680>
06   03/01/15 23:20:10.517   Device_Variable::m_szValue_set device: 78 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: MeterType was: ISk5\2MT382-1003 now: ISk5\2MT382-1003 #hooks: 1 upnp: 0 skip: 0 v:0xfea3b0/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.566   luup_log:78: Meter data (not processed): "0-0:96.1.1(5A424556303035313136323433303132)" <0x2ec68680>
50   03/01/15 23:20:10.597   luup_log:78: Power meter ImportRate1: 8365.654000 <0x2ec68680>
06   03/01/15 23:20:10.597   Device_Variable::m_szValue_set device: 86 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 8365.644 now: 8365.654 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:0 <0x2ec68680>
50   03/01/15 23:20:10.617   luup_log:78: Power meter ImportRate2: 4652.342000 <0x2ec68680>
06   03/01/15 23:20:10.617   Device_Variable::m_szValue_set device: 85 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 4652.342 now: 4652.342 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.646   luup_log:78: Power meter ExportRate1: 188.542000 <0x2ec68680>
06   03/01/15 23:20:10.647   Device_Variable::m_szValue_set device: 87 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 188.542 now: 188.542 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.676   luup_log:78: Power meter ExportRate2: 475.965000 <0x2ec68680>
06   03/01/15 23:20:10.677   Device_Variable::m_szValue_set device: 88 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: KWH was: 475.965 now: 475.965 #hooks: 1 upnp: 0 skip: 0 v:0xeebe40/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.696   luup_log:78: Currently active tariff: [0001] <0x2ec68680>
06   03/01/15 23:20:10.697   Device_Variable::m_szValue_set device: 78 service: urn:brutgrink-com:serviceId:dutchSmartMeter variable: ActiveTariff was: 1 now: 1 #hooks: 1 upnp: 0 skip: 0 v:0xfea468/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.716   luup_log:78: CurrentWattsImport: [0003.55] <0x2ec68680>
50   03/01/15 23:20:10.717   luup_log:78: CurrentActiveTariffImport: [1] <0x2ec68680>
06   03/01/15 23:20:10.717   Device_Variable::m_szValue_set device: 78 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 3550 now: 3550 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.718   Device_Variable::m_szValue_set device: 86 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 3550 now: 3550 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.718   Device_Variable::m_szValue_set device: 85 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.746   luup_log:78: CurrentWattsExport: [0000.00] <0x2ec68680>
50   03/01/15 23:20:10.747   luup_log:78: CurrentActiveTariffExport: [1] <0x2ec68680>
06   03/01/15 23:20:10.747   Device_Variable::m_szValue_set device: 87 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: -0 now: -0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
06   03/01/15 23:20:10.748   Device_Variable::m_szValue_set device: 88 service: urn:micasaverde-com:serviceId:EnergyMetering1 variable: Watts was: 0 now: 0 #hooks: 2 upnp: 0 skip: 0 v:0xec7c18/NONE duplicate:1 <0x2ec68680>
50   03/01/15 23:20:10.766   luup_log:78: Meter data (not processed): "0-0:17.0.0(0999.00*kW)" <0x2ec68680>
50   03/01/15 23:20:10.789   luup_log:78: Meter data (not processed): "0-0:96.3.10(1)" <0x2ec68680>
50   03/01/15 23:20:10.796   luup_log:78: Meter data (not processed): "0-0:96.13.1()" <0x2ec68680>
50   03/01/15 23:20:10.821   luup_log:78: Meter data (not processed): "0-0:96.13.0()" <0x2ec68680>
50   03/01/15 23:20:10.836   luup_log:78: Meter data (not processed): "0-1:24.1.0(3)" <0x2ec68680>
50   03/01/15 23:20:10.886   luup_log:78: Meter data (not processed): "0-1:96.1.0(3238303131303031323439303539333132)" <0x2ec68680>
50   03/01/15 23:20:10.936   luup_log:78: Meter data (not processed): "0-1:24.3.0(150301230000)(00)(60)(1)(0-1:24.2.1)(m3)" <0x2ec68680>
50   03/01/15 23:20:10.946   luup_log:78: Meter data (not processed): "(02351.200)" <0x2ec68680>
50   03/01/15 23:20:10.966   luup_log:78: Meter data (not processed): "0-1:24.4.0(1)" <0x2ec68680>
50   03/01/15 23:20:10.967   luup_log:78: Meter data (not processed): "!" <0x2ec68680>
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 02, 2015, 10:22:15 am
For those dutchmen interested I created a new json file which shows 3 states in the internet interface showing:
Green: up to 299W
Yellow between 300 and 999W
Red over 1000W

All is in dutch
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: bartandeweg on March 02, 2015, 10:35:47 am
For those dutchmen interested I created a new json file which shows 3 states in the internet interface showing:
Green: up to 299W
Yellow between 300 and 999W
Red over 1000W

All is in dutch

Nice addition!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: seabird on March 02, 2015, 12:05:55 pm
Very nice. Unfortunately my gas reading is not passed on. I can see it in the putty output though
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 02, 2015, 12:24:20 pm
on which ui are you?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 03, 2015, 05:21:19 am
Somehow UI7 does not see my serial cable.... Any clues? It used to work on UI5...

EDIT: Reboot did the trick :)

EDIT 2: Gasmeter remains 0. This used to work in UI5. Any suggestions?


LOG:

0   03/01/15 23:20:10.516   luup_log:78: MeterType: [ISk5\2MT382-1003] <0x2ec68680>
50   03/01/15 23:20:10.936   luup_log:78: Meter data (not processed): "0-1:24.3.0(150301230000)(00)(60)(1)(0-1:24.2.1)(m3)" <0x2ec68680>
50   03/01/15 23:20:10.946   luup_log:78: Meter data (not processed): "(02351.200)" <0x2ec68680>
50   03/01/15 23:20:10.966   luup_log:78: Meter data (not processed): "0-1:24.4.0(1)" <0x2ec68680>

Hi, I think there is a difference for the Gas reading between the Kaifka and ISks5 meters. Check you have the initial version installed where it first looked for the gas label and pulls the value from the next line. I had to change that bit to work with the Kaifka meter and you may need to change that back.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: seabird on March 03, 2015, 09:28:21 am
on which ui are you?
UI7 on a vera edge
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 03, 2015, 09:36:55 am
Read the message of Renee
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 03, 2015, 10:56:23 pm
I noticed my gas is not updated, it shows an old number.
Any ideas?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 04, 2015, 02:08:05 am
Very nice. Unfortunately my gas reading is not passed on. I can see it in the putty output though

Could you try uploading all these file?, that fixed the gas for me.

Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 04, 2015, 05:16:06 am
Good work Twannie,

This implementation file should work on both GAS meter readings I have seen in this forum thus far.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: seabird on March 04, 2015, 04:42:53 pm
Thanks guys, also found the solution myself. My solution:
Code: [Select]
        function dutchSmartMeterIncoming(data)
            if (string.len(data) > 0) then
                if (string.sub(data, 1, 10) == "0-1:24.3.0") then
                    luup.log("Gas meter reading in next line")
                    indGasComming = 1
                else
                    ---------------------------------------------------------------------------------------------
                    -- Check if we have to process gas meter
                    ---------------------------------------------------------------------------------------------
                    if (string.sub(data, 1, 10) == "0-1:24.2.1") then
                        luup.log("Gas meter: [" .. string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+") .. "]")
                        luup.variable_set("urn:brutgrink-com:serviceId:dutchSmartMeter", "Gas", tonumber(string.match(string.match(data, "(%d+.%d+*m3)"), "%d+.%d+")), THIS_DEVICE)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 07, 2015, 04:14:28 am
Good work Twannie,

This implementation file should work on both GAS meter readings I have seen in this forum thus far.

Cheers Rene

Hi Ren?

I am also trying to monitor the total kwh of the meter (with attached files) But it returns a "0"
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 07, 2015, 03:57:18 pm
Hi Twannie,

Not sure what reading you are referring to. The KWh for the four meter parts? Can you add an image?

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 07, 2015, 09:50:19 pm
Hi Rene

I cannot show it to you but on the first page of this threat the meter shows

Acual usage
Power (which is the total meters number)
Gas

Somewere along files have been changed which removed this number and were replaced it with the "ActiveTariff" number (1 or 2)
However, if I take the files on the first page and upload these to the vera the power shows a number "0" now

Can you do something with this info?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 07, 2015, 09:51:19 pm
I am sorry, so not one of the 4 seperate meters but the master device
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 11, 2015, 02:41:33 am
Hi Reene

I noticed major layout changes after the update yesterday
I can't findout what they changed... do you know?... the column layout is not used anymore?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 11, 2015, 05:43:48 am
Hi Twannie,

With 7.05 they made significant changes indeed and it looks like the top and left value have become meaningless for the panel view. They updated the static JSON documentation yesterday on this page http://wiki.mios.com/index.php/Luup_plugins:_Static_JSON_file#Position_device_controls_for_generic_devices (http://wiki.mios.com/index.php/Luup_plugins:_Static_JSON_file#Position_device_controls_for_generic_devices)

You can also try the new JSON simulator under Apps, Develop Apps.

Cheers rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 11, 2015, 08:24:28 am
Yes, I just found that. Thanks!

For people in Holland interested:
Here is the new json which is adapted to the new layout coding.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 11, 2015, 08:26:20 am
Rene, that new json testing area is very very handy indeed!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 11, 2015, 04:15:41 pm
Rene... I am testing to understand but it looks like I really don't  :-\
With the windowscovering json file 2 buttons are above the slider and 3 below by defaut.
I changed the coding to but the slider on top and put all the burrons below that.
It does not work however.
Maybe, if you have some spare time would you check what I am doing wrong?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 11, 2015, 05:34:56 pm
I am sorry Ren?
I am trying to get a combination of to files to work but I fail
attached an ".._original.." file which includes the total meters number (KWH)
The other one, posted later on in this post does not get this numer anymore.
I noticed some changes in the top of the file but I am not able to work it out because of the quite big diffeerences between the two.
Could you help me to find out what I did wrong...I am not sure I am getting the number and I am trying to round the same as the gas number
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 12, 2015, 05:37:48 am
Hi Twannie,

In both you see for the KWH the function totalPowerMeters. That function is there in _original one but not the other. It must have dropped off somewhere.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: basd82 on March 12, 2015, 06:52:20 am
What is the current version dutch powermeter ?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 12, 2015, 09:18:56 am
Bas, hold on for a sec, i need to fix this so we have a good version.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 12, 2015, 09:20:55 am
In both you see for the KWH the function totalPowerMeters. That function is there in _original one but not the other. It must have dropped off somewhere.

I entered the function and it directly added the high and low in and out powermeters but.. the don't show any values and if i check, there are no variabeles in those meters
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 14, 2015, 05:37:02 am
What is the current version dutch powermeter ?

These are the latest I have now. It should do the Gas correct both meters (ISKA or ...(Thanks to RexBeckett!)
They are adapted to match the latest firmware

Like the original it show live wattage next to the devicename and addtional the following fields:
Tarief (1 or 2)
Meterstand (Total meter, rounded at 1 digit(thanks Rex)
Gas (Total gas, rounded 1 digit (thanks Rex)

The advance tab also shows 4 values now.

As you see in Dutch but easily adapted (and to be tested in the new module!) in the json file.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 04:41:26 am
Hi Rene

My high and low tarif meters are not updating anymore... this after adding another energy meter (Aeon HEM1)
Dou know have any adea why this is happening (looking at the latest files posted above)?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 20, 2015, 05:44:48 am
Hi Twannie,

We can't keep up with you  ;D. Normally plugins do not interfere and the HEM does not use the serial/USB interface so no reason for that either. Have you looked in the Vera log files to see what is going on?

BTW; I am working on a completely different version to read the Dutch Smart meters that allows you to choose the meters to show . High and low separate or combined if you have a single tariff, optionally show meters for energy generation (T1-,T2-) separate or combined, have a separate gas meter, and a separate whole house power meter (only when you have multi tariff or energy generation). All child devices will be standard Power Meters, except the gas one as there is no standard for that, and the processing is completely different. I hope to publish in a week or two as I do not have too much time at the moment.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 05:52:53 am
Hi Twannie,

We can't keep up with you  ;D. Normally plugins do not interfere and the HEM does not use the serial/USB interface so no reason for that either. Have you looked in the Vera log files to see what is going on?

BTW; I am working on a completely different version to read the Dutch Smart meters that allows you to choose the meters to show . High and low separate or combined if you have a single tariff, optionally show meters for energy generation (T1-,T2-) separate or combined, have a separate gas meter, and a separate whole house power meter (only when you have multi tariff or energy generation). All child devices will be standard Power Meters, except the gas one as there is no standard for that, and the processing is completely different. I hope to publish in a week or two as I do not have too much time at the moment.

Cheers Rene

Hi Rene

That's is so nice and very much apreciated..!!!
You can keep up haha, I only trying to make minor adjustment due to my junior status   ::)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 05:54:51 am
It would have been nice to know what went wrong though :)
I think there might be an error in the I_... xml because of chanages I made.
I noticed when I remove the extra meters they are not created again
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 05:57:48 am
Ren?...
I have no experience at all to enable logging or accessing it..
I have no usb connected because I have poth ports full... can a usb-hub be used?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 20, 2015, 12:22:02 pm
Hi Twannie,

On the VeraEdge there is no real reason to move logging to a USB stick that I found. On a VeraLite I do have a USB hub that has a USB stick and the smart meter cable and that works just fine.

When you install the InfoViewer plugin you have the option to look at the log. It is not the most simple way as I can't read that fast and you cannot freeze it. You will see what I mean once you tried it. So I ssh into the Vera and go wild on tail, cat and grep commands. Or I use WinSCP to view the log and/or copy it to my PC for some deeper research. The log file is found in /tmp/log/cmh

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 03:38:22 pm
Hi Rene

The log is too big to attach!...  I opened it with notepad but looks quite messy too...
What tool can I use to vew the log?

Cheers!!
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 03:41:59 pm
By the way, I have a Vera 3
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 03:43:39 pm
You are a poweruser right?  ;)
Do/did you notice speed difference between the vera 3 and the Edge?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: jvasselt on March 20, 2015, 05:59:40 pm
I have downloaded the last files but I have several problems now ???. In advanced settings the text is outside the device and empty. Only actual usage is visible.
The devices for high and low tarif are not created anymore. In Imperihome on my tablet I see no values for energy anymore. Everything is empty. I have reinstalled the files but the result is bad.
What happened?  I use the Vera Lite
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 20, 2015, 06:04:10 pm
Hi Twannie,

Get Notepad++ you will love it. It will show new lines correctly where the MS thingy does not. You can indicate you are editing a LUA file and it will highlight accordingly, and has a ton of neat options.

I only have two VeraLites and an Edge but all are running different UI versions (5,6, Edge on 7) making it impossible to compare. I have this so I can test my plugins on each. Only my first VeraLite has a lot on it, but not as much as you I think  ;). Each seems to have faster and slower actions. But the Edge does Z-Wave Plus and that is supposed to be more secure and better for battery powered devices. You can always use a Z-Wave and Z-Wave plus device on a Z-Wave plus controller, but using Z-wave plus on a Z-Wave controller can be difficult. Plus devices are coming to market slowly now, so I have a few now. too early to tell the difference realy.

The Edge has a little more horse power than the Lite and 3 but it has not turned into a number cruncher. But for normal home automation it is fast enough. 'Problem' is that you can do sooo many things with the Vera because it is such an open design you can overload it.

Cheers Rene.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on March 20, 2015, 09:37:47 pm
Thanks, Notepad ++ looks great!
Now, the Log file is still huge.. Is there something I can do to narow the search for the meter error?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on March 22, 2015, 05:18:22 am
Hi Twannie,

In the log you can search for the words dutch or smart.

One that always works is to look for log:<device number>

Cheers Ren
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mvzut on April 09, 2015, 07:50:37 am
BTW; I am working on a completely different version to read the Dutch Smart meters that allows you to choose the meters to show . High and low separate or combined if you have a single tariff, optionally show meters for energy generation (T1-,T2-) separate or combined, have a separate gas meter, and a separate whole house power meter (only when you have multi tariff or energy generation). All child devices will be standard Power Meters, except the gas one as there is no standard for that, and the processing is completely different. I hope to publish in a week or two as I do not have too much time at the moment.
Any news on your new version Rene? I have just ordered a P1 USB cable and plan to install it on my Vera Lite this weekend...
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on April 09, 2015, 01:43:32 pm
BTW; I am working on a completely different version to read the Dutch Smart meters that allows you to choose the meters to show . High and low separate or combined if you have a single tariff, optionally show meters for energy generation (T1-,T2-) separate or combined, have a separate gas meter, and a separate whole house power meter (only when you have multi tariff or energy generation). All child devices will be standard Power Meters, except the gas one as there is no standard for that, and the processing is completely different. I hope to publish in a week or two as I do not have too much time at the moment.
Any news on your new version Rene? I have just ordered a P1 USB cable and plan to install it on my Vera Lite this weekend...
Just that time is too short at the moment. Cannot give an ETA, so you may just as well go with this current version.

Cheers Rene
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on April 09, 2015, 03:07:26 pm
To my knowledge this is the latest working version.
Please note the json might not work on UI5 or older and is created for UI7 only, latest version.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on April 09, 2015, 03:08:21 pm
Exmaple json
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mvzut on April 11, 2015, 01:13:42 pm
Ok, I installed the latest version of the plugin today, and it is working great! Unfortunately, it did not work immediately. At first I was suspecting some kind of interference between the USB-to-serial converters, as I have already two of those in use (RFXtrx and Opentherm Gateway) via a USB hub, and it worked briefly when I disabled those. But later it turned out to be much simpler: my Kaifa smart meter uses 115200/8 bit/no parity for the serial connection instead of the 9600/7 bit/even parity that is advised.
Next step is to create some scenes with lua code to fill a couple of virtual containers with the daily electricity & gas use (in kWh, m3 and in euros). Maybe an idea to add this to the plugin in the future as child devices?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on April 11, 2015, 01:28:08 pm
Next step is to create some scenes with lua code to fill a couple of virtual containers with the daily electricity & gas use (in kWh, m3 and in euros). Maybe an idea to add this to the plugin in the future as child devices?
You might as well have a look at the datayours plugin?
How do you use virtual containers.. varaiabeles in the device itself?
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: mvzut on April 11, 2015, 01:39:14 pm
I am using the old but still working Datamine plugin for logging and graphing, as Datayours is not (yet) compatible with Imperihome as far as I know.
I typically use the Multistring plugin for displaying custom information in Imperihome. Probably I am going to calculate the cumulative day values in a scene that runs e.g. every 5 minutes, store the results in new variables that I will store under the smart meter device itself, and use Multistring to display them in Imperihome. Unless it is very easy to create additional child devices in the smart meter plugin? No idea how to do that, but it would be nice since this wouldn't require Multistring.
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: TwannieM on April 11, 2015, 01:53:03 pm
Yes I agree but I wouldn't know how to build that :)
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: hugob123 on April 12, 2015, 08:12:04 am
I have the plugin working, but the gas value was displayed as 0.  So I attached my laptop with a terminal program to the energy meter and logged a few events. Then I looked into the code of I_dutchSmartMeter.xml and concluded that this will not work for my meter. So I changed the implementation and now it is working OK. What I did was parsing the line:
0-1:24.2.1(150999990000S)(00987.124*m3)
Before I publish my code, can someone who also has zero values for gas usage, log a few events from the meter and send them to me with the brand of the meter.
My gas meter is  a Itron G4 RF1

Hugo
Title: Re: New plugin for reading the gas and electricity usage from a Dutch Smart meter
Post by: reneboer on May 06, 2015, 12:17:50 pm
BTW; I am working on a completely different version to read the Dutch Smart meters that allows you to choose the meters to show . High and low separate or combined if you have a single tariff, optionally show meters for energy generation (T1-,T2-) separate or combined, have a separate gas meter, and a separate whole house power meter (only when you have multi tariff or energy generation). All child devices will be standard Power Meters, except the gas one as there is no standard for that, and the processing is completely different. I hope to publish in a week or two as I do not have too much time at the moment.
Any news on your new version Rene? I have just ordered a P1 USB cable and plan to install it on my Vera Lite this weekend...
Just that time is too short at the moment. Cannot give an ETA, so you may just as well go with this current version.

Cheers Rene
Hi, I finally have the first release of a new way of reading the Slimmemeter. Getting the whole house value to show a reasonable value when keeping solar power generation in account is proofing quite a headache, but I think I got it working (after starting over about five times). If you are interested you can find it here http://forum.micasaverde.com/index.php/topic,32081.msg232970.html#msg232970 (http://forum.micasaverde.com/index.php/topic,32081.msg232970.html#msg232970). If you have the version from this tread working, read the user guide first to make sure you need any of the new functions. Else there isn't any reason for trying the new one out.

Cheers Rene