We have moved at community.getvera.com

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

Offline pingreply

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

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
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.
« Last Edit: March 02, 2014, 01:40:35 pm by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline piperpilot

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

« Last Edit: March 17, 2014, 05:31:00 pm by piperpilot »

Offline Crismaison

  • Sr. Member
  • ****
  • Posts: 451
  • Karma: +2/-0
Is the gasmeter connected to the electricitymeter?
Vera lite - Everspring smoke & flood detectors - Fibaro doorsensors - 2 Foscams - Greenwave 6 node smartplug - Several Switches -Netatmo - PLEG - Twilio - DropBoxuploader - FindmyIphone user

Offline piperpilot

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Yeah it's one of thos landys gyr or so, connects over the air

Offline mfp

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


Offline piperpilot

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

Offline reneboer

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

Offline piperpilot

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

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
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
« Last Edit: March 26, 2014, 12:01:43 pm by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline piperpilot

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

Offline 2linker

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

Offline Peter

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
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.

Offline 2linker

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

Offline 2linker

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