Comments (8)
When you run the command:
vcgencmd measure_temp
do you get a response?
from pi-health-dashboard.
VCHI initialization failed
from pi-health-dashboard.
Looks like other people have had this issue with vcgencmd in the past (e.g. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=50262). You can try some of the solutions other people have found or you can simply comment out the python lines that are grabbing CPU temperature (lines 27-32).
from pi-health-dashboard.
sudo vcgencmd measure_temp gives the correct result. Permissions on /dev/vchiq are correct. I will look for another solution and send feedback.
from pi-health-dashboard.
Have you tried running the Python script with sudo?
sudo python pihealth.py
from pi-health-dashboard.
That’s what i do now and that works. It’s a system that is exposed to the
internet, so having a script running as root is not my preference, but
anyway, now it works.
On Sat, Aug 13, 2016 at 6:18 PM, jrbail01 [email protected] wrote:
Have you tried running the Python script with sudo?
sudo python pihealth.py
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEqHE9ri4i_JdipwKyJ0a-sVf1ZQsvT0ks5qfe5ygaJpZM4JjLFy
.
from pi-health-dashboard.
Traceback (most recent call last): File "pihealth.py", line 80, in <module> main() File "pihealth.py", line 27, in main cpu_temperature = get_cpu_temperature() File "pihealth.py", line 21, in get_cpu_temperature return float(output[output.index('=') + 1:output.rindex("'")]) TypeError: Type str doesn't support the buffer API
Error i got when trying to run the pihealth.py file
from pi-health-dashboard.
vcgencmd measure_temp
works OK.
As suggested by @jrbail01 above, the workaround is to comment out the CPU temp lines.
What's the proper fix for this, please, so I get CPU temp on I.S?
Here's a working, proper fix:
Line 21
# return float(output[output.index('=') + 1:output.rindex("'")])
return float(output[output.index(ord('=')) + 1:output.rindex(ord("'"))])
Credit to https://forums.pimoroni.com/t/enviro-plus-examples-error/11080/2
from pi-health-dashboard.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pi-health-dashboard.