This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Dutch 'slimme meter'

13

Comments

  • PBaan93PBaan93 Member
    edited February 2017
    @Homey_Lampje Got the github url for me? was looking for it, but couldn't find it (probably looked over it :expressionless:)
  • Homey_LampjeHomey_Lampje Member
    edited May 2017
    @RamonBaas today Liander installed an Iskra AM550 meter (DSMR v5)... I get a Telegram decode error.

    --- debug info ---

    Dutch Smart Meter application started

    Dutch Smart Meter pairing has started...

    23:38:58.980 Request to search for DSMR on 192.168.0.47:8088

    23:38:59.154 [192.168.0.47:8088] Connected to 192.168.0.47:8088

    23:38:59.941 [192.168.0.47:8088] >>>/ISK5\2M550T-1011__1-3:0.2.8(50)_0-0:1.0.0(170531233859S)_0-0:96.1.1(<removed>)_1-0:1.8.1(000001.082*kWh)_1-0:1.8.2(000004.591*kWh)_1-0:2.8.1(000000.000*kWh)_1-0:2.8.2(000000.000*kWh)_0-0:96.14.0(0001)_1-0:1.7.0(00.682*kW)_1-0:2.7.0(00.000*kW)_0-0:96.7.21(00004)_0-0:96.7.9(00002)_1-0:99.97.0()_1-0:32.32.0(00000)_1-0:52.32.0(00000)_1-0:72.32.0(00000)_1-0:32.36.0(00001)_1-0:52.36.0(00001)_1-0:72.36.0(00001)_0-0:96.13.0()_1-0:32.7.0(238.2*V)_1-0:52.7.0(235.6*V)_1-0:72.7.0(237.9*V)_1-0:31.7.0(000*A)_1-0:51.7.0(002*A)_1-0:71.7.0(000*A)_1-0:21.7.0(00.018*kW)_1-0:41.7.0(00.530*kW)_1-0:61.7.0(00.130*kW)_1-0:22.7.0(00.000*kW)_1-0:42.7.0(00.000*kW)_1-0:62.7.0(00.000*kW)_0-1:24.1.0(003)_0-1:96.1.0(<removed>)_0-1:24.2.1(170531233508S)(00000.038*m3)_!4BA4_<<<

    23:38:59.953 [192.168.0.47:8088] Telegram decode error: {}

    23:38:59.974 [192.168.0.47:8088] Connecion closed (found = false)


  • @Homey_Lampje The parser (https://github.com/robertklep/node-dsmr-parser) only supports v4. We've made some modifications to also support v3, but I'm not aware of a javascript implementation that also supports v5. If you PM me some valid telegrams I can try to see if we can update the parser.
  • @RamonBaas

    Done.

    ps. had a little finger trouble sending you a PM... you can delete the one under profile/activity.
  • With the help of Ramon it became clear to me (us) that the above mentioned problem is not related to the DSMR v5 telegram produced by my smartmeter... but it all has to do with the interface I am using http://www.esp8266thingies.nl/wp/ This particular interface (running firmware version 2.3.0 build 124) adds a NULL character following the P1 telegram's CRC, see also the screenshot.

    I openend a support ticket to fix the bug, untill then there is a simple workarround... In the parser code (index.js) add "\0$" such that the pattern lines look like this...

      TELEGRAM : /^\/...5(.*?)\r\n\r\n((?:.|[\r\n])*?)!([a-f0-9]{4})\0$\r\n$/mi,
      CHECKSUM : /^((?:.|[\r\n])+?!)([a-f0-9]{4})\0$\r\n$/mi,




  • RemcoHanninkRemcoHannink Member
    edited July 2017
    @RamonBaas
    Hello,

    Iam trying to use your NL.DSMR.P1 app, but I can't get it installed. The NodeJS module node_crc is missing in the github repository. Installing it manually wit npm install node_crc results in errors.

    I am running node version 4.8.3 under MacOS, same as is running on Homey

    Any idea ?

    Gr. Remco
      
  • @RemcoHannink I've added the lib to the repo for you.
  • I got it working with a wemos d1 mini with the easy esp mega firmware. For now I connected everything trough a breadboard but I am thinking of drawing a shield for the wemos D1 mini like this one: http://www.esp8266thingies.nl/wp/ only a bit more neat. If I make the total hardware for a small compensation, are there people interested? Ordering a couple extra pcb's isn't the cost. IoT doesn't have to cost that much, for the first time ;)
  • RebtorRebtor Member
    I hooked  an USR-TCP232-E2 module to the P1 port of my smartmeter. On a pc i have a python script running that processes the data to a mysql database and from there i transfer it to homey. One day i want to let homey connect to the USR module without the MySQL step but for now it works for me..

  • @RamonBaas
    Just tried the new ESPEasy firmware v2.0.0-dev11
    But when pairing in the app it is not recognized.
    Any idea what could be the problem?
    Tcp data :
    /KFM5KAIFA-METER



    1-3:0.2.8(42)

    0-0:1.0.0(170723224621S)

    0-0:96.1.1(xxxxxxx)

    1-0:1.8.1(000339.768*kWh)

    1-0:1.8.2(000407.717*kWh)

    1-0:2.8.1(000000.000*kWh)

    1-0:2.8.2(000000.000*kWh)

    0-0:96.14.0(0001)

    1-0:1.7.0(00.122*kW)

    1-0:2.7.0(00.000*kW)

    0-0:96.7.21(00000)

    0-0:96.7.9(00000)

    1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)

    1-0:32.32.0(00000)

    1-0:32.36.0(00000)

    0-0:96.13.1()

    0-0:96.13.0()

    1-0:31.7.0(000*A)

    1-0:21.7.0(00.122*kW)

    1-0:22.7.0(00.000*kW)

    0-1:24.1.0(003)

    0-1:96.1.0(xxxxxxxxx)

    0-1:24.2.1(170723220000S)(00358.128*m3)

    !96B12

  • Try the telegram via example.js in /node_modules/node-dsmr-parser.
  • default example:
    >>> example-telegram.txt
    reslults in: 
    if (!match_v3) throw new Error('INVALID_TELEGRAM');

    that is no ok right?

    haven't yet tested my telegram

  • If I run `node example.js` it parses all examples without issue.
  • hmm, that is weird.

    I pulled: https://github.com/nlrb/nl.dsmr.p1
    npm install
    tried both crc 3.4.4 and node-crc 3.4.0(which you included)
    node example.js in \nl.dsmr.p1-master\node_modules\node-dsmr-parser

    what npm an node version are you on?
    trying to pinpoint the difference.

    thank you for your help
  • node --version
    v6.10.2
  • Still no success on this side. Also tried it on a different computer. Can you share you local files? There has got to be a difference. Or can you try it wit a clean pull of git?
  • See my post june 3rd....
  • See my post june 3rd....
    did change that, that is not the fault 


    F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser>node example
    >>> example-telegram.txt
    F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\index.js:194
              if (!match_v3) throw new Error('INVALID_TELEGRAM');
                             ^

    Error: INVALID_TELEGRAM
        at Telegram.parse (F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\index.js:194:25)
        at new Telegram (F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\index.js:175:8)
        at Telegram (F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\index.js:173:44)
        at Object.validate (F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\index.js:167:12)
        at Object.<anonymous> (F:\OneDrive\Projecten\HomeyApps\HomeyProjects\nl.dsmr.p1\node_modules\node-dsmr-parser\example.js:7:23)
        at Module._compile (module.js:569:30)
        at Object.Module._extensions..js (module.js:580:10)
        at Module.load (module.js:503:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)

  • fault is in your telegram / interface... it worked before right... go back to the situation when it did work... and troubleshoot from there.
  • @PBaan93 Haven't tried it on Windows...
  • Otherwise try the dsmr parser code directly: https://github.com/robertklep/node-dsmr-parser
  • fault is in your telegram / interface... it worked before right... go back to the situation when it did work... and troubleshoot from there.
    cant find my old version, srry
  • RamonBaas said:
    Otherwise try the dsmr parser code directly: https://github.com/robertklep/node-dsmr-parser
    this one works nice!
  • Well, that's the one I'm using (with slight modifications for v3).
  • What has been changed in the dsmr parser?
  • RamonBaas said:
    Well, that's the one I'm using (with slight modifications for v3).
    nothing else?
  • Hello. Do others also experience excessive logging when using the nlrb/nl.dsmr.p1 app? If I don't disable logging for the energy meter variable, it completely fills up my storage in just a couple of months time. Parsing these measurements also usually locks up Homey because of the vast amount of data. My energy meter has a resolution of 1 sec per message, so this might be because of my version (5) sending in these messages at a much higher rate than the previous versions.

    How can we solve this problem? Shall I make a PR to reduce sensitivity for these messages and limit to 5 or 10 or even 30 sec-average logging to ease this up a bit?
  • I would propose to submit a change request with Athom to fix this in Insights. E.g. a user could set that for a certain measurement only 1 in 5/10/... changes the average or max is stored.
  • synegicsynegic Member
    edited February 2018
    RamonBaas said:
    I would propose to submit a change request with Athom to fix this in Insights. E.g. a user could set that for a certain measurement only 1 in 5/10/... changes the average or max is stored.
    I agree this is the appropriate place to 'fix' this, but as we all know this could take a while. And as I cannot control Athom's timetable, I think I will give it a go instead. Maybe make it configurable through the settings pane. But, I will also make sure to do a feature request with Atom for this.

    Thanks. 

    EDIT: Seems like they won't fix this anyways; https://github.com/athombv/homey/issues/816
    EDIT2: Tried it anyways (yolo); https://github.com/athombv/homey/issues/2227
Sign In or Register to comment.