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'

Is there a way read the "slimme meter' and use it in Homey?
«134

Comments

  • lubbertkramerlubbertkramer Member
    edited December 2016
    Not a lot of information you give. Is it a smart meter from the energy company (NL standard) or do you have something yourself to read the changes?  Do you have any information about your "slimme meter" like if it has an api / way to connect with it or wich manufacturer it is from? Normal meters (slimmemeters.nl) can be read out with a special cable where you can put a PI for example (USB to R11 (goes into P1 port at your meter). 

  • If you already have a Synology NAS you could use that to read out the smart meter and do a sorts of stuff with it. I have Domoticz running on the NAS that sends the data to pvoutput.org and also makes this data available for Homey to read out.
  • thx..

    I just (last week) switch from Essent to Nuon as my power company.

    I do have a 1515+ synology nas (stands beside the meter) but i don't use it to read out the meter, did not know this was even possible and how to do this with the synology.
    At the moment my vera unit stil does this (also beside the silmmemeter), i have a 'special' USB cable directly plugged into the vera unit and in the slimmemeter which vera uses to read the meter values.

    I am new to Homey, got it only 4 days now and i am still playing with it, to see what it can and cannot do, want to know how it works before i gonna switch from era edge to the homey.
    At the moment i am investigating which functions i have in vera and if they are possible (and how) in Homey.

    It is sad that the homey simply cannot communicate or (z-wave) pair with the vera unit as master/slave or has an app to connect to the vera edge  as there is for the fibraro and other controllers, this would make it much mich more easier to switch.

    Next weekend i think i am gonna unpair all my z-wave devices from vera and pair them to Homey and start making the flows(scenes) for automation.
  • I have a Synology connected to my "slimme meter" via a P1 cable. On the Syno I run Domoticz, and that logs the energy data. Getting it from the Syno to Homey, is possible too, but requires some effort to get the correct http get/put requests.  
  • JanHJanH Member
    edited December 2016
    At my home a "Toon" is connected to the P1 of the "slimme meter" and logging all figures. As soon as, finally, the Toon app will become available for Homey once (?), I think that also could solve your wishes.
  • I have connected the smart meter to my Raspberry PI with a RJ11 to USB cable (https://www.sossolutions.nl/slimme-meter-kabel) and can view the actual values in pimatic.
    Does anyone has some experience with for example writing the data to an mysql database and use them in Homey Insights?
  • I forgot one: BeNext : https://apps.athom.com/app/eu.benext
    @JPS showing mysql-data in Homey isn't possible directly. You could create an app which reads the pimatic/mysql data to a Homey app but why would you keep pimatic if you have Homey?

  • @JBS showing mysql-data in Homey isn't possible directly. You could create an app which reads the pimatic/mysql data to a Homey app but why would you keep pimatic if you have Homey?

    I'm using pimatic for almost 2 years and I have Homey for only 2 weeks now. 
    I will stop using pimatic if Homey will stay as my default controller, but I love the clean and basic web interface of pimatic for switching of my lights without scrolling and/or choosing floors and rooms.

    Is there a way to get the smart meter data into Homey (without pimatic ;)) using the RJ11/USB cable (and a RPi)?
  • If you use a simple serial to ethernet device, you can use this one as well: https://github.com/nlrb/nl.dsmr.p1
  • RamonBaas said:
    If you use a simple serial to ethernet device, you can use this one as well: https://github.com/nlrb/nl.dsmr.p1
    Which device do you use for that?
  • @TedTolboom You can use a USR-TCP232-T2 (or USR-TCP232-E2 as on the picture) with a MINI (TTL) RS232.


  • How do you invert the data bit?
  • Don't need to. It is treated as a RS232 signal this way, not a TTL signal.
  • Homey_LampjeHomey_Lampje Member
    edited January 2017
    RamonBaas said:
    Don't need to. It is treated as a RS232 signal this way, not a TTL signal.
    @RamonBaas does that mean your Dutch Smart Meter app for Homey is not compatible with interface cables that do invert the data bit?

    I would like to use my existing P1 cable when possible....

    http://www.esp8266thingies.nl/wp/

  • Homey_LampjeHomey_Lampje Member
    edited January 2017
    @RamonBaas telegram from my smart meter has a slightly different gas line... as a result parsing does fail. Note that my meter does also not generate a CRC for the telegram.

    Incoming telegram...
     /ISk5\2MT382-1004


    0-0:96.1.1(<removed>)

    1-0:1.8.1(08159.825*kWh)

    1-0:1.8.2(06460.364*kWh)

    1-0:2.8.1(00000.003*kWh)

    1-0:2.8.2(00000.002*kWh)

    0-0:96.14.0(0001)

    1-0:1.7.0(0000.60*kW)

    1-0:2.7.0(0000.00*kW)

    0-0:17.0.0(0999.00*kW)

    0-0:96.3.10(1)

    0-0:96.13.1()

    0-0:96.13.0()

    0-1:24.1.0(3)

    0-1:96.1.0(<removed>)

    0-1:24.3.0(170129210000)(00)(60)(1)(0-1:24.2.1)(m3)

    (04321.260)

    0-1:24.4.0(1)

    !

  • @Homey_Lampje I am using the parser of Robert Klep (https://github.com/robertklep/node-dsmr-parser). You could report it there or I can try another parser (e.g. https://github.com/ruudverheijden/node-p1-reader).
  • @RamonBaas will certainly do that! When I walking through your code there is this check in core.js:

    if (this.incomingTelegram[0] == '/' && this.incomingTelegram.slice(-7).match(/!.{4}\r\n/) != null) {

    Well in my case their is no CRC (its null...), removed the && part of the above check... then the parser of Robert starts throwing errors at me ;-), will continue troubleshooting.
  • RamonBaasRamonBaas Member
    edited January 2017
    Just noticed the comment in the README of the parser: 
    Will only parse DSMRv4 telegrams (not DSMRv3 or older).
    Looking at the DSMR spec, the CRC is not optional - it should be there...

    I can't see what version of the meter you have (1-3:0.2.8), but it looks like more data is missing. Would check the interface.
  • Check.

    Its version 3, and the above (my) telegram is according to that specification (CRC not calculated, non standard gas line) see below screenshot.

    Thanks for the help, I wil fix it myself.

  • Clear, so the crc is new in v4. If you have a fix that works for both versions, can you submit a PR?
  • Yes it is.

    I will contact you when I have a fix that works for v3 and v4.
  • Have a fix running in test... its uses a "switch" to select either DSMR v3 or V4. In the "Add Dutch Smart Meter" panel a check box should be added to check DSMR v3 (default is v4). I will keep you posted.
  • @RamonBaas added checkbox to the add meter dialog so one can switch between v3 and v4 protocol (see screenshot below).

    Little puzzled by the behaviour of the "summary panel" in some cases after adding a meter energie usage shows just a dash, but on the energie panel itself the energie is updating every 10 secs.... add the meter again and all is working fine... (see screenshots below). Any ideas?

     

  • Energie in Watt en Stroommeter in KWh ? shouldn't that be the other way around? <span>:wink:</span>
  • Don't think so... say your watercooker is rated 2000 Watt (2 kWatt)... turn it on and the energie consumption is 2000 Watt not 2000 kWh... Instead of the label "Energie" a label as "Power Consumption" could be considered, but I leave that to Ramon. 
  • RamonBaasRamonBaas Member
    edited February 2017
    @ErwinVrieze, @Homey_Lampje The labels are the default Homey labels of the standard capabilities - not something I can control.

    @Homey_Lampje Good that it is working! Can I merge the code? I'd still like to see whether we can determine from the data stream what version to decode.
    BTW: why don't you have an icon for 'gasstroom'? Just noticed I forgot to commit this to the repo, will fix that.
    The energy reading on DSMR device can be undefined ('-') if you have configured there to be a producer available, but there is no producer. I.e. it is waiting for a value from the producer, but this never arrives.
  • Homey_LampjeHomey_Lampje Member
    edited February 2017
    @RamonBaas About the labels being under the control of Homey (Athom) well I came to that conclusion myself when I went through your code yesterday evening, thanks for the confirmation ;-)

    With regards to merging code. I first want to figure out why during paring I sometimes get a dash for energy. As stated in my previous post, at the same time the "summary panel" is showing a dash for energy the "single energy panel" is showing the correct values... strange don't you think. My guess is that during meter paring there is some sort of an timing issue and energy is as a result of that not assigned to the "summary panel". Paring the meter again will in many cases fix the issue (meaning energy is shown on the "summary panel")... see photo's in earlier post!
    Question: Do you think a timing issue makes sense? Ideas on how to fix a timing issue?
     See post below!!!

    Agree that it would be nice and more convenient to determine the DSMR version from the data stream (telegram). However the v3 DSMR protocol does not output (or at least my meter does not output) that information see v3 spec above. Information that is not there cannot be decoded ;-), and logic like "if DSMR version is not there then it is version 3" I would not advise ;-)

    All this said... I am happy with how it is working... Monitoring water usage is next :-)

  • Homey_LampjeHomey_Lampje Member
    edited February 2017
    @RamonBaas okay I found the issue... has nothing todo with timing... its a bug in your code imho :-) Let me explain....

    During meter paring driver.js is used to find the meter its capabilities, for energy this is the code...
     < dsmr.getValue('measuredWatt', device.id, function(err, val) { 

    Note that I commented out the original code... and replaced it with "actualWatt'.


    Processing/updating the data is done in core.js, this is the code
    < updateValue(this, 'actualWatt', this.values.actualWattDel - this.values.actualWattRec); >



    The "summary panel" is now working flawlessly.
  • @Homey_Lampje You're close, but the bug is different  :p. The behavior you see occurs because the events are not registered after adding the device. The 'completed' event was never emitted after pairing. Will submit the fix + some additions soon.
Sign In or Register to comment.