Giter Club home page Giter Club logo

Comments (8)

jrbail01 avatar jrbail01 commented on July 21, 2024

When you run the command:

vcgencmd measure_temp

do you get a response?

from pi-health-dashboard.

 avatar commented on July 21, 2024

VCHI initialization failed

from pi-health-dashboard.

jrbail01 avatar jrbail01 commented on July 21, 2024

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.

 avatar commented on July 21, 2024

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.

jrbail01 avatar jrbail01 commented on July 21, 2024

Have you tried running the Python script with sudo?

sudo python pihealth.py

from pi-health-dashboard.

 avatar commented on July 21, 2024

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.

Horcrux82 avatar Horcrux82 commented on July 21, 2024

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.

Richard238 avatar Richard238 commented on July 21, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.