Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding missing UI settings for ACN protocol #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 19 additions & 1 deletion python/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,23 @@
"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
Expand Down Expand Up @@ -417,6 +433,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
Expand Down
20 changes: 20 additions & 0 deletions python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,26 @@ 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 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
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
Expand Down