From a70bfeca937009ac4bf12b15470c6ace34d556a6 Mon Sep 17 00:00:00 2001 From: Greg Leeds Date: Sun, 6 Jan 2019 19:17:13 -0600 Subject: [PATCH 1/3] Adding missing UI settings for ACN protocol --- python/lib/config.py | 21 ++++++++++++++++++++- python/main.py | 10 ++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/python/lib/config.py b/python/lib/config.py index 6a3cfaf..2c209b5 100644 --- a/python/lib/config.py +++ b/python/lib/config.py @@ -101,7 +101,24 @@ "Fadecandy" : {"SERVER" : ["Server Address", "Address of Fadecandy server", "textbox", - "localhost:7890"]} + "localhost:7890"]}, + "sACNClient" : {"IP": ["IP Address", + "IP Address of ACN Device(non-multicast)", + "textbox", + "xxx.xxx.xxx.xxx"], + "START_UNIVERSE": ["Start Universe", + "Universe Number of first Pixel", + "textbox-int", + "1"], + "START_CHANNEL": ["Start Channel", + "Channel Number of first Pixel", + "textbox-int", + "1"], + "UNIVERSE_SIZE": ["Universe Size", + "Number of Channels per Universe", + "textbox-int", + "512"] + } } # General config used by GUI to generate add board interface @@ -417,6 +434,8 @@ settings["devices"][board]["configuration"]["SOFTWARE_GAMMA_CORRECTION"] = False elif settings["devices"][board]["configuration"]["TYPE"] == 'Stripless': settings["devices"][board]["configuration"]["SOFTWARE_GAMMA_CORRECTION"] = False + elif settings["devices"][board]["configuration"]["TYPE"] == 'sACNClient': + settings["devices"][board]["configuration"]["SOFTWARE_GAMMA_CORRECTION"] = False else: raise ValueError("Invalid device selected. Device {} not known.".format(settings["devices"][board]["configuration"]["TYPE"])) # Cheeky lil fix in case the user sets an odd number of LEDs diff --git a/python/main.py b/python/main.py index dfa7a73..673648d 100644 --- a/python/main.py +++ b/python/main.py @@ -1459,6 +1459,16 @@ def update_add_device_button(): valid = True req_valid_inputs[req_config_setting] = valid update_req_box_highlight(req_config_setting, (1 if valid else 2) if test else 0) + elif current_device == "sACNClient": + for req_config_setting in config.device_req_config[current_device]: + test = req_widgets[current_device][req_config_setting][1].text() + # Validate Server + if req_config_setting == "IP": + valid = valid_ip(test) + else: + valid = True + req_valid_inputs[req_config_setting] = valid + update_req_box_highlight(req_config_setting, (1 if valid else 2) if test else 0) # Other devices without required config elif not config.device_req_config[current_device]: pass From a32807b5b3c056f61a72d2d457c5b55eb6ac5285 Mon Sep 17 00:00:00 2001 From: Greg Leeds Date: Sun, 6 Jan 2019 20:31:10 -0600 Subject: [PATCH 2/3] Formatting cleanup --- python/lib/config.py | 33 ++++++++++++++++----------------- python/main.py | 12 +++++++++++- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/python/lib/config.py b/python/lib/config.py index 2c209b5..0c510ce 100644 --- a/python/lib/config.py +++ b/python/lib/config.py @@ -102,23 +102,22 @@ "Address of Fadecandy server", "textbox", "localhost:7890"]}, - "sACNClient" : {"IP": ["IP Address", - "IP Address of ACN Device(non-multicast)", - "textbox", - "xxx.xxx.xxx.xxx"], - "START_UNIVERSE": ["Start Universe", - "Universe Number of first Pixel", - "textbox-int", - "1"], - "START_CHANNEL": ["Start Channel", - "Channel Number of first Pixel", - "textbox-int", - "1"], - "UNIVERSE_SIZE": ["Universe Size", - "Number of Channels per Universe", - "textbox-int", - "512"] - } + "sACNClient" : {"IP" : ["IP Address", + "IP Address of ACN Device(non-multicast)", + "textbox", + "xxx.xxx.xxx.xxx"], + "START_UNIVERSE" : ["Start Universe", + "Universe Number of first Pixel", + "textbox-int", + "1"], + "START_CHANNEL" : ["Start Channel", + "Channel Number of first Pixel", + "textbox-int", + "1"], + "UNIVERSE_SIZE" : ["Universe Size", + "Number of Channels per Universe", + "textbox-int", + "512"]} } # General config used by GUI to generate add board interface diff --git a/python/main.py b/python/main.py index 673648d..07040b2 100644 --- a/python/main.py +++ b/python/main.py @@ -1459,12 +1459,22 @@ def update_add_device_button(): valid = True req_valid_inputs[req_config_setting] = valid update_req_box_highlight(req_config_setting, (1 if valid else 2) if test else 0) + # sACN (E1.31) elif current_device == "sACNClient": for req_config_setting in config.device_req_config[current_device]: test = req_widgets[current_device][req_config_setting][1].text() - # Validate Server + # Validate IP Address if req_config_setting == "IP": valid = valid_ip(test) + # Validate Universe + elif req_config_setting == "START_UNIVERSE": + valid = valid_int(test) + # Validate Start Channel + elif req_config_setting == "START_CHANNEL": + valid = valid_int(test) + # Validate Universe Size + elif req_config_setting == "UNIVERSE_SIZE": + valid = valid_int(test) else: valid = True req_valid_inputs[req_config_setting] = valid From a3ce2b4811d25effd5924b696008c19a6d677c40 Mon Sep 17 00:00:00 2001 From: Greg Leeds Date: Sun, 6 Jan 2019 21:43:32 -0600 Subject: [PATCH 3/3] Adding some documentation --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index c87da3e..01f8003 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,18 @@ Grab some LED strips, and you can set this up yourself. Follow the simple steps ## Installation Check out [this tutorial](https://www.youtube.com/watch?v=W4jaAgjfvG8) made by Matt Muller. + +## Streaming ACN (E1.31) Setup +To use the sACN protocol with a ESP8266 and WS2812 led strips, flash your ESP with the +[ESPixelStick](https://github.com/forkineye/ESPixelStick) firmware. +Building the firmware for Arduino requires numerous libraries listed in the README. +The process involves flashing the firmware, using gulp to build the HTML for the admin interface, + and uploading it with the Filesystem Uploader. + +The led strip should be connected to the GPIO2 pin (D4 on a NodeMCU). +Then power up the ESP and connect to the web ui in your browser, +and got to "Device Setup" and enter the details of your WS2812 strip. +The color order should be set to "GRB". + +From this point the strip can then be configured in the Systematic LED UI's +Board Manager with settings that match the Device Configuration from ESPixelStick.