Dutch Smart meter additional plug in

@huib
No luck here. I get the same response of the device as Screemhouse but time keeps displaying zero’s…
When opening the S_dutchSmartMeterCounter.xml file I get the same error as mentioned a few posts ago…

@cmbeek
Did you update all 4 file as sent on 5 feb?
What do you get if you check the variable through the brouwser?
Pls advise
Rgds
Huib

@huib

See attachement for result of http://ip:3480/data_request?id=status&output_format=xml&DeviceNum=xx
Looks ok to me, but that doesn’t mean much :wink:

@cmbeek

be so kind to advice

  1. did you update the files as sent on 5 feb
  2. the smart meter it self is running good?
  3. did you run the scene with the luup.reset1?

pls advise
rdgs
huib

@ Huib

  1. did you update the files as sent on 5 feb → Yes, but only after changing Id numbers
  2. the smart meter it self is running good? → Yes
  3. did you run the scene with the luup.reset1? → Yes

Strange isn’t it?

@cmbeek

can you look at the luup.log file by using WinSCP
special look for
\etc\chm\AAASmartMeter.log

do you see the message …
2013-01-28 22:01:39 dutchSmartMeterCounter: Start Up Completed

and or
2013-01-29 00:00:00 Started = EoD TimeLog =
2013-01-29 00:00:00 Started = Tue Jan 29 00:00:00 2013
2013-01-29 00:00:00 Started = EoD Start of Data Process TimeLog =
2013-01-29 00:00:00 Started = Tue Jan 29 00:00:00 2013
2013-01-29 00:00:00 Started = EoD End of Data Process TimeLog =
2013-01-29 00:00:00 Started = Tue Jan 29 00:00:00 2013

and also look in
\var\log\chm\LuaUPnP.log after rebooting
look for luup_log: ID
and for
_dutchSmartMeterCounter.xml error message

pls advise
Huib

[quote=“huib, post:15, topic:173303”]try the following luup

local smtp = require("socket.smtp")

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

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

		local ADD_Plugin = 120    -- put the id of the additional plugin
		
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 last_gas = luup.variable_get("urn:Kuiper-com:serviceId:dutchSmartMeterCounter", "TodayGas_6",  ADD_Plugin ) or "0"
local last_kwh1= luup.variable_get("urn:Kuiper-com:serviceId:dutchSmartMeterCounter", "TodayLow_6",  ADD_Plugin ) or "0"
local last_kwh2= luup.variable_get("urn:Kuiper-com:serviceId:dutchSmartMeterCounter", "TodayHigh_6", Add_Plugin ) or "0"

local gas = gas - last_gas
local kwh1 = kwh1 - last_kwh1
local kwh2 = kwh2 - last_kwh2

        local from = USER_SENDING
        local rcpt = {USER_RECEIVING}

        local mesgt = {
            headers = {
                to = USER_RECEIVING,
                subject = "Meterstanden"
            },
            body = "Verbruik standen van :\nGas\t\t\t= " .. gas .. "\nLaag\t\t\t= " .. kwh1 .. "\nHoog\t\t\t= " .. 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("Error " ..  e)
        end

i did not yet tried it but if you look at the script it must work
do change the ID of the different plugins

rdgs

Huib[/quote]

Huib, I found the error where I did not get the High figure correct:

local last_kwh2= luup.variable_get(“urn:Kuiper-com:serviceId:dutchSmartMeterCounter”, “TodayHigh_6”, Add_Plugin ) or “0”

the Add_Plugin must be ADD_Plugin, now it works perfectly, thx again

@Huib

Finally I figured out what the problem was!!
I looked at different logs (thanks Huib) and could only draw one conclusion: The plug-in was not running at all.

Before I changed the I_dutchSmartMeterCounter.xml file using a free XML editor found on the internet.
This time I tried good old notepad to change the Id-numbers in the code and now the plugin works!!!
(apparently the free XML -editor messes up the code…)

Thanks again for all the support!

@cmbeek
A decent tool for writing in xml or json file is, for me, notepad++
Others might have other programs, but i like this one

I am happy it is now running
Rgds
Huib

Hello to you all,

I’m the proud owner of a Vera 2 and still an newbee. I would like to measure electricity and gas using the P1 port on the electric meter.

Just want to make sure I understand the information in this topic.

When I order a cable (http://www.wirelesswonen.nl/Webwinkel-Product-22714125/Kabel-tbv-Slimme-meter.html) and plug it via USB in my Vera 2 and install the application “Dutch Smart Meter”, then I am able to log my electric and gas usage? I could not find any information if this works with Vera2 (UI5)?

For now I am using a Youless Energy Monitor (only for measuring electricity).

Thank you for helping me out.

Joost Poulissen

I think it should work.
Firmware is same as on veralite or vera3 units.
Plugin is the same.
I cannot think of a reason why it shouldn’t work…

[quote=“cmbeek, post:51, topic:173303”]I think it should work.
Firmware is same as on veralite or vera3 units.
Plugin is the same.
I cannot think of a reason why it shouldn’t work…[/quote]

I order the cable and tested it today. Works like a charm! ;D

Huib, once more thanks for this plugin, it gives me great visibility of my daily, weekly and monthly usage. Although with the cold weather I sometimes did not dare to look.

Huib, your plugin has been running smoothly for the past 3 months now.
Sun has finally started to shine and I was wondering if the plugin could easily(?) be expanded to include the exportrates (1 and 2) of my dutch meter in order to also monitor the production of solar electricity.

I looked at the code, but is far to complicated for me to even try expanding the code. ???

cmbeek

please remind that readings of exportrate1 en exportrate2 are likely values that are lower than the actual production.
Your own consumption during production of solar energy is not going back into the grid.

That is why i already asked for some help on making a plugin for my piko kostal solar converter

@rpleever

I am aware that export rates are not equal to the solar energy produced.
There are actually two parameters that I am really interested in to monitor:

  1. Electricity consumption which wil effect the height my electricity bill = Importrate1 + importrate2 - exportrate1 -exportrate2

and

  1. My actual electricity consumption = Importrate1 + importrate2 - exportrate1 -exportrate2 + solar production

My solar production is measured by a zwave power clamp (AEON; accuracy could be better).
I would be very pleased if i could monitor the two proposed parameters in a plugin like the “Dutch Smart meter additional plug in”.

I have modified my plug in with the following additional item

every dat at midnite in a separete file the following data is added;

date; high, low, gas;

resulting in the following table;

2014-01-01 , 3608.3, 3380.5, 1112.4
2014-01-04 , 3633.8, 3401.6, 1118.2
2014-01-05 , 3633.8, 3414.6, 1121.0
2014-01-06 , 3633.8, 3431.6, 1124.6
2014-01-07 , 3648.8, 3435 , 1125.5
2014-01-08 , 3659.6, 3437.7, 1126.2
2014-01-09 , 3669.2, 3441, 1130.1
2014-01-10 , 3679.8, 3444, 1131.1
2014-01-11 , 3688.3, 3447.3, 1132.3
2014-01-12 , 3688.3, 3462.5, 1135.1

the location of the file is;
/etc/chm/

name is
AAsmartMeterDataDailyLog

regards
Huib
Edit will add files tomorrow

Will installing this effect my data I already have gathered from your plugin? I do not want to loose my history

No when you update the files you dont loose the data
I have been updating / playing with it and did not the last info

Rgds
Huib

Verstuurd van mijn GT-P3110 met Tapatalk

@Huib
Do you know if this Dutch powermeter is in anyway related to the Danish Kamstrup powermeter for the kamstrup 382 meter.
Because then I would hope your software is in english (would prefer danish but…).
We are some who have the kamstrup z-wave module 6840001 and we would like to know more.
Regards
CE

http://www.kamstrup.dk/media/21659/file.pdf