Skip to main content

# Mookfist LimitlessLED Controller v0.0.3Intended as a simple wrapper around the LimitlessLED wifi protocol written in python.Currently only supports version 4 (and possibly version 5) but is designed to support multiple versions.There are some differences from the original LimitlessLED protocol:1. Brightness is a percentage between 0 and 100. LimitlessLED protocol's brightness ranges from 2 to 272. Color is a value between 0 and 255 and starts and ends with the color red. LimitlesLED protocol's color starts from blue## InstallationDownload the code: https://github.com/mookfist/mookfist-limitlessled-controller/archive/master.zip```$ unzip master.zip$ python setup.py install$ python lled.py --help```## APIThe API is currently not documented but these examples should help get you going.### API Examples```python# Set brightness to 50% for groups 1 and 2from mookfist_lled_controller import WifiBridgefrom mookfist_lled_controller import get_bridgeip, macaddr = get_bridge(version=4)bridge = WifiBridge(ip, 8899, version=4)bridge.brightness(50, 1)bridge.brightness(50, 2)``````python# Set color to 128 for group 1from mookfist_lled_controller import WifiBridgefrom mookfist_lled_controller import get_bridgeip, macaddr = get_bridge(version=4)bridge = WifiBridge(ip, 8899, version=4)bridge.color(128, 1)``````python# Fade groups 1 through 4 from 100% to 0%# This is a blocking operationfrom mookfist_lled_controller import WifiBridgefrom mookfist_lled_controller import get_bridgefrom mookfist_lled_controller import fade_brightnessip, macaddr = get_bridge(version=4)bridge = WifiBridge(ip, 8899, version=4)fade_brightness(bridge, (1,2,3,4), 100, 0)``````python# Fade color from 0 to 255 for groups 2 and 3# This is a blocking operationfrom mookfist_lled_controller import WifiBridgefrom mookfist_lled_controller import get_bridgefrom mookfist_lled_controller import fade_brightnessip, macaddr = get_bridge(version=4)bridge = WifiBridge(ip, 8899, version=4)fade_color(bridge, (1,2,3,4), 0, 255)``````python# Fade group 1 from 0 to 100% rather slowlyfrom mookfist_lled_controller import WifiBridgefrom mookfist_lled_controller import get_bridgefrom mookfist_lled_controller import fade_brightnessip, macaddr = get_bridge(version=4)bridge = WifiBridge(ip, 8899, version=4, pause=50, repeat=5)fade_brightness(bridge, (1), 0, 100)```## Command Line InterfaceThe lled.py script allows you to control your lights from the command line.### Commands| Command | Description || ------- | ----------- || fade <start> <end> | Fade brightness from <start> to <end>. Values can be between 0 and 100 || fadec <start> <end> | Fade the color from <start> to <end>. Values can be between 0 and 255 || color <color> | Set color to <color>. Value can be between 0 and 255 || brightness <brightness> | Set the brightness to <brightness>. Value can be between 0 and 255 |### Options| Argument | Description | Default Value || -------- | ----------- | ------------- || --repeat | Number of times to repeat a command. Increasing this value could improve smoothness, but means it will take a longer time to perform fades | 1 || --pause | Number of milliseconds to pause between sending commands. Decreasing this value below 100ms might mean some commands are not processed | 100 || --group | Group number. Repeat the argument for each group you want to send a command to | n/a || --debug | Turn on debug logging | false || --host | The IP/hostname of the bridge. If omitted the bridge will be automatically scanned down | n/a || --port | The port number of the bridge. | 8899 || --version | The version of the LimitlessLED protocol | 4 |### ExamplesFade light group 1 to 0% brightness```$ python lled.py fade 100 0 --group 1```Set color to groups 1 and 2```$ python lled.py color 128 --group 1 --group 2```Set brightness to 50% for group 3```$ python lled.py brightness 50 --group 3```## TweakingThe repeat and pause values can be used to tweak how commands are sent. In general, you should wait 100ms between each command sent. But since there is no native fading in LimitlessLED, to achieve fading, the controller sends multiple commands to fade from one value to another.If the pause is too small, some commands might get missed. But this is what the repeat setting can fix. You can send the same command more than once.Getting smooth fading is not very easy with the wifi protocol, but you might be able to get better results by playing with these two values

Project description

UNKNOWN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mookfist-lled-controller-0.0.4.tar.gz (5.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page