I have a set of LoRa sensors connected to my home IoT server. They measure temperature and humidity and report the readings from time to time, depending on how much the values change between two consecutive measurements. One of the sensors is located in the garage, which is beneath my apartment and separated by a thick layer of reinforced concrete. No Wi-Fi signal can penetrate it – but LoRa works without any issues. Some of the sensors are configured to report at least once every hour, regardless of whether the values change. This helps me ensure that the sensors are “alive”: as long as a measurement comes in at least once per hour, everything is working properly. All measurements are stored in a time-series database.

This is not a polled type of communication – the sensors are not actively asked to send their data. Instead, they decide on their own when to report to the server. The problem with this communication pattern is that if a sensor stops working, it simply stops sending messages – no data is stored in the database. I needed a way to detect such events, and decided to try Node-RED for this purpose.