Code for a weather station running on Raspberry Pi.
It uses a Bosch BME680 sensor from pimoroni and a waveshare 6" e-paper.
Make a virtual env: python -m venv myenv and then source myenv/bin/activate.
You need to have the IT8951 library locally on the pi, since its not on pypi.org. To install run pip install -e "git+https://github.com/GregDMeyer/IT8951#egg=IT8951"
Install dependencies pip install -r requirements.txt
Run python main.py.
On the first startup check the console to set up access to your TADO API. ß
You can set it to auto-run on startup e.g. cron:
- Log in as the user you want to run it.
- run
crontab -eand enter here:@reboot cd /home/[PATH_TO_REPO]/weather-station/ && ./start_app.sh(set it to executable withchmod +x, debug withjournalctl -u cron.service)
You can test it locally on a Unix machine (maybe on OSX too) by following the instructions in the IT8951 repo
-
If you get an error when installing
RPi.GPIO:fatal error: Python.h: No such file or directorythen you will need to runsudo apt install python3-dev -
No such file or directory:
/dev/i2c-1: Runsudo raspi-configand go toInterfacing Options → I2C → Enable -
No such file or directory:
/dev/spidev0.0: Runsudo raspi-configand go toInterfacing Options → SPI → Enable
Weather forecast provided by Climacell and yr.no, icons from yr.no
yr.no stuff is under CC 4.0 BY and MIT license