control ws2812 over matrix
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ryan Rix 453198c40f Update README 7 years ago
lightrix Fix brightness 7 years ago
remote Add remote 7 years ago
roles Make the new lightrix work with ansible 7 years ago
.gitignore Don't commit the thing with an access token 7 years ago
.gitmodules Create lightrix ansible role 8 years ago Update README 7 years ago I have a 150 count strip fuck it 7 years ago
lightrix.service Make the new lightrix work with ansible 7 years ago
mcatrc Create lightrix ansible role 8 years ago
playbook.yaml Create lightrix ansible role 8 years ago
requirements.txt Make the new lightrix work with ansible 7 years ago Shrug 7 years ago

Lightrix: Drive Adafruit Neopixels over Matrix


You will need a Raspberry Pi that is attached to your network. I am using a Raspberry Pi Model A+ due to its really adorable formfactor and the fact that I have some WiFi dongles laying about.

This is based on the rpi_ws281x library, and I ship an ansible playbook to provision it.

Remove the rrix.setup-home role from playbook.yaml and run:

ansible-playbook -i ../devops/hosts playbook.yaml --become

Yes, I install everything in to the main Python library path, because I'm an infoterrorist. It's an embedded Raspberry Pi, deal with it.


As root: (due to the DMA requirements)

  • Create a ~/.mcatrc
  • Run python ./ -r "<YOUR ROOM ID>" -c ~/.mcatrc and it'll fire up
  • Go in to the room in Vector or so and type "rainbow"

The playbook will install a systemd unit file lightrix.service which you can start and enable to your heart's content


There is also now a remote control included which you can run to allow you to control the lights from a web-page.

  • Create a secrets.js which defines the following variables, and put it in remote/

    • accessToken: A valid access token which the webpage will use to make requests to the HS as
    • hs: A fully-qualified homeserver URL
    • uid: the UID that the accessToken represents.
    • rooms: an array of Room IDs which you can use to toggle to mutliple lightrix installations (assuming each one runs in its own room)
  • run python -m SimpleHTTPServer in the remote/ directory
  • browse to http://DOMAIN:8000 to view the remote