SMS alerts for temperature monitoring solution

In a previous blog post I wrote about a monitoring solution I built for the hot water heater in my house. It was needed because of the heater switching off occasionally by itself. While the monitoring solution worked fine, it was of limited use, since all you could do was just check after the fact that “Yup, that’s when the thing turned itself off again”. The usual way of noticing the issue has, of course, been trying to use hot water for something. Like a shower. And then noticing that there is no hot water.

Adding some sort of alert functionality has always been on the roadmap, but I just haven’t got around to it, until now.

I added a very basic AWS setup, consisting of an API Gateway, a Lambda function, and an SNS subscription. All the things on the AWS side were configured with Terraform. The software on the Raspberry Pi sends a request to the API whenever the temperature drops below a pre-set threshold. That triggers the Lambda function, and that publishes a message to the SNS topic, which then sends me an SMS.

There isn’t really much more than that to say about it. All the code has been added to the repository. Code was added to reader.js to call the API, terraform configuration was added to create the necessary resources, and the Lambda function’s code was added under the terraform directory.

Leave a comment

Your email address will not be published. Required fields are marked *