Skip to content

Commit 57dcde4

Browse files
committed
WIP: support for nanoleaf.
1 parent 8e8b485 commit 57dcde4

File tree

27 files changed

+3455
-22
lines changed

27 files changed

+3455
-22
lines changed

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ kotlin {
123123
// To support animated GIFs:
124124
implementation("com.madgag:animated-gif-lib:1.4")
125125

126+
// Nanoleaf support:
127+
implementation("io.github.rowak:nanoleaf-api:0.1.2")
128+
126129
// VideoInPlugin:
127130
implementation("com.github.sarxos:webcam-capture:0.3.12")
128131
implementation("io.github.eduramiba:webcam-capture-driver-native:1.0.0")

data/BAAAHS.scene

Lines changed: 247 additions & 1 deletion
Large diffs are not rendered by default.

data/Living Room.scene

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"model": {
3+
"title": "Living Room",
4+
"entities": [
5+
{
6+
"type": "Grid",
7+
"title": "New Grid",
8+
"rows": 10,
9+
"columns": 10,
10+
"rowGap": 0.1,
11+
"columnGap": 0.1,
12+
"zigZag": true
13+
}
14+
]
15+
},
16+
"controllers": {
17+
"Nanoleaf:192.168.1.9": {
18+
"type": "Nanoleaf",
19+
"hostName": "192.168.1.9",
20+
"port": 16021,
21+
"deviceId": "192.168.1.9",
22+
"deviceName": "Light Panels 50:72:54",
23+
"accessToken": "xI2UVHZzcbuWWMIbig1Zv9NhajekW0oC",
24+
"defaultFixtureConfig": {
25+
"type": "PixelArray",
26+
"pixelFormat": "RGB8"
27+
}
28+
},
29+
"SACN:wled-b187d1": {
30+
"type": "SACN",
31+
"title": "SACN:wled-b187d1",
32+
"address": "192.168.1.15",
33+
"universes": 1,
34+
"fixtures": [
35+
{
36+
"fixtureConfig": {
37+
"type": "PixelArray",
38+
"pixelCount": 42,
39+
"pixelFormat": "RGB8",
40+
"gammaCorrection": 1.2
41+
}
42+
}
43+
]
44+
}
45+
}
46+
}

data/Playa 2022.sparkle

Lines changed: 2460 additions & 0 deletions
Large diffs are not rendered by default.

data/config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
{"runningShowPath":"PastureBedtime.sparkle","runningScenePath":"BAAAHS.scene"}
1+
{
2+
"runningShowPath": "Playa 2022.sparkle",
3+
"runningScenePath": "Living Room.scene"
4+
}

src/commonMain/kotlin/baaahs/controller/ControllersPublisher.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ControllersPublisher(
1515
private val controllerStates = mutableMapOf<ControllerId, ControllerState>()
1616

1717
override fun onAdd(controller: Controller) {
18+
println("ControllersPublisher: onAdd($controller)")
1819
controllerStates[controller.controllerId] = controller.state
1920
controllerStatesChannel.onChange(controllerStates)
2021
}

0 commit comments

Comments
 (0)