This project was created to obtain temperature from a sensor and send it to your own influxDB.
- As a core (CPU/network/power) I'm using an Onion Omega 2+
- The sensor chosen is BME280
- Scripting languages: sh and Python
- Python script: BME280.py (also included in this repo)
- Python2
- curl
- bzip2
- sh
- awk
- Out of this scope: Your own and reachable Influxdb server.
opkg update
opkg install python-light
opkg install pyOnionI2C
opkg install curl
- Configure Onion Omega to connect to your network/Internet.
- Install required software if missing.
- Place this code on your Onion Omega disk.
- Place your configuration to the files.
- Configure
crontab
to executesave_data.sh
. - Configure
crontab
to executesend_data.sh
. You can set this script every hour for few battery usage.
You can edit the crontab with crontab -e
command.
*/1 * * * * /path/to/script/save_data.sh
*/15 * * * * /path/to/script/send_data.sh
- Have my own sensors and my own data server to protect my privacy and the rights over my data.
- A way to filter this sensor from other sensors.
- Battery usage is not solved, it is planned to use all time AC power.
Enjoy the project :)
The results are great if you render the data in Grafana.