Monitor Temperature

Hi all
I put the RAK2245 Pi hat gatway inside a waterproof box.
Is there any way to monitor temp ( raspberry temp, i.e). inside the box? I don´t know if OS Image has a daemon or process to monitor.

Thanks

Hi @alnaumiwebs
The easiest way is to run “vcgencmd measure_temp” in Pi console.

Here is a good tutorial to make it as sh script and as service:
https://linuxhint.com/raspberry_pi_temperature_monitor/

Regards
Todor Velev

I created a RPi temperature logging system a few years ago and run it on most of my systems, including my RAK2245 Pi-3B+ ttn-gateway. The link to my github repository is here: RPiTempLogger

The package includes an “index.php” file you can use to display a graph of temperatures over time if you’re running apache, but I now just do daily checks with a .sqlite3 script. Currrent reading on my gateway are:

sqlite3 /var/databases/MyPiTemps.db < bin/CheckTemp.sqlite3
count(cputemp) = 241
avg(cputemp) = 56.1192116182573
max(cputemp) = 60.15
min(cputemp) = 52.08

David

If you can, migrate the solution to Nginx as it’s far less resource intensive than Apache and you’ll want your gateway to be the first priority. Plenty of Google entries for Nginx, PHP-FPM and SQLite.

Thanks for the suggestion, Nick, but I don’t run Apache on that system anyway … that’s why I wrote the sqlite3 script to report the avg for the prior 24 hours. Works well enough to let me spot check the internal temps. Haven’t explored Nginx, but will do so when I get to that stage in my next project.

David

Huh? So you have a php file but don’t run it as a web page?

I wrote the code 4 years ago or so and stopped running Apache on the system probably 3 years ago. Too much overhead, as you suggested, for me to just be able to check temp occasionally, so my sqlite3 script works just fine for occasional checks. But I left the php code in the distribution in case others prefer that approach. And seeing the graph is cute, if not all that informative.

Hi… all GeForce 6600 cards have temperature sensors integrated into the core. Some card manufacturers choose not to enable them, supposedly to discourage overclocking. But with a simple BIOS mod you can enable the sensor.

How do you connect yours to a Raspberry Pi?