skyYaga / netatmo-epaper

Display Netatmo and Openweathermap data on e-Paper display
MIT License
2 stars 0 forks source link

Netatmo ePaper

General information

This is a python application that displays data on a Waveshare 7.5" ePaper display. The following data will be displayed:

Example screenshot:

Display Screenshot

Real life example:

Display Screenshot

Prerequisites

  1. Create a netatmo developer account (https://dev.netatmo.com)
  2. Create an app in the portal (-> client ID, client secret)
  3. Create a token with read_station scope (-> refresh token)

How to install

For local development

  1. Checkout this repo
  2. Create Virtual env (see https://docs.python.org/3/library/venv.html)
  3. Install dependencies:
    $ pip install -r requirements-base.txt
  4. Create ~/.netatmo.credentials with the following content (filling in your netatmo API credentials):
    {
     "CLIENT_ID": "xxx",
     "CLIENT_SECRET": "xxx",
     "REFRESH_TOKEN" : "xxx"
    }
  5. Copy example.yaml to config.yaml and update the file accordingly.
  6. Run the application:
    $ python netatmo-epaper/netatmo-epaper.py

On Raspberry Pi

  1. Checkout this repo
  2. Create and activate Virtual env (see https://docs.python.org/3/library/venv.html)
    $ cd netatmo-epaper
    $ python3 -m venv .venv
    $ source .venv/bin/activate
  3. Install dependencies:
    $ pip3 install -r requirements-base.txt -r requirements-pi.txt
  4. Create ~/.netatmo.credentials with the following content:
    {
     "CLIENT_ID": "xxx",
     "CLIENT_SECRET": "xxx",
     "REFRESH_TOKEN" : "xxx"
    }
  5. Copy example.yaml to config.yaml and update the file accordingly.
  6. Run the application:
    $ python3 netatmo-epaper/netatmo-epaper.py
  7. Optional: (re)start automatically, e.g. using pm2:
    $ pm2 start /home/pi/netatmo-epaper/netatmo-epaper/netatmo-epaper.py --name "netatmo-epaper.py" --interpreter "/home/pi/netatmo-epaper/.venv/bin/python"
    $ pm2 save

Libraries used

The following libraries made this project much easier: