Measure environmental values and record them on the monitoring server
- Python 3
- Raspberry Pi 3
- Sensors
- BME280 (humidity, pressure, temperature)
- MH-Z19 (co2)
- TSL2561 (light)
- Run from cron
// run every second $ * * * * * for i in `seq 0 1 59`;do (sleep ${i}; python3 monitor_room/main.py) & done;
-
Make mackerel account
-
Git clone
$ git clone xxx
-
Set environment variable
$ export MONITOR_ROOM_MACKEREL_X_API_KEY="YOUR_MACKEREL_X_API_KEY" $ export MONITOR_ROOM_MACKEREL_HOST_ID="YOUR_MACKEREL_HOST_ID"
- Exec lint
$ flake8 main.py ./maintenance/ ./sensor/ ./util/ $ pylint main.py ./maintenance/ ./sensor/ ./util/