We have moved at community.getvera.com

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

Offline piperpilot

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

  • Check with your "netbeheerder" if the gas can actually be read on their side
  • on the Kaifa the serial number of the gasmeter(lands) must be visible otherwise its not correctly coupled
  • Check with your "netbeheerdif the gas can actually be read on their side
  • check whether there is a line in the telgram which is showing the gasreading
  • maybe adjust the I-dutchsmartmeter.xml

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

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
Thijs, whay version is your dsmr? Its noted on your meter.
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline Unikraan

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

Offline piperpilot

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Hi SanderL

I've got a DSMR is 4
 :)

Offline reneboer

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

Offline intveltr

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1741
  • Karma: +102/-5
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?
« Last Edit: May 10, 2014, 01:44:06 pm by intveltr »
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.

Offline mfp

  • Full Member
  • ***
  • Posts: 103
  • Karma: +3/-2
@Unikraan

Have you tried deleting your device and afterward recreating the device? When gas reading is disabled it will stay on zerro.

Offline tyfoon

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

« Last Edit: May 12, 2014, 02:34:44 pm by tyfoon »

Offline Unikraan

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-1
@ MFP:
Yes, I have deleted first the Smart Meter App.


Offline tyfoon

  • Full Member
  • ***
  • Posts: 167
  • Karma: +0/-0
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?

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
Check serial settings and correct serial port! Had the same few days ago during MCV support session. MCV found out after trouble shooting.
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline piperpilot

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

Offline intveltr

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1741
  • Karma: +102/-5
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. 
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.

Offline Sender

  • Hero Member
  • *****
  • Posts: 973
  • Karma: +552/-467
  • Sr. manager of my Vera
Good firmware is more important than good karma. (and this costed me lots of Karma)

Offline intveltr

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1741
  • Karma: +102/-5
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.
HomeWave is available in the App Store!  Turn your iPhone/iPad into an easy-to-use remote control for Vera.