Skip to main content

Controller library for limitlessled/easybulb/milight Wi-Fi LEDs

Project description

https://travis-ci.org/ojarva/python-ledcontroller.svg?branch=master https://pypip.in/v/ledcontroller/badge.png

Controller for LimitlessLED RGBW lights (should be compatible with easybulb/milight as well).

Before using this, you need to use smartphone/tablet app to configure light groups to the gateway. Configuring remotes has nothing to do with configuring the gateway. You can not mix white lights and RGBW lights to same group.

See github repository for more information.

The code is based on the documentation available at limitlessled.com

Installation

pip install ledcontroller

Usage

import ledcontroller
led = ledcontroller.LedController("192.168.1.6")
led.off() # Switches all groups off
led.set_color("red", 1) # Switches group 1 on and changes color to red.
led.white(2) # Group 2 on and color to white.
led.set_brightness(50, 2) # Group 2 on and brightness to 50%.
led.disco(3) # Group 3 on and enable disco mode.
led.disco_faster(3) # Group 3 on and adjust disco mode speed.
led.on(4) # Switch group 4 on. Bulb automatically restores previous color and brightness.

Using both white and RGBW bulbs:

import ledcontroller
# By default, all groups are RGBW bulbs.
led = ledcontroller.LedController("192.168.1.6", group_1="white", group_4="white")
led.set_group_type(1, "white") # This is same as using constructor keyword group_1.
led.on()
led.white(2) # Switches RGBW group on and changes color to white.
led.white(1) # Turns white group on.
led.warmer() # Adjusts all white groups to warmer color. Switches all groups on.
led.cooler(1) # Adjusts group 1 white bulbs to cooler color.
led.brightness_up() # Adjusts white group brightness up. Does not affect RGBW lights.
led.brightness_up(2) # Does nothing to RGBW bulbs.
led.brightness_up(4) # Adjusts group 4 brightness.
led.set_brightness(50) # Adjusts all RGBW bulbs to 50%. Does not affect white lights.

Notes

  • There is automatic 100ms pause between each command. Almost every action requires sending more than one command, thus requiring several hundred milliseconds. You can change this with keyword argument “pause_between_commands”. However, decreasing the delay will cause some commands to fail.

  • As the gateway seems to be rather unreliable, all commands are sent multiple times (three by default). If you want to change this, use “LedController(ip, repeat_commands=n)” to create new lightcontroller instance..

  • If for some reason you need to change gateway port, pass port=n argument to constructor.

  • Run testsuite with “python setup.py test”. Tests only run the code without checking whether proper commands were sent.

  • RGBW/white bulb commands differ a bit. Obviously, it is not possible to change color for white bulbs. For white bulbs, there is no absolute brightness settings. Similarly, only white bulbs allow adjusting color temperature (with .cooler and .warmer). There is 10 steps for white bulb brightness and color temperature.

Additional notes:

  • I bought my bulbs, remotes and gateway from LimitlessLED. Unfortunately, they have really expensive shipping ($50 to Finland). Furthermore, when ordering to Finland, taxes and customs were about 30% in top of original price.

  • milight.com and easybulb.com sell same products with two different brands. These are more expensive than LimitlessLED, but ship from UK.

  • At least some products from s’luce iLight are exactly the same with different branding.

  • Beware that at least milight.com and easybulb.com sell older version of the wifi gateway (v3, vs. v4 from LimitlessLED). v3 does not support nightmode, and seems to be less reliable than v4.

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

ledcontroller-1.0.7.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ledcontroller-1.0.7-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ledcontroller-1.0.7.tar.gz.

File metadata

  • Download URL: ledcontroller-1.0.7.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ledcontroller-1.0.7.tar.gz
Algorithm Hash digest
SHA256 a9c55233f5cd15c24967e85faf76922b1ad89f17d4ffa44df08f1d4113525e33
MD5 43ab5b2be7f5f473473a89331341dd7d
BLAKE2b-256 01b4f6828316b4f5455ceb954acb75c0ab6cde5bbdfed5ce913e60b1ea05be1a

See more details on using hashes here.

File details

Details for the file ledcontroller-1.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ledcontroller-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 567fd67a532c9b9c36a7ded03e52259eb5a935e9e48f879003866d1de417cdad
MD5 84bcbfe96ba4e98685cd7548502b4550
BLAKE2b-256 b02f36326bc5b545ebe40895bb66641601ab9039ffa9a14bb373e43510dc7f2a

See more details on using hashes here.

Supported by

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