Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-Stripes

MagicMirror module to control a led strip attached to a Raspberry Pi.

Requirements

Currently this module is only able to control 'ws281x' stripes. Neopixels or any other WS2812 stripe should work fine. I will try to add support for other chips as soon as the basic functions are ready.

Module installation

Cloning the module and installing the dependencies

cd ~/MagicMirror/modules
git clone https://github.com/paviro/MMM-Stripes.git
sudo apt-get install scons
cd MMM-Stripes
npm install

Add the module to MM

Open the file ~/MagicMirror/config/config.js and add the following to your modules section:

modules: [
    {
        module: 'MMM-Stripes',
        config: {
            ledCount: 60,
            type: 'ws281x',
            gpio: 18
        }
    }
]

Module Configuration Options

Option Type Default Description
ledCount Integer 60 Number of LEDs on your strip.
gpio String 18 The GPIO-Pin your strip is connected to. Must support PMW!
animationSpeed Integer 20 Animation speed.
animationCycles Integer 2 Animation duration.
flashOnAlert boolean true Trigger a pulse animation when a notification is shown.
flashColor text red Color of the flash (blue, rgb(25,200,200), #F04B23).
flashCycles Integer 2 Animation duration.

Trigger from another module

Currently supports messages send for MMM-PiLights and notifications shown in the default alert module. More will be added.

API Endpoint

http://yourmagicmirror/Stripes/animation?name=rainbow&cycles=100000
http://yourmagicmirror/Stripes/animation?name=fill&color=blue
http://yourmagicmirror/Stripes/animation?name=pulse&color=red&cycles=4
http://yourmagicmirror/Stripes/animation/cancel
http://yourmagicmirror/Stripes/set?color=blue
http://yourmagicmirror/Stripes/set?color=rgb(25,200,200)
http://yourmagicmirror/Stripes/set?r=25&g=200&b=200
http://yourmagicmirror/Stripes/set?wheel=20

CURL Example

curl -X GET "http://yourmagicmirror/Stripes/animation?name=rainbow"

About

MagicMirror module for controlling RGB stripes.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages