gdombiak / OctoPrint-OctoPod

OctoPod plugin for OctoPrint. Used for sending real time push notifications
Apache License 2.0
70 stars 12 forks source link

fix(sbc): improve handling of vcgencmd on rpi #151

Closed bjschafer closed 2 years ago

bjschafer commented 2 years ago

Check for a couple of common paths for vcgencmd (Raspbian and Ubuntu).

If neither are found, we treat it as not being an rpi - since temp checks are the only reason to have an rpi object.

This should fix #132 (and better support Ubuntu, my use case :))

gdombiak commented 2 years ago

Thanks Braxton for this nice PR. I just merged it and is ready for the next release. You might want to add your name to the Authors.md file as well (PR against dev).

Thanks, Gaston

arekm commented 2 years ago

Note that /usr/bin/vcgencmd path is compatible with old and newer distribution versions. Does anyone know any distro variant which doesn't provide /usr/bin/vcgencmd?

I've checked few old ones and all have it. See https://github.com/imrahil/OctoPrint-NavbarTemp/pull/90

llewynS commented 2 years ago

I am currently having an issue with this: 2022-09-23 09:21:20,696 - sarge - WARNING - No process found for Command('/usr/bin/vcgencmd get_throttled') 2022-09-23 09:21:20,697 - octoprint.plugins.pi_support - WARNING - Command not found: /usr/bin/vcgencmd 2022-09-23 09:21:20,703 - octoprint.environment - INFO - Detected environment is Python 3.8.13 under Linux (linux). Details: | hardware: | cores: 4 | freq: 1500.0 | ram: 1934405632 | os: | bits: 64 | id: linux | platform: linux | plugins: | pi_support: | model: Raspberry Pi 4 Model B Rev 1.1 | throttle_check_enabled: true | throttle_check_functional: false | python: | pip: 22.0.4 | version: 3.8.13

I am using Ubuntu 22.04 64bit on an RPi

bjschafer commented 1 year ago

@llewynS -- I'm wondering if you need to install the correct package. Can you try this:

sudo apt install libraspberrypi-bin

and see if it works?