Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pi CPU temps to health check #1956

Open
DanTheReefer opened this issue Oct 17, 2022 · 17 comments
Open

Add Pi CPU temps to health check #1956

DanTheReefer opened this issue Oct 17, 2022 · 17 comments

Comments

@DanTheReefer
Copy link

For water tight enclosures that won’t have air exchange, looking to get a CPU temp readout to the health check

@ranjib
Copy link
Collaborator

ranjib commented Nov 7, 2022

you mean send alert when cpu temperature crosses certain threshold ?

@Simonv92
Copy link

I think that he means to have CPU temp as a Temperature sensor in reef-pi, maybe to control a fan or something else...

@DanTheReefer
Copy link
Author

I think that’s the way to do it, pi temp readout as temp sensor

@TheRealFalseReality
Copy link

Is there a way to monitor the CPU Temp at all in Reef-Pi?

@ranjib
Copy link
Collaborator

ranjib commented Dec 30, 2022 via email

@ranjib
Copy link
Collaborator

ranjib commented Dec 30, 2022 via email

@TheRealFalseReality
Copy link

TheRealFalseReality commented Dec 30, 2022

I'm not familiar with Prometheus but I have heard of it since using reef-pi. I will learn all that and see what I can do, thank you!

But you can do this easily with nodeexporter (to get the metrics ) , Prometheus (to store ) and grafana (to vidsualize)

On Fri, Dec 30, 2022 at 10:05 AM Ranjib Dey @.> wrote: Not right now . On Thu, Dec 29, 2022 at 4:38 PM Nicholas White @.> wrote: > Is there a way to monitor the CPU Temp at all in Reef-Pi? > > — > Reply to this email directly, view it on GitHub > <#1956 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AACNHEU7DJKQOQBF6WWYTTDWPYVI5ANCNFSM6AAAAAARGSNULI > . > You are receiving this because you commented.Message ID: > @.***> >

@TheRealFalseReality
Copy link

Glances seems to work as well!

@TheRealFalseReality
Copy link

Glances does take up a fair amount of resources, however. But I am also trying out this:
https://github.com/Sennevds/system_sensors

@Simonv92
Copy link

Simonv92 commented Jan 2, 2023

Glances seems to work as well!

How did you make it work with nodeexporter? I already have Prometheus and Grafana working..
Thank you!

@TheRealFalseReality
Copy link

I did not. It was too much for me and I already had experience with Glances. Just 1 program to capture and output everything on a web interface, seamlessly sent over to the Home Assistant Integration. I Installed glances on the RPi3 and my Windows11 PC and integrated into HA
Screenshot_20230102-123519

@Simonv92
Copy link

Simonv92 commented Jan 2, 2023

Thank you, if you're only interested in CPU temp in HA you can use the Reef-Pi home assistant integration which already expose the CPU temp...

@TheRealFalseReality
Copy link

I thought it would, but mine does not send the data for CPU/RAM, which is what got me to look into glances. Here's my integration:
Screenshot 2023-01-03 113524

@Simonv92
Copy link

Simonv92 commented Jan 3, 2023

How did you configure Glances on Home Assistant? I have make it work on the Rpi but I can't do the same in Home Assistant...

@TheRealFalseReality
Copy link

TheRealFalseReality commented Jan 3, 2023

with glanes running in web mode, glances -w, you can use the Glances integration and all I did was enter the reefpi's IP, keeping everything the same.
Screenshot 2023-01-03 115214

@Simonv92
Copy link

Simonv92 commented Jan 3, 2023

Thank you very much!
Do you have a guide to install Glances on the Rpi? I think I've done something wrong since it doesn't connect to HA..

@TheRealFalseReality
Copy link

TheRealFalseReality commented Jan 4, 2023

Yes, I followed this guide:
https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd

Try it by running the following command and see if you get the browser GUI to load.
glances -w

But you'd prolly want to start this at startup and headless, so create a glances.service file:
sudo nano /etc/systemd/system/glances.service

and add the following information:
[Unit]
Description=Glances
After=network.target

[Service]
ExecStart=/usr/local/bin/glances -w
Restart=on-abort
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Then:
sudo systemctl enable glances.service
sudo systemctl start glances.service
sudo reboot

Find RPi IP:
hostname -I

This should work!
Then just add the RPi's IP to the glances integrating, just the IP, no HTTP or server
192.168.86.XXX

you can try the hostname itself but since I use static IPs, I prefer the IP address.

Should add, lemme know if not

NOTE: When installing Glances, I believe it updated Python. Before installing, I was playing with custom scripts using
python script.py
and it would be fine After, I would get errors. I had to begin using
python3 script,py
I reformatted my RPi twice thinking I did something wrong only to realize I need to use python3 rather than python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants