Author Topic: Dutch Smart meter additional plug in  (Read 19841 times)

Offline huib

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #45 on: February 07, 2013, 03:57:52 pm »
@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
- veralite UI5 - veralite UI7 - 9 fibaro dimmers - 7 fibaro switches - 2 eminent movement sensors - remote control - opentherm gateway - remote powermeter reading - control of whr930 unit - control of washing machine -

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Re: Dutch Smart meter additional plug in
« Reply #46 on: February 13, 2013, 03:49:53 pm »
try the following luup

Code: [Select]
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

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
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline cmbeek

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #47 on: February 17, 2013, 01:05:15 am »
@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!

Offline huib

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #48 on: February 17, 2013, 11:53:31 am »
@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
- veralite UI5 - veralite UI7 - 9 fibaro dimmers - 7 fibaro switches - 2 eminent movement sensors - remote control - opentherm gateway - remote powermeter reading - control of whr930 unit - control of washing machine -

Offline joost1981

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #49 on: February 21, 2013, 06:26:00 am »
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

Offline cmbeek

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #50 on: February 22, 2013, 05:03:50 am »
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.....

Offline joost1981

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #51 on: February 23, 2013, 07:48:46 am »
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.....

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

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Re: Dutch Smart meter additional plug in
« Reply #52 on: April 18, 2013, 08:06:51 am »
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.
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline cmbeek

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #53 on: June 05, 2013, 04:11:51 pm »
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.  ???

Offline mr leaver

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +2/-0
Re: Dutch Smart meter additional plug in
« Reply #54 on: June 06, 2013, 06:09:49 am »
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

Offline cmbeek

  • Sr. Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #55 on: June 06, 2013, 02:42:26 pm »
@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

2) 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".



Offline huib

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #56 on: January 12, 2014, 11:01:52 am »
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

« Last Edit: January 16, 2014, 01:02:25 pm by huib »
- veralite UI5 - veralite UI7 - 9 fibaro dimmers - 7 fibaro switches - 2 eminent movement sensors - remote control - opentherm gateway - remote powermeter reading - control of whr930 unit - control of washing machine -

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Re: Dutch Smart meter additional plug in
« Reply #57 on: January 18, 2014, 03:43:21 am »
Will installing this effect my data I already have gathered from your plugin? I do not want to loose my history
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline huib

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Re: Dutch Smart meter additional plug in
« Reply #58 on: January 18, 2014, 04:14:37 am »
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

- veralite UI5 - veralite UI7 - 9 fibaro dimmers - 7 fibaro switches - 2 eminent movement sensors - remote control - opentherm gateway - remote powermeter reading - control of whr930 unit - control of washing machine -

Offline svaleb

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +8/-7
Re: Dutch Smart meter additional plug in
« Reply #59 on: February 27, 2014, 08:58:13 am »
@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
 
« Last Edit: February 27, 2014, 09:00:49 am by svaleb »