Customize interactions. Make cool effects and visualizations for your Nanoleaf Aurora.
This is a fork of https://github.com/bharat/haller, which is a wrapper around https://github.com/bharat/nanoleaf that provides some additional, higher level functionality to control your Nanoleaf Aurora.
- Automatically find and connect to your Aurora
- Turn on/off your Aurora from a script
- Handle rotation of your Aurora (so that you can script "left to right" type effects)
- Real-time display effects (including some samples)
- Audio visualization effects (including some samples)
- Python3
- This directory cloned
- The nanoleaf directory cloned into that directory
git clone [email protected]:tendermario/haller.git
cd haller
git clone [email protected]:bharat/nanoleaf.git
Option 1: venv
./install.sh
Option 2: pipenv (I can't do this anymore for some reason)
brew install pipenv
cd haller
(or whatever you name the dir)pipenv shell
pipenv run pip install pip==18.0
(maybe)pipenv install
- Hit the pairing button on your Aurora
- run
config.py
. It will discover your Aurora, pair with it and create a file calledaurora.ini
containing config data.
This will persist until you reset your Nanoleaf. You can have your phone and computer connected to the panels at the same time.
Just turn on your panels and it should be good to go.
./display.py --streaming flash --speed 0.1
./display.py --streaming flash --speed 1
./display.py --streaming flash --speed 0.3
(seizure warning): ./display.py --streaming flash --speed 0.1
(seizure warning): ./display.py --streaming flash --speed 0.01
- Hard reset: Press and hold power + arrow for 10 seconds until flashing for hard reset to factory defaults and go into pair mode.
- Pairing: Press and hold power for 5 seconds to go into pairing mode
- I think nanoleaf.nanoleaf.aurora Aurora has its API changed, so methods like panel_prepare doesn't work in display.py --streaming red_epilepsy might want to pull the latest nanoleaf repo.
- Todo: Fix streaming
- Todo: Make streaming accessible from the CLI
Run ./main.py
to open the CLI. It will have instructions.
Run ./display.py --streaming <name>
to use streaming mode, which will run against a preset algo defined as: <name>_streaming
method in the file.
NOTE: This is the original maintainer's notes, and a lot of it does not currently work.
By default your Aurora will have an arbitrary orientation. You can control that orientation by using the --rotate
argument to config.py
. Haller will save that orientation and use it in the future.
config.py --plot
will create an HTML file calledplot.html
that contains a visual representation of your panel layoutconfig.py --rotate <degrees>
will calculate a new rotation of your panel layout. Use this with--plot
to visualize to make sure that your panel rotation matches your physical layout. The results of this rotation are cached inaurora.ini
for the future.
Here's what a sample plot looks like:
effect.py --list
to list all effectseffect.py --set <name>
to choose an effecteffect.py --create
creates a hardcoded effect calledScripted
. Work in progress here.
"animType" : "plugin",
"pluginType": "rhythm",
"pluginUuid":"60333927-cc36-4a5a-a682-9bd114de8bff",
This uses the External Control
feature of Aurora to allow dynamic effects. There are a few hardcoded ones, but the code is an example for what you can do. Try display.py --streaming wipe
to see one of them.
Using the streaming interface, you can turn your Aurora into a music visualizer. Try visualizer.py --viz amplitude
for yourself. You can see what it looks like here: https://www.youtube.com/watch?v=nnojsRrwK4c