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.
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.
Add this line to your application's Gemfile:
gem 'teleinfo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install teleinfo
You can use the binary embedded into the gem: teleinfo (were file can be a regular file containing raw teleinfo datas or STDIN)
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).
- 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