Hi, I posted this over in the Balena forums, but perhaps someone has encountered this:
I have the excellent Sixfab Power HAT and have used their power_api python library on a vanilla (non Balenafied) Raspberry Pi 4 with Raspberry Pi OS and it worked flawlessly so I was excited to bundle it up into a container and run it along side my other apps, however I keep running into the errors below.
I believe it may have something to do with FROM image (see below) I’m using that may not include the same libraries as the Pi OS out of the box, but I can’t tell where to turn. Any ideas?
The only clue I could find is another user on another forum said: vcgencmd is part of the libraspberrypi-bin package.
[Logs] [3/8/2021, 2:10:18 PM] [battman] ************* System Sensors **************
[Logs] [3/8/2021, 2:10:18 PM] [battman] /bin/sh: 1: vcgencmd: not found
[Logs] [3/8/2021, 2:10:18 PM] [battman] Traceback (most recent call last):
[Logs] [3/8/2021, 2:10:18 PM] [battman] File "main.py", line 31, in <module>
[Logs] [3/8/2021, 2:10:18 PM] [battman] print("System Temp: " + str(sixfab.get_system_temp()))
[Logs] [3/8/2021, 2:10:18 PM] [battman] File "/root/.local/lib/python3.6/site-packages/power_api/power_api.py", line 196, in get_system_temp
[Logs] [3/8/2021, 2:10:18 PM] [battman] return float(temp[:-3])
[Logs] [3/8/2021, 2:10:18 PM] [battman] ValueError: could not convert string to float: