Monitoring CPU temperatures on a Raspberry Pi with MQTT

Recently I’ve had problems with my Raspberry Pi 3 overheating though I use a heat sink for the processor and have a very modest load on the machine. When the RPi is in this state, it shows a thermometer warning icon and it is not possible to login. As I can not access the machine, it is hard to investigate the cause of the heat problem (if a process has gone totally wild e.g.). The only way to resolve this is to do a hard reboot (then the temperature goes down again).

To investigate this further, I want to monitor the CPU temperature without accessing the RPi via ssh or a direct login. My idea is to let the RPi gather board temperature values regularly and then publish these via MQTT. An MQTT subscriber will see to that the measurements are propagated to a cloud service so that I can monitor the values in an external application. With IFTTT I can add alerts on the measurements (e.g. when the CPU temperature goes over 60 C, an e-mail should be sent to me). This way I will be notified before the temperature/load gets too high and I will hopefully be able to intercept the problem by logging in to the machine before it locks up.

Continue reading →

Advertisements

A self-hosted MQTT environment for Internet of Things – Part 3

In the last post in this series, I will add persisting of sensor data to a database. I will also use an additional subscriber as a proxy for sending the data to Adafruit IO. I will then have all data available locally, but when the Adafruit IO proxy is running, I will also have the data available in the cloud.

Continue reading →

Exploring Adafruit IO

Adafruit hosts a cloud service, io.adafruit.com, where you can upload data from your devices and also subscribe to data from other devices. The service is currently in beta, but you can sign up for a free account to test it. The data is stored in “feeds” and you can configure your own dashboards for viewing the data. There are two API:s available. One is REST-based and the other follows the publish/subscribe pattern of MQTT. In this post I will try both alternatives.

Continue reading →