Skip to content
Measure environmental values and record them on the monitoring server
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
maintenance
sensor
util
.gitignore
.pylintrc
LICENSE
README.md
demo.jpg
main.py

README.md

MONITOR_ROOM

Measure environmental values and record them on the monitoring server

DEMO

demo

Requirement

  • Python 3
  • Raspberry Pi 3
  • Sensors
    • BME280 (humidity, pressure, temperature)
    • MH-Z19 (co2)
    • TSL2561 (light)

Usage

  • Run from cron
    // run every second
    $ * * * * * for i in `seq 0 1 59`;do (sleep ${i}; python3 monitor_room/main.py) & done;
    

Install

  1. Make mackerel account

  2. Git clone

    $ git clone xxx
    
  3. 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"
    

Before commit

  1. Exec lint
    $ flake8 main.py ./maintenance/ ./sensor/ ./util/
    $ pylint main.py ./maintenance/ ./sensor/ ./util/
    

Author

kazumatsudo

License

MIT

You can’t perform that action at this time.