Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 24f1458

Browse files
authored
Merge pull request #62 from codeoverflow-org/sample/nanoleaf
Add sample doc entry for nanoleaf service
2 parents 928002a + 8b8bf97 commit 24f1458

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

docs/samples/nanoleaf.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Using the Nanoleaf sample bundle
2+
3+
The Nanoleaf example bundle in `samples/nanoleaf` demonstrates the ability to control your nanoleaf lights. This example code sets all panels to an orange color. Here is a guide to how to get it working.
4+
5+
### Prerequisites
6+
7+
- Working NodeCG & nodecg-io installation
8+
- IP address of your nanoleaf controller
9+
10+
### Configure the nanoleaf sample bundle
11+
12+
1. Start nodecg with nodecg-io installed. The nanoleaf sample bundle is currently part of it so it should also be loaded.
13+
14+
2. Go to the `nodecg-io` tab in the nodecg dashboard.
15+
16+
3. Login using your password. If this is your first run, then enter the password with which you want to encrypt your configurations and credentials.
17+
18+
4. Create a new nanoleaf service instance using the left upper menu.
19+
20+
5. Enter configuration.
21+
22+
The created instance should be automatically selected, if not select it in the upper left menu. Enter your nanoleaf controller IP address in this format (change the IP accordingly):
23+
24+
```json
25+
{
26+
"ipAddress": "xxx.xxx.xxx.xxx"
27+
}
28+
```
29+
30+
Before clicking save put your nanoleaf controller into pairing mode by holding the on-off button for 5-7 seconds till the LED starts flashing.
31+
32+
After entering your config and entering pairing mode, click save.
33+
34+
_Note:_ If you don't see monaco on the right, try reloading the page.
35+
36+
6. Set the created nanoleaf service instance to the service dependency of the nanoleaf sample bundle.
37+
38+
Select the nanoleaf sample bundle and the nanoleaf service in the left bottom menu and then select the service instance that should be used by the nanoleaf sample bundle (in this case the name of the previously created nanoleaf instance).
39+
40+
7. If everything worked your nanoleafs should now shine orange.
41+
42+
If not you should check the nodecg logs for any errors.

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ nav:
6060
- Midi-Input sample: samples/midi-input.md
6161
- Midi-Output sample: samples/midi-output.md
6262
- Midi-IO sample: samples/midi-io.md
63+
- Nanoleaf: samples/nanoleaf.md
6364
- OBS: samples/obs.md
6465
- Philips Hue sample: samples/philipshue.md
6566
- Rcon sample: samples/rcon.md

0 commit comments

Comments
 (0)