Coder Social home page Coder Social logo

yottabits / 102shows Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 4.0 356 KB

Raspberry Pi + APA102 + MQTT + 102shows = LED awesomeness!

License: GNU General Public License v2.0

Python 94.85% Shell 5.15%
raspberry pi mqtt led-strips apa102 dotstar node-red

102shows's Issues

organize helper functions and utilities

under server/ introduce a common lib/ or helpers/ folder that contains the following files:

  • mqtt/helpers
  • lightshows/utilities/general.py
  • lightshows/utilities/verifyparameters.py

Add support for parsing png files as animation

Pattern Paint approach

  • single column: led strip state during a particular frame
  • row: time coordinate
  • easy to edit with any pixel graphics program

variants

  • flip rows and columns (better for widescreens)
  • alpha channel is brightness

APNG

  • no good editors for that
  • easy to preview

Incompatible with YAML6.+

The open() method needs a Loader argument.
In configparser.py, get_configuration() has 2 open() calls that should be:
...
defaults = yaml.load(file, Loader=yaml.FullLoader)
...
user_config = yaml.load(file, Loader=yaml.FullLoader)

install in pyenv

Benefits:

  • make dependency management easier
  • eliminate the need for sudo on raspi

create setup bash script

it does the following:

  • get the latest version from the stable/ branch
  • (remove .git)
  • install 102shows-server executable in /usr/bin
  • provide further instructions

Doesn't work

Not sure if this is maintained anymore or not, but I could not get this to work on Raspbian Buster.

Got Node Red working.
Installed Mosquitto.
102shows/server/run.sh (per install doc) does not exist, tried server.py instead, looks like that works. Output:

2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO Starting MyLED
2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO Initializing LED strip...
2020-01-31 15:27:08 raspberrypi 102shows.drivers[10286] INFO sync-up
2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO Connecting to the MQTT Broker
2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO MyLED is ready
2020-01-31 15:27:08 raspberrypi 102shows.server.helpers.configparser[10286] INFO Successfully parsed defaults.yml as default configuration
2020-01-31 15:27:08 raspberrypi 102shows.server.helpers.configparser[10286] INFO Successfully parsed config.yml as user configuration
2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO Starting the show clear
2020-01-31 15:27:08 raspberrypi 102shows.server.mqttcontrol[10286] INFO subscription on Broker localhost for led/MyLED/show/+/start and led/MyLED/show/+/stop
2020-01-31 15:27:08 raspberrypi 102shows.drivers[10289] INFO sync-down

Went to myserverip:1880/ui and all I get is a blank screen.

extract configparser.py as own module

  • refactor with cascading update trees of variable depth
  • use attrdict instead of orderedattrdict
  • offer logging facility, without logging in every case
  • write tests

fix exception classes

Exception classes are called with a debug string parameter, but init does not accept any parameters.

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.