[vz-dev] vzlogger support for s0 meters on raspberry pi gpio pins

Thorben Thuermer r00t at constancy.org
Mon Dec 22 19:02:53 CET 2014


Hello,

implemented this at last, after nobody else did.
very first version, but seems to work so far.

thanks to udo for providing the hardware...

https://github.com/r00t-/vzlogger/commit/b3d1e4c65ad1622ec5e96e8d3fbcfc3d33c27d7c
(includes config example)

$ git clone -b raspis0 https://github.com/r00t-/vzlogger.git vzlogger_raspis0


what sucks about this:
- it clones the whole S0-meter code,
  would be better to share common stuff
- currently polls the gpio value
  the GPIO pins should support interrupts, would be much much better.
  (even the s0 on rs232 meter does not poll)
- the s0 meter in general needs fixing (like not consume 2 impulses per reading)
  but so does the whole codebase

- T.


PS:
the main thing that held me off doing this was frustration about lack of documentation.
today i looked again, and found how to get access to the gpios:
(everybody else just told me the gpio/gpio*/value files already existed for them)
http://raspberrypi.znix.com/hipidocs/topic_gpiodev.htm
echo 17 >/sys/class/gpio/export
echo in >/sys/class/gpio/gpio17/direction
cat /sys/class/gpio/gpio17/value
(that document also seems to explain how to use edge detection interrupts,
 will try to add that)


More information about the volkszaehler-dev mailing list