Giter Site home page Giter Site logo

healeycodes / pi Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 2.0 10.58 MB

:pie: Monorepo for my Raspberry Pi dashboard and GPS satellite listener.

Home Page: https://healeycodes.com/listening-to-satellites-with-my-raspberry-pi/

License: MIT License

Python 76.34% JavaScript 7.67% HTML 15.99%
raspberry-pi pos58 heroku receipt-printer gps-device dht22 dashboard gps

pi's Introduction

Flask tests

๐Ÿฅง pi dashboard

My blog post: Listening to Satellites with my Raspberry Pi


This is the monorepo for my Raspberry Pi dashboard!

It includes: a module system allows different features to be toggled on and off so you don't need my exact hardware setup. It also allows multiple Pis to use the same server.

  • ๐Ÿ  a Windows 98 themed dashboard.
  • ๐Ÿ“ก view the list of visible GPS satellites from a GPS hardware device.
  • ๐Ÿ–จ๏ธ receive printer messages to a POS58 compatible printer.
  • ๐ŸŒก๏ธ live temperature/humidity collected from an AMxx compatible sensor.

The dashboard home page with weather, printer, and sky modules enabled.


Run

Server

Toggle server modules in server/config.py.

  1. Create a Heroku project.

  2. Add a PostgreSQL database via the GUI.

  3. Add a config var of PW via GUI.

  4. Deploy from this GitHub repository.

That's it. No migrations or other setup required.


For local development:

pip install -r requirements.txt
export FLASK_APP=wsgi:app ;python3.9 -m flask run

A SQLite database is automatically created and used instead of PostgreSQL. If no PW environment variable is provided, no password is required for client requests.

Client

The client is written with a Raspberry Pi in mind and has been tested with the latest Raspbian (v10) and the bundled Python 3 that comes with it.

Depending on what modules you've enabled in client/clientconfig.py you may need hardware connected and setup e.g. to use the sky module, your GPS device must be communicating with gpsd.

cd client/
pip install -r requirements.txt
sudo python3 poller.py https://your-url.herokuapp.com password_here 

I run that last command on boot via /etc/rc.local.

Note: in the client config, I use sleep_at_night to put my Pi to sleep so it can sit on the Heroku free tier without using up all the monthly hours.

Tests

End to end tests that make sure the server + all mods are working correctly.

pip install -r requirements.txt

python -m pytest


License

Licensed MIT

pi's People

Contributors

healeycodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.