hamishcunningham / pi-tronics

Source code for Raspberry Pi GATE projects.
http://pi.gate.ac.uk/
42 stars 15 forks source link

Mopicli, how to determine active source #122

Closed azetat closed 4 years ago

azetat commented 4 years ago

Hi, I'd like to use a cronjob/shell script to detect the MoPi-2 running on battery (supply 2), if mains failed (supply 1). Is there any way (version 4.1) to get the active source using mopicli? Thanks, Volkmar

hamishcunningham commented 4 years ago

You should be able to figure it out from a combination of -v (current source volts) and -v1 -v2 (the individual supply volts). HTH H

azetat commented 4 years ago

Thanks, got you. So no direct parameter...

hamishcunningham commented 4 years ago

not that I remember; the options are listed if you do -h h

On Tue, 4 Aug 2020 at 10:04, azetat notifications@github.com wrote:

Thanks, got you. So no direct parameter...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hamishcunningham/pi-tronics/issues/122#issuecomment-668477895, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBRBFBTE5Z4JGR3RCLVMH3R67FJ3ANCNFSM4PUFBOWA .

--

Hamish Cunningham Professor of Computer Science, University of Sheffield, UK

Cunningham's law of administrative entropy: the more data you enter, the more you will be asked for. Google's law of data value: if you can't get the machine to do it, don't bother.

Phone: 07740 149 842 / 0114 222 1891 hamish@gate.ac.uk https://twitter.com/@HCunningham https://hamish.gate.ac.uk https://unphone.net https://unphone.net/ https://gate.ac.uk https://pi.gate.ac.uk https://www.sheffield.ac.uk/dcs/people/academic/hcunningham https://www.sheffield.ac.uk/dcs/people/academic/hcunningham