From b10ab358da648c62ad328554510bec3b1b4598a1 Mon Sep 17 00:00:00 2001 From: m0fa Date: Sun, 27 Sep 2020 11:37:16 +0200 Subject: [PATCH 1/2] Loxone support added (#1185) * A separate socket for UDP api has been added. This uses the same API as HTML. Commands for Loxone were added to the API. * html files for udp api newly generated * codm pixel controller board configurations added to platformio.ini file * Parser for LX/LY commands adapted. Calculation of the values corrected. Segment handling for LX/LY removed. * Lox parser moved to own file. Lox parser added to the JSON api. Within a segment LX and LY are now supported. * serial port removed * F() macro added Co-authored-by: Marius Groos --- platformio.ini | 40 + wled00/data/settings_sync.htm | 4 + wled00/fcn_declare.h | 3 + wled00/html_settings.h | 341 ++-- wled00/html_ui.h | 2933 ++++++++++++++++----------------- wled00/json.cpp | 52 + wled00/lx_parser.cpp | 78 + wled00/set.cpp | 36 + wled00/udp.cpp | 56 +- wled00/wled.cpp | 7 +- wled00/wled.h | 7 +- wled00/wled_eeprom.cpp | 9 + wled00/xml.cpp | 4 + 13 files changed, 1910 insertions(+), 1660 deletions(-) create mode 100644 wled00/lx_parser.cpp diff --git a/platformio.ini b/platformio.ini index 2c6e2717..825584ef 100644 --- a/platformio.ini +++ b/platformio.ini @@ -375,3 +375,43 @@ build_flags = ${common.build_flags_esp8266} ${common.debug_flags} ${common.build extends = env:esp32dev build_type = debug build_flags = ${common.build_flags_esp32} ${common.debug_flags} ${common.build_flags_all_features} + +# ------------------------------------------------------------------------------ +# codm pixel controller board configurations +# ------------------------------------------------------------------------------ + +[env:codm-controller-0.4] +board = esp_wroom_02 +platform = ${common.platform_wled_default} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 + +[env:codm-controller-0.4-WS2801] +board = esp_wroom_02 +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} -D USE_WS2801 -D CLKPIN=13 -D DATAPIN=3 + +[env:codm-controller-0.4-APA102] +board = esp_wroom_02 +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} -D USE_APA102 -D CLKPIN=13 -D DATAPIN=3 + +[env:codm-controller-0.5] +board = esp_wroom_02 +platform = ${common.platform_wled_default} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} + +[env:codm-controller-0.5-WS2801] +board = esp_wroom_02 +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} -D USE_WS2801 #-D CLKPIN=0 -D DATAPIN=2 + +[env:codm-controller-0.5-APA102] +board = esp_wroom_02 +platform = ${common.platform_latest} +board_build.ldscript = ${common.ldscript_2m1m} +build_flags = ${common.build_flags_esp8266} -D USE_APA102 #-D CLKPIN=0 -D DATAPIN=2 diff --git a/wled00/data/settings_sync.htm b/wled00/data/settings_sync.htm index 7c13650e..2f414ced 100644 --- a/wled00/data/settings_sync.htm +++ b/wled00/data/settings_sync.htm @@ -38,6 +38,10 @@ Send Alexa notifications:
Send Philips Hue change notifications:
Send Macro notifications:
Send notifications twice: +

UDP Api

+Enable UDP Api:
+Port:
+Reboot required to apply changes.

Realtime

Receive UDP realtime:

Network DMX input
diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index 86d20934..12d4854c 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -223,4 +223,7 @@ void sappend(char stype, const char* key, int val); void sappends(char stype, const char* key, char* val); void getSettingsJS(byte subPage, char* dest); +//lx_parser.cpp +bool parseLx(int lxValue, int rgbw[4]); + #endif diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 22ed90ca..b4b96a6f 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -167,163 +167,163 @@ const char PAGE_settings_dmx[] PROGMEM = R"=====()====="; // Autogenerated from wled00/data/settings_ui.htm, do not edit!! const char PAGE_settings_ui[] PROGMEM = R"=====(UI Settings