A Raspberry Pi and Arduino monitor that emails you when the room gets dangerously hot
During the summer heat, more and more elderly people living alone are being taken to hospital with heatstroke because they didn't notice the room getting hot. «THSense», a personal project published on Zenn, is aimed at people caring for family members who live far away. It keeps an eye on the room's temperature and humidity and sends an email when the temperature reaches a dangerous level.
The features are simple. It measures the room's temperature and humidity every minute, sends an email when it goes above 35 °C, and lets you see the current values and the history as a graph in the browser. According to the author, the graph is there so you can spot early signs, such as a temperature that keeps climbing.
The architecture is interesting. Reading the sensor (DHT20) is left to an Arduino on the Grove Beginner Kit rather than the Raspberry Pi, because it's better for real-time response and makes accurate readings easier. Every 60 seconds the Arduino sends a string over USB serial to the Raspberry Pi, where Python receives it with pyserial, turns it back into numbers, and handles the temperature check, sending the email, and saving to the database. The database is MariaDB on a virtual machine in Azure, and the screen is built with Flask and Chart.js. Emails go out through Gmail's SMTP server using smtplib, and the account details are read from a .env file instead of being written in the code.
The division of roles is clear, which makes it a useful reference for small IoT design. Sensing on the Arduino and judgment and notification on the Raspberry Pi is a split I could also use when thinking about similar builds. The author says the source code is published on GitHub.
Source: Zenn
The features are simple. It measures the room's temperature and humidity every minute, sends an email when it goes above 35 °C, and lets you see the current values and the history as a graph in the browser. According to the author, the graph is there so you can spot early signs, such as a temperature that keeps climbing.
The architecture is interesting. Reading the sensor (DHT20) is left to an Arduino on the Grove Beginner Kit rather than the Raspberry Pi, because it's better for real-time response and makes accurate readings easier. Every 60 seconds the Arduino sends a string over USB serial to the Raspberry Pi, where Python receives it with pyserial, turns it back into numbers, and handles the temperature check, sending the email, and saving to the database. The database is MariaDB on a virtual machine in Azure, and the screen is built with Flask and Chart.js. Emails go out through Gmail's SMTP server using smtplib, and the account details are read from a .env file instead of being written in the code.
The division of roles is clear, which makes it a useful reference for small IoT design. Sensing on the Arduino and judgment and notification on the Raspberry Pi is a split I could also use when thinking about similar builds. The author says the source code is published on GitHub.
Source: Zenn
Comments 0
Leave the first comment, in any language.
Log in to comment