Git Product home page Git Product logo

gosml's Introduction

SML smart meter reader & parser in go(lang)

!!This is a PoC!! and is currently working only with the following smart meter -> https://www.emh-metering.de/produkte/smart-meter/ehz-k

Nevertheless it should be easy to extend/change the implementation to work with other smart meters. I didn't find a generally applicable documentation of the SML, so I had to test and analyse the return value of my smart meter. There are some good sites (only in german - sorry) where you get some explanations about the SML (also for other smart meters). If you have questions or improvement ideas feel free to ask or create a pull request. This were some of my first go steps, architecture and code is far from perfect :) .

Link collection

Java-Library zum analysieren der Daten: https://mvnrepository.com/artifact/org.openmuc/jsml/1.1.2 https://www.openmuc.org/sml/ https://github.com/jblu48317/SMLToJSON https://linuxize.com/post/install-java-on-raspberry-pi/

Über SML: https://de.wikipedia.org/wiki/Smart_Message_Language

Generelle Seiten: http://www.stefan-weigert.de/php_loader/sml.php https://www.rudiswiki.de/wiki9/VolkszaehlerEMHeHZ https://www.msxfaq.de/sonst/bastelbude/smartmeter_d0_sml.htm https://www.msxfaq.de/sonst/bastelbude/smartmeter_d0_sml_protokoll.htm

http://blog.bubux.de/raspberry-pi-ehz-auslesen/

https://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/emh-ehz-h1 https://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/edl21-ehz

https://www.emh-metering.de/produkte/smart-meter/ehz-k https://www.emh-metering.de/images/Produkt-Dokumentation/eHZ-K-BIA-D-1-20.pdf

https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03109/TR-03109-1_Anlage_Feinspezifikation_Drahtgebundene_LMN-Schnittstelle_Teilb.pdf?__blob=publicationFile http://itrona.ch/stuff/F2-2_PJM_5_Beschreibung%20SML%20Datenprotokoll%20V1.0_28.02.2011.pdf https://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/emh-ehz-k#beispielkonfiguation https://wiki.volkszaehler.org/software/sml#beispiel_3emh_ehz_fw8e2a50bak2

BUILD FOR RASPBERRY PI (RASPBERIAN)

env GOOS=linux GOARCH=arm GOARM=5 go build

gosml's People

Contributors

rennerda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pmtabe1 themulle

gosml's Issues

panic: runtime error: index out of range [651] with length 648

I tried to use your code with my Hager EHZ 363Z5 over TCP (modified the code a little). When using the following SML I get a "index out of range":

local/energyreader/sml/MessageBody.(*MessageBody).moveBytePointerToNextListEntry(0xc000132000)
sml/MessageBody/MessageBody.go:66 +0x9c
It says "found packet", but then the error occurs.

SML-String:
1B1B1B1B01010101760900000000255BED44620162007263010176010109000000000C73F9CC0B0648XXXXXX7527B010163953100760900000000255BED45620162007263070177010B06XXXXXXX527B070100620AFFFF726201650F4B602DF17977078181C78203FF01010101044841470177070100000009FF010101010B0648XXXXXX37527B0177070100010800FF628201621E52FF552354F20201770781F6AFACFAFACF621E52FF552354CAF2DE0177070100010802FF0101621E52FF5327100177070100020800FF628201621E52FF552BD5A0E10177070100020801FF0101621E52FF552BD579D10177070100020802FF0101621E52FF5327100177070100100700FF0101621B520053094C0177070100240700FF0101621B52FF53214601770701001F0700FF0101622152FE5301BE0177070100200700FF0101622352FE5356D30177070100380700FF0101621B52FF5316240177070100330700FF0101622152FE53011B0177070100340700FF0101622352FE53576A01770701004C0700FF0101621B52FF5324B40177070100470700FF0101622152FE5301B30177070100480700FF0101622352FE5355920177070100603200020101620952FF5301360177078181C78205FF010101018302BF093F6DE4D2CA3E3C2C04CCB9XXXXXXXXXX5192CDD4FF49296500DE1DAE8CF536160F9070AFD0FF0BE2FFC5834EAC0177070100603203030101622352006268017707010060320304010162235200630117017707010060320003010162095200520A017707010060320004010162095200522B017707010060320005010162095200520401010163812200760900000000255BED3E620162007263020171016338BA00001B1B1B1B1A019AD7

any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.