Giter VIP home page Giter VIP logo

meter_reading's Introduction

Aidon/Hafslund AMS data parser

Use with an M-Bus dongle such as this one.

aidon_obis.py

A class for decoding HDLC and extracting OBIS fields. Requires python module crcmod (sudo pip install crcmod). NB: This is not a full COSEM parser, as the number of OBIS fields and their sequence is assumed to be as on a Hafslund meter.

aidon_test.py

Test output.

./aidon_test.py <port>
./aidon_test.py /dev/ttyUSB0

aidon_forward.py

Forward to influxdb and Home Assistant. Forwarding to only one of them is possible. Just omit the influx* or hass* arguments.
Will generate sensors in Home assistant named sensor.aidon_*. Not done with a component, so these sensors will disappear on Home Assistant restart, and can't be renamed.
For InfluxDB, readings are placed in the provided database under voltage, current, power and energy, and key dev holds device name (which begins with aidon).

python aidon_forward.py \
/dev/ttyUSB0 \
--influx_host http://localhost:8086 \
--influx_db metering \
--hass_host https://myhass.com:8123 \
--hass_token abcdefgh0123456789

aidon_read.py

Parses preliminary/old protocol used by Hafslund.
./aidon_read.py /dev/ttyUSB0

meter_reading's People

Contributors

skagmo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

meter_reading's Issues

Unable to parse aidon data

Hi

I'm passing data via Tibber pulse -> mqtt -> this script, but it's unable to decode any data. I get no errors.

In hex a typical file looks like this:

root@chewbacca:~/aidon# hexdump out.bin
0000000 a07e 412a 8308 0413 e613 00e7 400f 0000
0000010 0000 0101 0302 0609 0001 0701 ff00 0006
0000020 0a00 02d8 0f02 1600 431b 7e2b
000002c

How can I check if my data is valid at all?

Get this working with python3

Hi.

I'm trying to get you'r code to work with python3. I think that it has something to do with crcmod. I can see that crcmod.mkCrcFun(0x11021, 0xffff, True, 0x0000) in aidon_obis.py gives me different outputs from python2 to python3.

Any idea why this happens?

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.