Git Product home page Git Product logo

awsomepy / pm-feinstaubdisplay Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 232 KB

Script and Workflow to show Particulate Matter/Air-Quality (Feinstaub) values on a Divoom Pixoo 64 display. The sensor data is pulled from your or nearby station from the awsome project from https://sensor.community/

License: GNU General Public License v3.0

Python 100.00%
air-quality divoom feinstaub particulate-matter pixoo pixoo64 python

pm-feinstaubdisplay's Introduction

PM-Feinstaub Display

Script and Workflow to show Particulate Matter/Air-Quality (Feinstaub) values on a Divoom Pixoo 64 display. https://divoom.com/products/pixoo-64. The sensor data is pulled from your or nearby station from the awesome project https://sensor.community/.

feinstaub display scale

REST API - communication with Pixoo64

setup the great project https://github.com/4ch1m/pixoo-rest to interact via REST API with Pixoo64

-modify .env setup the IP to pixoo (according the introduction) and setup port for REST

-recommended to create launcher.sh to start REST API on reboot cd /home/pi/scripts/pixoo-rest/pixoo-rest/

nano launcher.sh

#!/bin/sh
# launcher.sh
# navigate to home directory, then to this directory, then execute python scrip$

cd /
cd home/pi/scripts/pixoo-rest/pixoo-rest
/usr/local/bin/python3 app.py
cd /

CTRL + X Y

run launcher.sh to start REST API. By opening the brwoser with respective IP and Port, the swager UI should be available sh launcher.sh

Setup and configure Pull logic to send PM/Feinstaub Data to Pixoo64 display

  • copy folder pm-display-logic including python file and TTF (font for pixoo) to your linux env.
  • install all python dependencies. Tested with python 3.7, but should work also with newer versions.
  • customize the configuration directly in python file:

sensor_station = '12345' choose your sensor station ID on https://maps.sensor.community/#9/48.8676/9.4095

rest_host = 'http://192.168.2.100:5001' select the IP and PORT where your REST API runs.

path_to_font_file = '/home/pi/scripts/pm-display/PICO-8_mod.ttf' pixoo64 has limited pixel density, therefore a special font is used. make sure you insert absolut path to the *.ttf file

run the pyton script to test and verify if everthing is setup properly

cd /home/pi/scripts/pm-display/ (location of python file)

python main.py or python3 main.py

Run Python file periodically

trigger the main.py periodically. Default is 1 minute, setup via crontab.

crontab -e

optional: if REST API runs on same machine, with a restart the REST starts:

@reboot sh /home/pi/scripts/pixoo-rest/pixoo-rest/launcher.sh >/home/pi/scripts/pixoo-rest/pixoo-rest/logslauncher/cronlog 2>&1

add this to the end of crontab file:

* * * * * sleep 0; /usr/local/bin/python3 /home/pi/scripts/pm-display/main.py >> /home/pi/scripts/pm-display/logmain.log 2>&1

CTRL + X Y

pm-feinstaubdisplay's People

Contributors

awsomepy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.