In order to integrate with OpenAPS and allow us to safely shut down the Pi when voltage drops too low, it would be good to have a command-line tool that works like the voltage command from https://github.com/cjo20/EdisonVoltage, specifically in outputting json like:
root@edison-eb3 ~/myopenaps # ~/src/EdisonVoltage/voltage json batteryVoltage battery
{"batteryVoltage":3815, "battery":64}
It looks like this should be doable using the voltage library that's already used by openaps-menu (https://github.com/openaps/openaps-menu/tree/master/lib/voltage).
In order to integrate with OpenAPS and allow us to safely shut down the Pi when voltage drops too low, it would be good to have a command-line tool that works like the
voltagecommand from https://github.com/cjo20/EdisonVoltage, specifically in outputting json like:It looks like this should be doable using the voltage library that's already used by openaps-menu (https://github.com/openaps/openaps-menu/tree/master/lib/voltage).