From bd92acd9f34665c1abe01aae20d20fbddb0241f2 Mon Sep 17 00:00:00 2001 From: Johan Nilsson Date: Mon, 3 Apr 2023 09:21:58 +0200 Subject: [PATCH 1/3] Config to control Elgato Key Light --- .../ola_trigger/contrib/elgato_key_light.conf | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 tools/ola_trigger/contrib/elgato_key_light.conf diff --git a/tools/ola_trigger/contrib/elgato_key_light.conf b/tools/ola_trigger/contrib/elgato_key_light.conf new file mode 100644 index 0000000000..d21515293d --- /dev/null +++ b/tools/ola_trigger/contrib/elgato_key_light.conf @@ -0,0 +1,127 @@ +# OLA Trigger config to control Elgato Key Light or Key Light Airs +# Copyright (C) 2020-2023 Johan Nilsson. https://gobo.ws + + + +# DMX chart + +############################################################################### + +# +---------+---------+----------------------------+ +# | Channel | Value | Function | +# +---------+---------+----------------------------+ +# | 1 | 0-100 | Dimmer (0-100%) | +# | | 101-255 | Unused range | +# +---------+---------+----------------------------+ +# | 2 | | Color temperature (kelvin) | +# | | 0-3 | Unused range | +# | | 4-9 | 2900K | +# | | 10-15 | 3000K | +# | | 16-21 | 3100K | +# | | 22-27 | 3200K | +# | | 28-33 | 3300K | +# | | 34-39 | 3400K | +# | | 40-45 | 3500K | +# | | 46-51 | 3600K | +# | | 52-57 | 3700K | +# | | 58-63 | 3800K | +# | | 64-69 | 3900K | +# | | 70-75 | 4000K | +# | | 76-81 | 4100K | +# | | 82-87 | 4200K | +# | | 88-93 | 4300K | +# | | 94-99 | 4400K | +# | | 100-105 | 4500K | +# | | 106-111 | 4600K | +# | | 112-117 | 4700K | +# | | 118-123 | 4800K | +# | | 124-129 | 4900K | +# | | 130-135 | 5000K | +# | | 136-141 | 5100K | +# | | 142-147 | 5200K | +# | | 148-153 | 5300K | +# | | 154-159 | 5400K | +# | | 160-165 | 5500K | +# | | 166-171 | 5600K | +# | | 172-177 | 5700K | +# | | 178-183 | 5800K | +# | | 184-189 | 5900K | +# | | 190-195 | 6000K | +# | | 196-201 | 6100K | +# | | 202-207 | 6200K | +# | | 208-213 | 6300K | +# | | 214-219 | 6400K | +# | | 220-225 | 6500K | +# | | 226-231 | 6600K | +# | | 232-237 | 6700K | +# | | 238-243 | 6800K | +# | | 244-249 | 6900K | +# | | 250-255 | 7000K | +# +---------+---------+----------------------------+ + + + +# Comments + +############################################################################### + +# Only tested with one light + + + +# Configuration + +############################################################################### + +hostname='192.168.0.1:9123' # Elgato Key light hostname/IP:port (default 9123) + + + +# Triggers + +############################################################################### +# Slot Values Action + +1 0-100 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"brightness":${slot_value}}]}' 'http://${hostname}/elgato/lights'` +2 4-9 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":344}]}' 'http://${hostname}/elgato/lights'` +2 10-15 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":335}]}' 'http://${hostname}/elgato/lights'` +2 16-21 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":323}]}' 'http://${hostname}/elgato/lights'` +2 22-27 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":312}]}' 'http://${hostname}/elgato/lights'` +2 28-33 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":309}]}' 'http://${hostname}/elgato/lights'` +2 34-39 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":293}]}' 'http://${hostname}/elgato/lights'` +2 40-45 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":284}]}' 'http://${hostname}/elgato/lights'` +2 46-51 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":276}]}' 'http://${hostname}/elgato/lights'` +2 52-57 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":269}]}' 'http://${hostname}/elgato/lights'` +2 58-63 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":262}]}' 'http://${hostname}/elgato/lights'` +2 64-69 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":255}]}' 'http://${hostname}/elgato/lights'` +2 70-75 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":249}]}' 'http://${hostname}/elgato/lights'` +2 76-81 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":243}]}' 'http://${hostname}/elgato/lights'` +2 82-87 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":237}]}' 'http://${hostname}/elgato/lights'` +2 88-93 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":231}]}' 'http://${hostname}/elgato/lights'` +2 94-99 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":226}]}' 'http://${hostname}/elgato/lights'` +2 100-105 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":221}]}' 'http://${hostname}/elgato/lights'` +2 106-111 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":216}]}' 'http://${hostname}/elgato/lights'` +2 112-117 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":212}]}' 'http://${hostname}/elgato/lights'` +2 118-123 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":207}]}' 'http://${hostname}/elgato/lights'` +2 124-129 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":203}]}' 'http://${hostname}/elgato/lights'` +2 130-135 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":199}]}' 'http://${hostname}/elgato/lights'` +2 136-141 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":195}]}' 'http://${hostname}/elgato/lights'` +2 142-147 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":191}]}' 'http://${hostname}/elgato/lights'` +2 148-153 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":188}]}' 'http://${hostname}/elgato/lights'` +2 154-159 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":184}]}' 'http://${hostname}/elgato/lights'` +2 160-165 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":181}]}' 'http://${hostname}/elgato/lights'` +2 166-171 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":178}]}' 'http://${hostname}/elgato/lights'` +2 172-177 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":175}]}' 'http://${hostname}/elgato/lights'` +2 178-183 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":172}]}' 'http://${hostname}/elgato/lights'` +2 184-189 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":169}]}' 'http://${hostname}/elgato/lights'` +2 190-195 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":166}]}' 'http://${hostname}/elgato/lights'` +2 196-201 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":163}]}' 'http://${hostname}/elgato/lights'` +2 202-207 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":161}]}' 'http://${hostname}/elgato/lights'` +2 208-213 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":158}]}' 'http://${hostname}/elgato/lights'` +2 214-219 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":156}]}' 'http://${hostname}/elgato/lights'` +2 220-225 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":154}]}' 'http://${hostname}/elgato/lights'` +2 226-231 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":152}]}' 'http://${hostname}/elgato/lights'` +2 232-237 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":149}]}' 'http://${hostname}/elgato/lights'` +2 238-243 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":147}]}' 'http://${hostname}/elgato/lights'` +2 244-249 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":145}]}' 'http://${hostname}/elgato/lights'` +2 250-255 `curl '-s' '-o /dev/null' '-k' '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"numberOfLights":1,"lights":[{"on":1,"temperature":143}]}' 'http://${hostname}/elgato/lights'` From 082735ff81737659e0ec5de4656898d2d547dcd7 Mon Sep 17 00:00:00 2001 From: Johan Nilsson Date: Mon, 3 Apr 2023 09:24:39 +0200 Subject: [PATCH 2/3] Update AUTHORS --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index a3966eadc0..e76ebeacd4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,7 +18,7 @@ Contributors: Jannis Achstetter, compile fixes for newer dependencies and various fixes Laurent (Renzo), Debian packages, FreeBSD & RDM testing. Lukas Erlinghagen, win32 port. - Johan Nilsson, Philips Hue, Osram Lightify & crelay trigger config + Johan Nilsson, Philips Hue, Lightify, crelay & Elgato Key Light ola_trigger configs Joshua Moyerman, Art-Net fixes. Masaki Muranaka, various patches Nicolas, for the win32 port of libartnet From ac5ef1cf2f6203882e8ac239d9b6fdd7608a82a8 Mon Sep 17 00:00:00 2001 From: Johan Nilsson Date: Mon, 3 Apr 2023 09:28:57 +0200 Subject: [PATCH 3/3] Update Makefile.mk --- tools/ola_trigger/Makefile.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ola_trigger/Makefile.mk b/tools/ola_trigger/Makefile.mk index 75ac027306..702f8a3f58 100644 --- a/tools/ola_trigger/Makefile.mk +++ b/tools/ola_trigger/Makefile.mk @@ -4,6 +4,7 @@ EXTRA_DIST += \ dist_noinst_DATA += \ tools/ola_trigger/contrib/crelay.conf \ + tools/ola_trigger/contrib/elgato_key_light.conf \ tools/ola_trigger/contrib/mac_itunes.conf \ tools/ola_trigger/contrib/mac_volume.conf \ tools/ola_trigger/contrib/philips_hue_osram_lightify.conf \ @@ -76,7 +77,7 @@ tools_ola_trigger_ActionTester_LDADD = $(COMMON_TESTING_LIBS) \ test_scripts += tools/ola_trigger/FileValidateTest.sh tools/ola_trigger/FileValidateTest.sh: tools/ola_trigger/Makefile.mk - echo "for FILE in ${srcdir}/tools/ola_trigger/example.conf ${srcdir}/tools/ola_trigger/test_file.conf ${srcdir}/tools/ola_trigger/test_file_falling.conf ${srcdir}/tools/ola_trigger/test_file_rising.conf ${srcdir}/tools/ola_trigger/contrib/crelay.conf ${srcdir}/tools/ola_trigger/contrib/mac_volume.conf ${srcdir}/tools/ola_trigger/contrib/mac_itunes.conf ${srcdir}/tools/ola_trigger/contrib/philips_hue_osram_lightify.conf; do echo \"Checking \$$FILE\"; ${top_builddir}/tools/ola_trigger/ola_trigger${EXEEXT} --validate \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_trigger to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > $(top_builddir)/tools/ola_trigger/FileValidateTest.sh + echo "for FILE in ${srcdir}/tools/ola_trigger/example.conf ${srcdir}/tools/ola_trigger/test_file.conf ${srcdir}/tools/ola_trigger/test_file_falling.conf ${srcdir}/tools/ola_trigger/test_file_rising.conf ${srcdir}/tools/ola_trigger/contrib/crelay.conf ${srcdir}/tools/ola_trigger/contrib/elgato_key_light.conf ${srcdir}/tools/ola_trigger/contrib/mac_volume.conf ${srcdir}/tools/ola_trigger/contrib/mac_itunes.conf ${srcdir}/tools/ola_trigger/contrib/philips_hue_osram_lightify.conf; do echo \"Checking \$$FILE\"; ${top_builddir}/tools/ola_trigger/ola_trigger${EXEEXT} --validate \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_trigger to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > $(top_builddir)/tools/ola_trigger/FileValidateTest.sh chmod +x $(top_builddir)/tools/ola_trigger/FileValidateTest.sh CLEANFILES += tools/ola_trigger/FileValidateTest.sh