How to monitor the CPU temp of another Pi on the network

Hello,

I’m running HA on a Pi4, which is great btw. I’ve another Pi Zero W which is running MotioneyeOS and a camera. Is there a way to monitor the CPU temp? I found the ‘command line’ but I can’t figure out how to define the other Pi, rather than just pulling the temp from the Pi running HA.

I said Pi an awful lot there, I hope that makes sense haha

Thanks

This is a stretch as a solution, but here goes :slight_smile:
Did you use ssh to get the ‘command line’? If so, you can read the CPU temperature like this:
cat /sys/class/thermal/thermal_zone0/temp
That is the temperature in C multiple by 1000.
To get fancy you can use ssh to log in and run this:
ssh pi@your_pi cat /sys/class/thermal/thermal_zone0/temp | awk '{ print ($1 / 1000.0) }'
Put the public ssh key of the Pi you’re calling from in the destination Pi’s ~/.ssh/authorized_keys.

1 Like

Thank you for post! I did see something similar but I couldn’t figure the format out for the yaml config.

I can connect via ssh on my laptop but unsure how to do that via HA. I appreciate you mag have given me the answer there but it’s over my head.

Perhaps this is what you’re looking for? As an alternate method anyway

2 Likes