InfluxDB and Grafana for sensor time series

I’ve started using InfluxDB for storing my sensor data as time series. The main reason for this is that it allows me to use Grafana for analyzing the data. This blog post is an introduction to my setup with these tools on a Raspberry Pi.

Continue reading →


Home Assistant – integrating RESTful switches

I have started integrating my IoT-devices and services with the Home Assistant platform. See my previous post for details on getting started with Home Assistant and subscribing to MQTT messages:

Home Assistant – getting started and using MQTT sensors

My next attempt is to configure RESTful switches in HA for interacting with an existing web service that I use for controlling 433 MHz outlets. I will also add automation rules for the switches and test the voice command in Home Assistant.

Continue reading →

Home Assistant – getting started and using MQTT sensors

I’ve been searching for an easy-to-get-started home automation platform that can be extended and customized as my needs grow. After struggling with OpenHAB, Domoticz and Freedomotic, I’ve found Home Assistant to be a much better fit for me. My main requirements are that the system should be open-source, have good tutorials & documentation, work well on a Raspberry Pi and be extensible for my likely future needs. I will spend this and a few upcoming posts with my Home Assistant experiments.

Continue reading →

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 →

Radio chirp data incorporated in an MQTT environment

Internet-of-things does not require that every device has to be directly connected to the Internet. The complexity and possible security issues with every sensor having its own IP address would in fact be overwhelming. A better approach would be to use more light-weight protocols for the sensor and actuator data and locally aggregate and filter these data at common points before making them available on the Internet. In this post I will describe a theory and implementation of transmitting small radio chirp messages from an Arduino Pro mini and then receive these data on a Raspberry Pi for transformation to MQTT messages for the Internet.

Continue reading →

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 →

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

In the second post in this series, I will setup two ESP8266 microcontrollers with MQTT publishing through a Raspberry Pi-hosted Mosquitto broker. The idea is that the microcontrollers will send sensor data (like temperatures or other events) that one or several MQTT subscribers can act on.

Continue reading →