Aim to monitor and analyse the temperature, humidity and pressure measurements in the appartment and outside. Provide visualization of the data directly from the cloud based DB.
RaspberryPi used as main station to collect information from various sources. For indoors measurements it reads signal directly from the connected sensor. For outdoor data API of openweathermap.org is used.
Dashboar is hosted at InfluxData Cloud. It provides change of measurements in last 24 hours, for indoor temperature it shows minimal/maximal temperature over period and gauge with current value. For outdoor measurements temperature, humidity and pressure are presented:
It's convenient to have online dashboard for monitoring and service for alerting, but it is essential to keep data. Storage realised using reliable and fast relational database management system PostgreSQL.
Different notification levels from Ok to Critical are set with corresponding measurement thresholds. Notifiactions are transmitted to slack, using webhooks:
Make a local backup to the PostrgeSQL database (fill_sql.py
).
Setup includes RaspberryPi running with Raspbian 10 (buster), reading temerature measurement sensor DS18B20.
Uses libraries w1thermsensor
and writhe data to InfluxDBCloud
.
Run the code as daemon:
- copy
logger.service
fromhelpers
to the/etc/systemd/system/
- update the
systemd
units withsudo systemctl daemon-reload
and reloadsystemctl enable logger.service
- start the deamon:
sudo systemctl start logger.service
- check the status:
sudo systemctl status logger.service
Code to read sensor data with Arduino and transmit it to BT can be found at:
helpers/arduino_data/arduino_data.ino
Complete info at:
https://github.com/grevtsovkirill/dht_logger/wiki
Description of setting up BT on RPi can be found in twiki:
https://github.com/grevtsovkirill/dht_logger/wiki/Connect-arduino-via-BT