We have moved at community.getvera.com

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

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
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

bartandeweg

  • Guest
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!

Offline seabird

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Very nice. Unfortunately my gas reading is not passed on. I can see it in the putty output though

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
on which ui are you?

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
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
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline seabird

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
on which ui are you?
UI7 on a vera edge

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
Read the message of Renee

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
I noticed my gas is not updated, it shows an old number.
Any ideas?

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
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.


Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Good work Twannie,

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

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline seabird

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
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)

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
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"

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Hi Twannie,

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

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
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?

Offline TwannieM

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +3/-2
I am sorry, so not one of the 4 seperate meters but the master device