Teleinfo
English:
It's a simple parser for "téléinfo", the data stream available on french electric meters since the 2000. Data are available as modulations (1200 bauds) on 2 wires directly on the meter. It provides plenty of interesting informations: meter identification, subscribed power, subscribed contract, immediate power consumption, etc. Since this program concern a french only device, the other documentation will be redacted in french.
Français :
Il s'agit d'un simple interpréteur de trames téléinfo EDF. Ce programme est testé sur un Raspberry Pi B. Il permet de déchiffrer chaque trame et en fournir une représentation simple à traiter.
Installation
Add this line to your application's Gemfile:
gem 'teleinfo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install teleinfo
Usage
You can use the binary embedded into the gem: teleinfo
On my side, I mounted on my Rasperry Pi a /dev/ttyAMA0 according the instructions from http://www.magdiblog.fr/gpio/teleinfo-edf-suivi-conso-de-votre-compteur-electrique/ So I just run:
$ teleinfo /dev/ttyAMA0
or
$ cat /dev/ttyAMA0 | teleinfo
You'll get on stdout a JSON representation like:
{"adco":"424242424242","optarif":"HC","isousc":30,"hchc":25036224,"hchp":40244232,"ptec":"HP","iinst":16,"imax":41,"papp":3580,"hhphc":"D"}
Since I have only a counter with HPHC option, feel free to send me a dump of your counter if you want I handle your options set (please create an issue for it).
Contributing
- Fork it ( https://github.com/ook/teleinfo/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request