diff --git a/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClient.kt b/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClient.kt index aeaa320..fbd3cf6 100644 --- a/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClient.kt +++ b/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClient.kt @@ -1,19 +1,8 @@ package de.visualdigits.kotlin.klanglicht.hardware.lightmanager.client -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.json.LmAirProject -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.json.NType -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionHybrid -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionLmAir -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionLmYamahaAvantage -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionPause -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionShelly -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActionUrl -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMActor import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMMarker import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMMarkers import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMParams -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMScene -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMScenes import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMZones import de.visualdigits.kotlin.util.get import de.visualdigits.kotlin.util.post @@ -64,20 +53,6 @@ class LightmanagerClient( return zones } - fun getActorById(actorId: Int): LMActor? { - var a: LMActor? = null - val zones: LMZones = zones() - for (zone in zones.zones) { - for (actor in zone.actors) { - if (actor.id == actorId) { - a = actor - break - } - } - } - return a - } - fun knownActors(): Map { val actors: MutableMap = mutableMapOf() val zones: LMZones = zones() @@ -89,91 +64,6 @@ class LightmanagerClient( return actors } - fun scenes(lmAirProject: LmAirProject? = null): LMScenes { - val document = Jsoup.parse(html()!!) - val setupName = document.select("div[id=mytitle]").first()?.text() - val scenes = LMScenes(setupName) - document - .select("div[id=scenes]") - .first() - ?.select("div[class=sbElement]") - ?.forEach { elem -> scenes.add(LMScene(name = elem.child(0).text())) } - determineActions(lmAirProject, scenes) - return scenes - } - - private fun determineActions( - lmAirProject: LmAirProject?, - scenes: LMScenes - ) { - if (lmAirProject != null) { - scenes.scenes.values.forEach { g -> - g.scenes.forEach { scene -> - lmAirProject.scenesMap[scene.name]?.let { s -> - val actuatorProperties = s.getActuatorProperties() - scene.actions = actuatorProperties.mapNotNull { ap -> - when (ap.ntype) { - NType.irlan -> { - lmAirProject.actuatorsMap[ap.actorIndex]?.let { actuator -> - val url = if (ap.command == 1) { - actuator.properties?.url2 - } else { - actuator.properties?.url - } - if (url != null) { - val uu = if (url.startsWith("http")) url else "http://$url" - val u = URL(uu) - val params = u.query - .split("&") - .filter { p -> p.isNotEmpty() } - .map { p -> p.split("=") } - .filter { p -> p.size == 2 }.associate { p -> Pair(p[0], p[1]) } - when (u.path) { - "/v1/yamaha/avantage/json/surroundProgram" -> - LMActionLmYamahaAvantage( - command = "surroundProgram", - program = params["program"] - ) - - "/v1/shelly/power" -> - LMActionShelly( - ids = params["ids"], - turnOn = params["turnOn"]?.let { p -> p.toBoolean()}?:false - ) - - "/v1/hybrid/json/hexColor" -> - LMActionHybrid( - ids = params["ids"], - hexColors = params["hexColors"], - gains = params["gains"], - ) - else -> - LMActionUrl( - url = url.substringAfter("v1/") - ) - } - } else { - val param = if (ap.command == 1) { - 1499 - } else { - 42 - } - LMActionLmAir(sceneIndex = param) - } - } - } - - NType.pause -> LMActionPause(duration = ap.duration?.let { d -> 1000 * d } ?: 0) - else -> - null - } - } - } - } - } - } - } - fun markers(): LMMarkers { val markerState: BooleanArray = params().markerState val document = Jsoup.parse(html()!!) diff --git a/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/model/lm/LMScenes.kt b/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/model/lm/LMScenes.kt index ce6441c..eed30fb 100644 --- a/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/model/lm/LMScenes.kt +++ b/klanglicht-module-base/src/main/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/model/lm/LMScenes.kt @@ -9,10 +9,9 @@ import java.util.Locale @JsonIgnoreProperties("scenesMap") class LMScenes( - val name: String? = null -) { - + val name: String? = null, val scenes: LinkedHashMap = LinkedHashMap() +) { val scenesMap: LinkedHashMap = LinkedHashMap() @@ -32,33 +31,4 @@ class LMScenes( override fun toString(): String { return "$name\n" + scenes.toMap().map { e -> " ${e.key}\n ${e.value.scenes.joinToString("\n ")}" }.joinToString("\n") } - - fun add(scene: LMScene) { - scenesMap[scene.name!!] = scene - var group: String? = "common" - val attributes = LMNamedAttributes(scene.name, "group", "color") - if (attributes.matched()) { - val name = attributes.name - if (name?.isNotEmpty() == true) { - scene.name = name - } - val g = attributes["group"] - if (g.isNotEmpty()) { - group = g - } - scene.color = attributes["color"] - } - if ("hidden" != group) { - group - ?.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } - ?.let { name -> - var g = scenes[name] - if (g == null) { - g = LMSceneGroup(name) - scenes[name] = g - } - g.scenes.add(scene) - } - } - } } diff --git a/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClientTest.kt b/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClientTest.kt index 703ea1f..36a3093 100644 --- a/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClientTest.kt +++ b/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/client/LightmanagerClientTest.kt @@ -3,7 +3,6 @@ package de.visualdigits.kotlin.klanglicht.hardware.lightmanager.client import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.databind.SerializationFeature import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.json.LmAirProject import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMScenes import org.junit.jupiter.api.Test import java.io.File @@ -54,27 +53,9 @@ class LightmanagerClientTest { println(html) } - @Test - fun testScrapeScenes() { - val lmAirProject = LmAirProject.unmarshall(File(ClassLoader.getSystemResource("lmair/lmair-config.json").toURI())) - val scenes = client.scenes(lmAirProject) - val json = mapper.writeValueAsString(scenes) - - println(json) - } - - @Test - fun testScrapeSceneConfig() { - val lmAirProject = LmAirProject.unmarshall(File(ClassLoader.getSystemResource("lmair/lmair-config.json").toURI())) - val scenes = client.scenes(lmAirProject) - val json = mapper.writeValueAsString(scenes) - - println(json) - } - @Test fun testLoadScenes() { - val file = File(ClassLoader.getSystemResource("lmair/scenes.json").toURI()) + val file = File(ClassLoader.getSystemResource(".klanglicht/preferences/scenes.json").toURI()) val scenes = LMScenes.unmarshall(file) println(scenes) } diff --git a/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/json/LmAirProjectTest.kt b/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/json/LmAirProjectTest.kt index 4b92076..85e356d 100644 --- a/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/json/LmAirProjectTest.kt +++ b/klanglicht-module-base/src/test/kotlin/de/visualdigits/kotlin/klanglicht/hardware/lightmanager/json/LmAirProjectTest.kt @@ -1,6 +1,7 @@ package de.visualdigits.kotlin.klanglicht.hardware.lightmanager.json import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.json.LmAirProject +import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import java.io.File @@ -9,6 +10,6 @@ class LmAirProjectTest { @Test fun testLoadModel() { val config = LmAirProject.unmarshall(File(ClassLoader.getSystemResource("lmair/lmair-config.json").toURI())) - println(config) + assertNotNull(config) } } diff --git a/klanglicht-module-base/src/test/resources/lmair/scenes.json b/klanglicht-module-base/src/test/resources/lmair/scenes.json deleted file mode 100644 index 43063bb..0000000 --- a/klanglicht-module-base/src/test/resources/lmair/scenes.json +++ /dev/null @@ -1,2250 +0,0 @@ -{ - "name": "Yodas Home", - "scenes": { - "Background": { - "name": "Background", - "hasColorWheel": true, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "Licht TV", - "color": "#fffad5", - "actions": [ - { - "shelly": { - "ids": "Wohnzimmer_Deckenlampe,Flur,Kristall,Schlafzimmer", - "turnOn": false - } - }, - { - "hybrid": { - "hexColors": "000000,000000,94832d,94832d,94832d,94832d,000000" - } - }, - { - "pause": { - "duration": 5000 - } - }, - { - "lmair": { - "comment": "Idual On", - "sceneIndex": 42 - } - }, - { - "hybrid": { - "hexColors": "000000" - } - }, - { - "pause": { - "duration": 1000 - } - }, - { - "shelly": { - "ids": "Wohnzimmer_Esstisch", - "turnOn": false - } - } - ] - }, - { - "name": "TV Licht Aus", - "color": "#000000", - "actions": [ - { - "lmair": { - "comment": "Idual Off", - "sceneIndex": 1499 - } - } - ] - }, - { - "name": "Licht Kino", - "color": "#000088,#000088,#880000,#880000", - "actions": [ - { - "hybrid": { - "hexColors": "000000,000000,94832d,94832d,94832d,94832d,000000", - "gains": "1.0" - } - }, - { - "pause": { - "duration": 2000 - } - }, - { - "lmair": { - "comment": "Idual Off", - "sceneIndex": 1499 - } - }, - { - "pause": { - "duration": 1000 - } - }, - { - "hybrid": { - "hexColors": "7777ff,aaaaff,7777ff,aaaaff,7777ff,aaaaff,7777ff" - } - }, - { - "pause": { - "duration": 5000 - } - }, - { - "hybrid": { - "hexColors": "000088,000088,ffffcc,000088,000088,000088,000088" - } - }, - { - "pause": { - "duration": 5000 - } - }, - { - "hybrid": { - "hexColors": "880000,880000,000088,000088,000088,000088,880000" - } - } - ] - }, - { - "name": "Background Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "Background Dark Red", - "color": "#880000", - "actions": [ - { - "hybrid": { - "hexColors": "880000" - } - } - ] - }, - { - "name": "Background Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "Background Dark Green", - "color": "#008800", - "actions": [ - { - "hybrid": { - "hexColors": "008800" - } - } - ] - }, - { - "name": "Background Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "Background Dark Blue", - "color": "#000088", - "actions": [ - { - "hybrid": { - "hexColors": "000088" - } - } - ] - }, - { - "name": "Background Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "Background Dark Cyan", - "color": "#008888", - "actions": [ - { - "hybrid": { - "hexColors": "008888" - } - } - ] - }, - { - "name": "Background Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "Background Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "Background Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "Background Purple", - "color": "#2d0080", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "Background Red / Blue", - "color": "#0000ff,#ff0000,#ff0000,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,0000ff,ff0000,ff0000,ff0000,ff0000,0000ff" - } - } - ] - }, - { - "name": "Background Dark Red / Blue", - "color": "#000088,#880000,#880000,#000088", - "actions": [ - { - "hybrid": { - "hexColors": "000088,000088,880000,880000,880000,880000,000088" - } - } - ] - }, - { - "name": "Background Blue / Red", - "color": "#ff0000,#0000ff,#0000ff,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,ff0000,0000ff,0000ff,0000ff,0000ff,ff0000" - } - } - ] - }, - { - "name": "Background Dark Blue / Red", - "color": "#880000,#000088,#000088,#880000", - "actions": [ - { - "hybrid": { - "hexColors": "880000,880000,000088,000088,000088,000088,880000" - } - } - ] - }, - { - "name": "Background Green / Red", - "color": "#ff0000,#00ff00,#00ff00,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,ff0000,00ff00,00ff00,00ff00,00ff00,ff0000" - } - } - ] - }, - { - "name": "Background Dark Green / Red", - "color": "#880000,#008800,#008800,#880000", - "actions": [ - { - "hybrid": { - "hexColors": "880000,880000,008800,008800,008800,008800,880000" - } - } - ] - }, - { - "name": "Background Red / Green", - "color": "#00ff00,#ff0000,#ff0000,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,00ff00,ff0000,ff0000,ff0000,ff0000,00ff00" - } - } - ] - }, - { - "name": "Background Dark Red / Green", - "color": "#008800,#880000,#880000,#008800", - "actions": [ - { - "hybrid": { - "hexColors": "008800,008800,880000,880000,880000,880000,008800" - } - } - ] - }, - { - "name": "Background Green / Blue", - "color": "#0000ff,#00ff00,#00ff00,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,0000ff,00ff00,00ff00,00ff00,00ff00,0000ff" - } - } - ] - }, - { - "name": "Background Dark Green / Blue", - "color": "#000088,#008800,#008800,#000088", - "actions": [ - { - "hybrid": { - "hexColors": "000088,000088,008800,008800,008800,008800,000088" - } - } - ] - }, - { - "name": "Background Blue / Green", - "color": "#00ff00,#0000ff,#0000ff,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,00ff00,0000ff,0000ff,0000ff,0000ff,00ff00" - } - } - ] - }, - { - "name": "Background Dark Blue / Green", - "color": "#008800,#000088,#000088,#008800", - "actions": [ - { - "hybrid": { - "hexColors": "008800,008800,000088,000088,000088,000088,008800" - } - } - ] - }, - { - "name": "Background Blue / Cyan", - "color": "#00ffff,#0000ff,#0000ff,#00ffff", - "actions": [ - { - "hybrid": { - "hexColors": "00ffff,00ffff,0000ff,0000ff,0000ff,0000ff,00ffff" - } - } - ] - }, - { - "name": "Background Dark Blue / Cyan", - "color": "#008888,#000088,#000088,#008888", - "actions": [ - { - "hybrid": { - "hexColors": "008888,008888,000088,000088,000088,000088,008888" - } - } - ] - }, - { - "name": "Background Green / Magenta", - "color": "#ff00ff,#00ff00,#00ff00,#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff,ff00ff,00ff00,00ff00,00ff00,00ff00,ff00ff" - } - } - ] - }, - { - "name": "Background Magenta / Green", - "color": "#00ff00,#ff00ff,#ff00ff,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,00ff00,ff00ff,ff00ff,ff00ff,ff00ff,00ff00" - } - } - ] - }, - { - "name": "Background Green / Yellow", - "color": "#ffff00,#00ff00,#00ff00,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,ffff00,00ff00,00ff00,00ff00,00ff00,ffff00" - } - } - ] - }, - { - "name": "Background Yellow / Green", - "color": "#00ff00,#ffff00,#ffff00,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,00ff00,ffff00,ffff00,ffff00,ffff00,00ff00" - } - } - ] - }, - { - "name": "Background Cyan / Blue", - "color": "#0000ff,#00ffff,#00ffff,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,0000ff,00ffff,00ffff,00ffff,00ffff,0000ff" - } - } - ] - }, - { - "name": "Background Dark Cyan / Blue", - "color": "#000088,#008888,#008888,#000088", - "actions": [ - { - "hybrid": { - "hexColors": "000088,000088,008888,008888,008888,008888,000088" - } - } - ] - }, - { - "name": "Background Orange / Teal", - "color": "#2388ad,#ff8000,#ff8000,#2388ad", - "actions": [ - { - "hybrid": { - "hexColors": "2388ad,2388ad,ff8000,ff8000,ff8000,ff8000,2388ad" - } - } - ] - }, - { - "name": "Background Teal / Orange", - "color": "#ff8000,#2388ad,#2388ad,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,ff8000,2388ad,2388ad,2388ad,2388ad,ff8000" - } - } - ] - }, - { - "name": "Background Orange / Purple", - "color": "#2d0080,#ff8000,#ff8000,#2d0080", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,8000ff,ff8000,ff8000,ff8000,ff8000,8000ff" - } - } - ] - }, - { - "name": "Background Purple / Orange", - "color": "#ff8000,#2d0080,#2d0080,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,ff8000,8000ff,8000ff,8000ff,8000ff,ff8000" - } - } - ] - }, - { - "name": "Background Yellow / Purple", - "color": "#2d0080,#ffff00,#ffff00,#2d0080", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,8000ff,ffff00,ffff00,ffff00,ffff00,8000ff" - } - } - ] - }, - { - "name": "Background Purple / Yellow", - "color": "#ffff00,#2d0080,#2d0080,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,ffff00,8000ff,8000ff,8000ff,8000ff,ffff00" - } - } - ] - }, - { - "name": "Background Yellow / Magenta", - "color": "#ff00ff,#ffff00,#ffff00,#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff,ff00ff,ffff00,ffff00,ffff00,ffff00,ff00ff" - } - } - ] - }, - { - "name": "Background Magenta / Yellow", - "color": "#ffff00,#ff00ff,#ff00ff,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,ffff00,ff00ff,ff00ff,ff00ff,ff00ff,ffff00" - } - } - ] - }, - { - "name": "Background Purple / Magenta", - "color": "#ff00ff,#2d0080,#2d0080,#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff,ff00ff,8000ff,8000ff,8000ff,8000ff,ff00ff" - } - } - ] - }, - { - "name": "Background Magenta / Purple", - "color": "#2d0080,#ff00ff,#ff00ff,#2d0080", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,8000ff,ff00ff,ff00ff,ff00ff,ff00ff,8000ff" - } - } - ] - }, - { - "name": "Background White / Blue", - "color": "#0000ff,#ffffff,#ffffff,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,0000ff,ffffff,ffffff,ffffff,ffffff,0000ff" - } - } - ] - }, - { - "name": "Background Blue / White", - "color": "#ffffff,#0000ff,#0000ff,#ffffff", - "actions": [ - { - "hybrid": { - "hexColors": "ffffff,ffffff,0000ff,0000ff,0000ff,0000ff,ffffff" - } - } - ] - }, - { - "name": "Background Red / White", - "color": "#ffffff,#ff0000,#ff0000,#ffffff", - "actions": [ - { - "hybrid": { - "hexColors": "ffffff,ffffff,ff0000,ff0000,ff0000,ff0000,ffffff" - } - } - ] - }, - { - "name": "Background White / Red", - "color": "#ff0000,#ffffff,#ffffff,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,ff0000,ffffff,ffffff,ffffff,ffffff,ff0000" - } - } - ] - }, - { - "name": "Background Rainbow Blue-Red", - "color": "#0000ff,#00ffff,#00ff00,#ffff00,#ff8000,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,00ffff,00ff00,80ff00,ffff00,ff3000,ff0000" - } - } - ] - }, - { - "name": "Background Rainbow Red-Blue", - "color": "#ff0000,#ff8000,#ffff00,#00ff00,#00ffff,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,ff3000,ffff00,80ff00,00ff00,00ffff,0000ff" - } - } - ] - }, - { - "name": "Background Rainbow Dark Blue-Red", - "color": "#000080,#008080,#008000,#808000,#808000,#800000", - "actions": [ - { - "hybrid": { - "hexColors": "000080,008080,008000,808000,808000,803000,800000" - } - } - ] - }, - { - "name": "Background Rainbow Dark Red-Blue", - "color": "#800000,#808000,#808000,#008000,#008080,#000080", - "actions": [ - { - "hybrid": { - "hexColors": "800000,803000,808000,808000,008000,008080,000080" - } - } - ] - }, - { - "name": "Background purple-green", - "color": "#8000ff,#00ff00,#8000ff,#00ff00,#8000ff", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,00ff00,8000ff,00ff00,8000ff,00ff00,8000ff" - } - } - ] - }, - { - "name": "Background green-purple", - "color": "#00ff00,#8000ff,#00ff00,#8000ff,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,8000ff,00ff00,8000ff,00ff00,8000ff,008800" - } - } - ] - }, - { - "name": "Background blue-green", - "color": "#0000ff,#00ff00,#0000ff,#00ff00,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,00ff00,0000ff,00ff00,0000ff,00ff00,0000ff" - } - } - ] - }, - { - "name": "Background green-blue", - "color": "#00ff00,#0000ff,#00ff00,#0000ff,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,0000ff,00ff00,0000ff,00ff00,0000ff,00ff00" - } - } - ] - }, - { - "name": "Background red-green", - "color": "#ff0000,#00ff00,#ff0000,#00ff00,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,00ff00,ff0000,00ff00,ff0000,00ff00,ff0000" - } - } - ] - }, - { - "name": "Background green-red", - "color": "#00ff00,#ff0000,#00ff00,#ff0000,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,ff0000,00ff00,ff0000,00ff00,ff0000,00ff00" - } - } - ] - }, - { - "name": "Background blue-cyan", - "color": "#0000ff,#00ffff,#0000ff,#00ffff,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,00ffff,0000ff,00ffff,0000ff,00ffff,0000ff" - } - } - ] - }, - { - "name": "Background cyan-blue", - "color": "#00ffff,#0000ff,#00ffff,#0000ff,#00ffff", - "actions": [ - { - "hybrid": { - "hexColors": "00ffff,0000ff,00ffff,0000ff,00ffff,0000ff,00ffff" - } - } - ] - }, - { - "name": "Background blue-yellow", - "color": "#0000ff,#ffff00,#0000ff,#ffff00,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,ffff00,0000ff,ffff00,0000ff,ffff00,0000ff" - } - } - ] - }, - { - "name": "Background yellow-blue", - "color": "#ffff00,#0000ff,#ffff00,#0000ff,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,0000ff,ffff00,0000ff,ffff00,0000ff,ffff00" - } - } - ] - }, - { - "name": "Background blue-white", - "color": "#0000ff,#ffffff,#0000ff,#ffffff,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,ffffff,0000ff,ffffff,0000ff,ffffff,0000ff" - } - } - ] - }, - { - "name": "Background white-blue", - "color": "#ffffff,#0000ff,#ffffff,#0000ff,#ffffff", - "actions": [ - { - "hybrid": { - "hexColors": "ffffff,0000ff,ffffff,0000ff,ffffff,0000ff,ffffff" - } - } - ] - }, - { - "name": "Background green-yellow", - "color": "#00ff00,#ffff00,#00ff00,#ffff00,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,ffff00,00ff00,ffff00,00ff00,ffff00,00ff00" - } - } - ] - }, - { - "name": "Background yellow-green", - "color": "#ffff00,#00ff00,#ffff00,#00ff00,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,00ff00,ffff00,00ff00,ffff00,00ff00,ffff00" - } - } - ] - }, - { - "name": "Background purple-yellow", - "color": "#8000ff,#ffff00,#8000ff,#ffff00,#8000ff", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,ffff00,8000ff,ffff00,8000ff,ffff00,8000ff" - } - } - ] - }, - { - "name": "Background yellow-purple", - "color": "#ffff00,#8000ff,#ffff00,#8000ff,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,8000ff,ffff00,8000ff,ffff00,8000ff,ffff00" - } - } - ] - }, - { - "name": "Background yellow-magenta", - "color": "#ffff00,#ff00ff,#ffff00,#ff00ff,#ffff00,#ff00ff,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,ff00ff,ffff00,ff00ff,ffff00,ff00ff,ffff00" - } - } - ] - }, - { - "name": "Background magenta-yellow", - "color": "#ff00ff,#ffff00,#ff00ff,#ffff00,#ff00ff,#ffff00,#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff,ffff00,ff00ff,ffff00,ffff00,ff00ff" - } - } - ] - }, - { - "name": "Background purple-orange", - "color": "#8000ff,#ff8000,#8000ff,#ff8000,#8000ff", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff,ff8000,8000ff,ff8000,8000ff,ff8000,8000ff" - } - } - ] - }, - { - "name": "Background orange-purple", - "color": "#ff8000,#8000ff,#ff8000,#8000ff,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,8000ff,ff8000,8000ff,ff8000,8000ff,ff8000" - } - } - ] - }, - { - "name": "Background red-orange", - "color": "#ff0000,#ff8000,#ff0000,#ff8000,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,ff8000,ff0000,ff8000,ff0000,ff8000,ff0000" - } - } - ] - }, - { - "name": "Background orange-red", - "color": "#ff8000,#ff0000,#ff8000,#ff0000,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,ff0000,ff8000,ff0000,ff8000,ff0000,ff8000" - } - } - ] - }, - { - "name": "Background yellow-orange", - "color": "#ffff00,#ff8000,#ffff00,#ff8000,#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00,ff8000,ffff00,ff8000,ffff00,ff8000,ffff00" - } - } - ] - }, - { - "name": "Background orange-yellow", - "color": "#ff8000,#ffff00,#ff8000,#ffff00,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,ffff00,ff8000,ffff00,ff8000,ffff00,ff8000" - } - } - ] - }, - { - "name": "Background red-blue", - "color": "#ff0000,#0000ff,#ff0000,#0000ff,#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000,0000ff,ff0000,0000ff,ff0000,0000ff,ff0000" - } - } - ] - }, - { - "name": "Background blue-red", - "color": "#0000ff,#ff0000,#0000ff,#ff0000,#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff,ff0000,0000ff,ff0000,0000ff,ff0000,0000ff" - } - } - ] - }, - { - "name": "Background green-orange", - "color": "#00ff00,#ff8000,#00ff00,#ff8000,#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00,ff8000,00ff00,ff8000,00ff00,ff8000,00ff00" - } - } - ] - }, - { - "name": "Background orange-green", - "color": "#ff8000,#00ff00,#ff8000,#00ff00,#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000,00ff00,ff8000,00ff00,ff8000,00ff00,ff8000" - } - } - ] - }, - { - "name": "Background Enterprise E", - "color": "#000088,#000088,#ffff80,#000088,#000088,#000088,#000088", - "actions": [] - }, - { - "name": "Background LightBlue", - "color": "#7777ff,#aaaaff,#7777ff,#aaaaff,#7777ff,#aaaaff,#7777ff", - "actions": [ - { - "hybrid": { - "hexColors": "7777ff,aaaaff,7777ff,aaaaff,7777ff,aaaaff,7777ff" - } - } - ] - }, - { - "name": "Background Christmas", - "color": "#990000,#009900,#990000,#009900,#990000,#009900,#990000", - "actions": [ - { - "hybrid": { - "hexColors": "990000,009900,990000,009900,990000,009900,990000" - } - } - ] - }, - { - "name": "Background White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "hexColors": "ffffff" - } - } - ] - }, - { - "name": "Background Warm White", - "color": "#ffde59", - "actions": [ - { - "hybrid": { - "hexColors": "000000,000000,94832d,94832d,94832d,94832d,000000", - "gains": "1.0" - } - } - ] - }, - { - "name": "Background Black", - "color": "#303030", - "actions": [ - { - "hybrid": { - "hexColors": "000000" - } - } - ] - } - ] - }, - "Deko": { - "name": "Deko", - "hasColorWheel": true, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "Deko On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Starwars,Rgbw,Bar", - "turnOn": true - } - } - ] - }, - { - "name": "Deko Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Starwars,Rgbw,Bar", - "turnOn": false - } - } - ] - }, - { - "name": "Deko Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "Deko Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "Deko Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "Deko Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "Deko Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "Deko Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "Deko Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "Deko Purple", - "color": "#8000ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "Deko White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "ids": "Starwars,Rgbw,Bar", - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "Starwars": { - "name": "Starwars", - "hasColorWheel": true, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "Starwars On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Starwars", - "turnOn": true - } - } - ] - }, - { - "name": "Starwars Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Starwars", - "turnOn": false - } - } - ] - }, - { - "name": "Starwars Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "Starwars Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "Starwars Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "Starwars Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "Starwars Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "Starwars Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "Starwars Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "Starwars Purple", - "color": "#8000ff", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "Starwars White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "ids": "Starwars", - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "Rgbw": { - "name": "Rgbw", - "hasColorWheel": true, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "RGBW On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Rgbw", - "turnOn": true - } - } - ] - }, - { - "name": "RGBW Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Rgbw", - "turnOn": false - } - } - ] - }, - { - "name": "RGBW Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "RGBW Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "RGBW Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "RGBW Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "RGBW Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "RGBW Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "RGBW Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "RGBW Purple", - "color": "#8000ff", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "RGBW White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "ids": "Rgbw", - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "Dmx": { - "name": "Dmx", - "hasColorWheel": true, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "DMX Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "DMX Dark Red", - "color": "#880000", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "880000" - } - } - ] - }, - { - "name": "DMX Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "DMX Dark Green", - "color": "#008800", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "DMX Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "DMX Dark Blue", - "color": "#000088", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "000088" - } - } - ] - }, - { - "name": "DMX Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "DMX Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "DMX Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "DMX Orange", - "color": "#8c6200", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "8c6200" - } - } - ] - }, - { - "name": "DMX Purple", - "color": "#2d0080", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "2d0080" - } - } - ] - }, - { - "name": "DMX Teal", - "color": "#2388ad", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "2388ad" - } - } - ] - }, - { - "name": "DMX White", - "color": "#808080", - "actions": [ - { - "hybrid": { - "ids": "15,29,21,1", - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "Bar": { - "name": "Bar", - "hasColorWheel": true, - "scenes": [ - { - "name": "Bar On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Bar", - "turnOn": true - } - } - ] - }, - { - "name": "Bar Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Bar", - "turnOn": false - } - } - ] - }, - { - "name": "Bar Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "Bar Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "Bar Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "Bar Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "Bar Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "Bar Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "Bar Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "Bar Purple", - "color": "#8000ff", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "Bar White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "ids": "Bar", - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "All": { - "name": "All", - "hasColorWheel": true, - "colorWheelOddEven": true, - "scenes": [ - { - "name": "All Red", - "color": "#ff0000", - "actions": [ - { - "hybrid": { - "hexColors": "ff0000" - } - } - ] - }, - { - "name": "All Green", - "color": "#00ff00", - "actions": [ - { - "hybrid": { - "hexColors": "00ff00" - } - } - ] - }, - { - "name": "All Blue", - "color": "#0000ff", - "actions": [ - { - "hybrid": { - "hexColors": "0000ff" - } - } - ] - }, - { - "name": "All Cyan", - "color": "#00ffff", - "actions": [ - { - "hybrid": { - "hexColors": "00ffff" - } - } - ] - }, - { - "name": "All Yellow", - "color": "#ffff00", - "actions": [ - { - "hybrid": { - "hexColors": "ffff00" - } - } - ] - }, - { - "name": "All Magenta", - "color": "#ff00ff", - "actions": [ - { - "hybrid": { - "hexColors": "ff00ff" - } - } - ] - }, - { - "name": "All Orange", - "color": "#ff8000", - "actions": [ - { - "hybrid": { - "hexColors": "ff8000" - } - } - ] - }, - { - "name": "All Purple", - "color": "#8000ff", - "actions": [ - { - "hybrid": { - "hexColors": "8000ff" - } - } - ] - }, - { - "name": "All White", - "color": "#ffffff", - "actions": [ - { - "hybrid": { - "hexColors": "ffffff" - } - } - ] - } - ] - }, - "Idual": { - "name": "Idual", - "hasColorWheel": false, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "IDual On", - "color": "#ffffff", - "actions": [ - { - "lmair": { - "comment": "Idual On", - "sceneIndex": 42 - } - } - ] - }, - { - "name": "IDual Off", - "color": "#000000", - "actions": [ - { - "lmair": { - "comment": "Idual Off", - "sceneIndex": 1499 - } - } - ] - }, - { - "name": "IDual DayWhite", - "color": "#ffffff", - "actions": [ - { - "lmair": { - "comment": "Idual DayWhite", - "sceneIndex": 940 - } - } - ] - }, - { - "name": "IDual ColdWhite", - "color": "#d5f1ff", - "actions": [ - { - "lmair": { - "comment": "Idual ColdWhite", - "sceneIndex": 948 - } - } - ] - }, - { - "name": "IDual WarmWhite", - "color": "#fffad5", - "actions": [ - { - "lmair": { - "comment": "Idual WarmWhite", - "sceneIndex": 46 - } - } - ] - } - ] - }, - "Yamaha": { - "name": "Yamaha", - "hasColorWheel": false, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "Surround Standard", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Standard" - } - } - ] - }, - { - "name": "Surround Sci-Fi", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Sci-Fi" - } - } - ] - }, - { - "name": "Surround Spectacle", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Spectacle" - } - } - ] - }, - { - "name": "Surround Adventure", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Adventure" - } - } - ] - }, - { - "name": "Surround The Roxy Theatre", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "The+Roxy+Theatre" - } - } - ] - }, - { - "name": "Surround The Bottom Line", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "The+Bottom+Line" - } - } - ] - }, - { - "name": "Surround Hall In Vienna", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Hall+in+Vienna" - } - } - ] - }, - { - "name": "Surround Decoder", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Surround+Decoder" - } - } - ] - }, - { - "name": "Surround 7ch Stereo", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "7ch+Stereo" - } - } - ] - }, - { - "name": "Surround Hall In Munich", - "color": "", - "actions": [ - { - "yamahaAvantage": { - "command": "surroundProgram", - "program": "Hall+in+Munich" - } - } - ] - } - ] - }, - "Shelly": { - "name": "Shelly", - "hasColorWheel": false, - "colorWheelOddEven": false, - "scenes": [ - { - "name": "All Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Flur,Schlafzimmer", - "turnOn": true - } - }, - { - "shelly": { - "ids": "Wohnzimmer_Deckenlampe,Wohnzimmer_Deckenlampe,Regal,Kristall,Rgbw,Bar,Starwars", - "turnOn": false - } - }, - { - "pause": { - "duration": 1000 - } - }, - { - "lmair": { - "comment": "Idual Off", - "sceneIndex": 1499 - } - } - ] - }, - { - "name": "Esstisch An", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Wohnzimmer_Esstisch", - "turnOn": true - } - } - ] - }, - { - "name": "Esstisch Aus", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Wohnzimmer_Esstisch", - "turnOn": false - } - } - ] - }, - { - "name": "Deckenlampe On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Wohnzimmer_Deckenlampe", - "turnOn": true - } - } - ] - }, - { - "name": "Deckenlampe Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Wohnzimmer_Deckenlampe", - "turnOn": false - } - } - ] - }, - { - "name": "Deckenfluter On", - "color": "#ffffff", - "actions": [ - { - "lmair": { - "comment": "Deckenfluter On", - "sceneIndex": 131 - } - } - ] - }, - { - "name": "Deckenfluter Dim", - "color": "#888888", - "actions": [ - { - "lmair": { - "comment": "Deckenfluter Dim", - "sceneIndex": 395 - } - } - ] - }, - { - "name": "Deckenfluter Off", - "color": "#000000", - "actions": [ - { - "lmair": { - "comment": "Deckenfluter Off", - "sceneIndex": 133 - } - } - ] - }, - { - "name": "Salzkristall On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Kristall", - "turnOn": true - } - } - ] - }, - { - "name": "Salzkristall Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Kristall", - "turnOn": false - } - } - ] - }, - { - "name": "Flur On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Flur", - "turnOn": true - } - } - ] - }, - { - "name": "Flur Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Flur", - "turnOn": false - } - } - ] - }, - { - "name": "Schlafzimmer On", - "color": "#ffffff", - "actions": [ - { - "shelly": { - "ids": "Schlafzimmer", - "turnOn": true - } - } - ] - }, - { - "name": "Schlafzimmer Off", - "color": "#000000", - "actions": [ - { - "shelly": { - "ids": "Schlafzimmer", - "turnOn": false - } - } - ] - } - ] - } - } -} diff --git a/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/controller/LightmanagerRestController.kt b/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/controller/LightmanagerRestController.kt index 32b59ba..c57e54f 100644 --- a/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/controller/LightmanagerRestController.kt +++ b/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/controller/LightmanagerRestController.kt @@ -2,7 +2,6 @@ package de.visualdigits.kotlin.klanglicht.rest.lightmanager.controller import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMMarkers import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMParams -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMScenes import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMZones import de.visualdigits.kotlin.klanglicht.rest.lightmanager.service.LightmanagerService import org.springframework.http.MediaType @@ -15,23 +14,20 @@ import org.springframework.web.bind.annotation.RestController * REST controller for the light manager air. */ @RestController -@RequestMapping("/v1/lightmanager/json") +@RequestMapping("/v1/lightmanager/json", produces = [MediaType.APPLICATION_JSON_VALUE]) class LightmanagerRestController( var lightmanagerService: LightmanagerService ) { - @GetMapping("params", produces = [MediaType.APPLICATION_JSON_VALUE]) + @GetMapping("params") fun params(): LMParams? = lightmanagerService.params() - @GetMapping("zones", produces = [MediaType.APPLICATION_JSON_VALUE]) + @GetMapping("zones") fun zones(): LMZones? = lightmanagerService.zones() - @GetMapping("knownActors", produces = [MediaType.APPLICATION_JSON_VALUE]) + @GetMapping("knownActors") fun knownActors(): Map? = lightmanagerService.knownActors() - @GetMapping("scenes", produces = [MediaType.APPLICATION_JSON_VALUE]) - fun scenes(): LMScenes? = lightmanagerService.scenes() - - @GetMapping("markers", produces = [MediaType.APPLICATION_JSON_VALUE]) + @GetMapping("markers") fun markers(): LMMarkers? = lightmanagerService.markers() } diff --git a/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/service/LightmanagerService.kt b/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/service/LightmanagerService.kt index 9cdb3ed..731fbbb 100644 --- a/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/service/LightmanagerService.kt +++ b/klanglicht-rest/src/main/kotlin/de/visualdigits/kotlin/klanglicht/rest/lightmanager/service/LightmanagerService.kt @@ -3,7 +3,6 @@ package de.visualdigits.kotlin.klanglicht.rest.lightmanager.service import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.client.LightmanagerClient import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMMarkers import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMParams -import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMScenes import de.visualdigits.kotlin.klanglicht.hardware.lightmanager.model.lm.LMZones import de.visualdigits.kotlin.klanglicht.rest.configuration.ConfigHolder import jakarta.annotation.PostConstruct @@ -36,10 +35,6 @@ class LightmanagerService( return client?.knownActors() } - fun scenes(): LMScenes? { - return client?.scenes() - } - fun markers(): LMMarkers? { return client?.markers() }