LimitlessLED / Mi-Light Plugin

Questions and comments specific to a particular plugin should go here.
Post Reply
SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

LimitlessLED / Mi-Light Plugin

Post by SupahNoob » Wed Jul 22, 2015 2:20 am

Hello everyone!

To find an alternate Mi-Light plugin, check here ... each plugin offers a different experience, and can do different things.

If you're new to EventGhost, I've tried to make setup of this plugin as easy as possible for you! Simply download the .ZIP file below, navigate to C:\Program Files\EventGhost\plugins\ or C:\Program Files (x86)\EventGhost\plugins .... and then extract the file to this folder! Simple as that, open up EventGhost and add the plugin. It will be under the "OTHER" tab as "LimitlessLED Automation".

Current Version v1.4.0 (11/25/2015):

Image

Features:
- Support for up to TWO bridges!!
- Turn groups ON/OFF
= This includes setting brightness/color values
- Set the specific brightness %
- Step UP/DOWN in brightness
- Set the specific Color
- Query theoretical state** of bulbs
- Name your groups!
- Control via eg.event.payload or user-defined GLOBAL variable (perhaps with AutoRemote?)
*All commands can happen to all bulbs, one group, or multiple groups unless otherwise noted
** Since this is all done in UDP packet, there is no conversation .. only just a message sent to the bulbs. We can not 100% know of the state of the bulbs, but this is the best guess, based on what the plugin has sent.

NEW COLORS! Featured colors are according to this graphic.

To do:
- Download the most recent version (Low Priority)


---

Code: Select all

#Change Log --- CURRENT VERSION 1.4.1
#==================\
#1.4.0 - 2015/11/25\
#==================\
# Features:
# - The user is now able to optionally specify the global variable they'd like to use for the VARIABLE COMMAND option.
#
# Added:
# - Added an icon! :)
#
# Changed:
# - Some ConfigPanels have been updated; this is part of a larger wxPython project I am working on.
#
# Bugfixes:
# - Fixed a small number of notify-errors.
#==================\

#==================\
#1.3.1 - 2015/11/18\
#==================\
# Added:
# - Version checker will initialize on every startup and notify the user if an update is necessary.
#
# Bugfixes:
# - There is now a maximum brightness of 100% on all lights commands.
#==================\

#==================\
#1.3.0 - 2015/10/31\
#==================\
# Features:
# - Added NAME GROUPS Action
# = You can now name your groups in a human-friendly way.
#
# - Added SHOW GROUPS STATUS Action
# = You can now view the theoretical status of your groups.
# 
# - Added VARIABLE COMMAND Action
# = You can now perform any action based on an EventGhost payload.
#==================\

#==================\
#1.2.2 - 2015/10/24\
#==================\
# Bugfixes:
# - Commands can be edited properly now.
#==================\

#==================\
#1.2.1 - 2015/09/14\
#==================\
# Bugfixes:
# - Groups will now brighten and darken correctly if group1 is dark, and only one group is on.
#
# ***DEV SPECIFIC CHANGES***
# - FILLER GROUP BV changed from 000 to 999.
#==================\

#==================\
#1.2.0 - 2015/08/16\
#==================\
# Features:
# - All actions are named appropriately and can be re-configured now.
#
# Optimization:
# - All commands are slightly faster (likely unnoticable), but have more built-in redundancy.
# - Cleaned up some UI elements from showing if they didn't need to be (controls for groups 5 - 8 if no second bridge present)
#
# Removed:
# - UI elements that are now-defunct like the "RESET GROUPS" button and all such associations.
#
# ***DEV SPECIFIC CHANGES***
# - Full code is now ~150 lines shorter.
# = Cleaned up "IF WHITE" condition to only be 2-4 lines
# = Removed defunct UI elements
#==================\

#==================\
#1.1.1 - 2015/08/13\
#==================\
# Added:
# - All actions are named appropriately and can be re-configured now.
#
# Bugfixes:
# - Lights will now properly dim or brighten if two complementary commands are sent back-to-back.

#==================\
#1.1.0 - 2015/08/12\
#==================\
# Features:
# - Added DIMMER Action
# == You can now set brightness levels directly, or step up/down by a level (includes a 2x multiplier) 
#
# Bugfixes:
# - Lights will now turn off correctly if some lights are WHITE and some are COLOR. BV of 0 was not recorded for WHITE; causing lights which were OFF to ON->DIM->OFF if "ALL OFF" command was run.
#
# Optimization:
# - Fine tuned TURN ON commands to work in most cases for bridges connected via WiFi (Commands were being sent to bridge too frequently with FOR LOOP, dumbed it down so RF could catch up)
# == Bulbs should turn on correctly the first time, color+brightness
#
# Added:
# - version indicator in CONFIG PANEL
#
# ***DEV SPECIFIC CHANGES*** 
# - all relevant commands now adhere to the logic: "IF all GROUP BV/CV values are equal, then use the broadcast option (255.255.255.255), otherwise, use the rotate method."
# == See fn "CheckIfSame", supports BV or CV as these are set to arg "iterator", while the list itself is the second argument. Call the function result, return logic boolean.

#==================\
#1.0.0 - 2015/07/21\
#==================\
# Initial Release!
# Features:
# - Up to 2 bridges, up to 9 total groups (8 individual, 1 for ALL) .. all features herein support any configuration of all/specific groups
# - ON @ specific brightness, specific color
# - OFF
# - All tertiary colors in RGB color pie!
---

Enjoy!

- SN
Attachments
LimitlessLED.zip
v1.4.0
(53.75 KiB) Downloaded 227 times
Last edited by SupahNoob on Wed Nov 25, 2015 6:33 pm, edited 8 times in total.

russco
Posts: 8
Joined: Sun Jan 04, 2015 10:10 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. SEP 14th

Post by russco » Sun Sep 27, 2015 6:23 pm

Hey! Just want to say I really appreciate what you've done here.

Is there any chance of you adding a 'toggle lights' option? So that I can turn my lights off and on using the same button?

Thanks for all your work!

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. SEP 14th

Post by SupahNoob » Mon Sep 28, 2015 3:30 am

You could set this up in EventGhost yourself very simply! Set your macros up like the below and it will act as a toggle of sorts.

Image

ed//

However I see what you mean .. what if you wanted to have the lights turn on/off, disregarding color altogether. To understand why this wasn't included initially, you have to understand that the lights actually dim to 5% and then turn off. I do this because, to me, it looks more aesthetically pleasing. If you want, I can have an option in the "Turn OFF" configuration page that specifies "SWITCH OFF", or what the currently functionality is, which we can call "DIM to OFF". I can then also create a TOGGLE Action in which both of those configurations are possible (SWITCH OFF/DIM to OFF).

Let me know what you'd prefer, I will create it.

Thanks,

- SN

User1306
Experienced User
Posts: 53
Joined: Sat Oct 13, 2012 4:37 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. SEP 14th

Post by User1306 » Sat Oct 17, 2015 1:04 pm

First thank you for this plugin, i like that you can group everything together.
i'm having an issue with it though, after i add a macro i cant modify it i get the error below.

everything else is working fine, i can test and trigger the event, but if i want to modify it, it give me an error. i tired the previous version, and it seem the fist version is the only one that works good the other two have this issue.
it doesnt matter which event you want to modify, some just hangs and some gives error.

any thought

Code: Select all

Traceback (most recent call last) (1706):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
    treeItem.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
    return self.executable.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\plugins\LimitlessLED\__init__.py", line 731, in Configure
    brightnessCtrl = panel.SpinIntCtrl(brightness, min = 1, max = 100)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ControlProviderMixin.py", line 29, in SpinIntCtrl
    return eg.SpinIntCtrl(self, -1, value, *args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinIntCtrl.py", line 55, in __init__
    integerWidth=integerWidth
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 88, in __init__
    numCtrl.SetValue(value) # To avoid bug in NumCtrl
  File "wx\lib\masked\numctrl.pyc", line 1277, in SetValue
  File "wx\lib\masked\numctrl.pyc", line 1588, in _toGUI
ValueError: NumCtrl requires numeric value, passed True

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. SEP 14th

Post by SupahNoob » Sat Oct 24, 2015 11:24 pm

User1306 wrote:everything else is working fine, i can test and trigger the event, but if i want to modify it, it give me an error. i tired the previous version, and it seem the fist version is the only one that works good the other two have this issue.
it doesnt matter which event you want to modify, some just hangs and some gives error.

any thought
Yep! I had since fixed this internally. Thank you, and see the latest version of the plugin in the original post. :)

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. OCT 31th [BIG UPD]

Post by SupahNoob » Sun Nov 01, 2015 4:16 am

With the newest update to my plugin, I've added a feature where you can control your lights via eg.event.payload. There is a caveat so far, however. As I have only 1 application for this (via AutoRemote/AutoVoice), I do not know the various ways that eg.event.payload is formatted. FOR THIS REASON, IF YOU HAVE PROBLEMS WITH THE COMMAND, PLEASE LET ME KNOW! I'll be happy to make an update to support your configuration. :)

This is what mine looks like!

Image

I've set up a macro to where any time a device of mine sends an AutoRemote message (AutoRemote.Message.*), the Variable Command will look at the EG.event.payload and act on what's inside. This happens one of two ways: my browser and my phone both have Joao's AutoVoice plugin/add-on. From here, the AV command is forwarded to a Tasker "server" of sorts in my home automation setup, which then forwards a corresponding AutoRemote command to my server running EventGhost. That's where the plugin takes over.

Support commands are practically anything you could think of saying related to the plugin actions themselves. For some examples...

"Turn all the lights on" (If a light is off, turn it on to a default value)
"Turn the Bedroom lights off" (Whichever group is named "BEDROOM", turn off those lights)
"Would you make it a bit brighter in my dining room?" (Whichever group is named "DINING", turn those lights up by 1 step)
"Set the Hallways, the Entryway, the Bedroom, and the Dining Room to 50% Violet, please!" (Groups named "HALLWAYS", "ENTRYWAY", "BEDROOM", and "DINING" are set to 50% brightness, and the color VIOLET)

Things it cannot do:
Commands using negatives ... EXCEPT, NOT, NOR, etc. I'm not this smart yet. :(

arturmaj
Posts: 23
Joined: Sun Apr 19, 2009 4:55 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. NOV 18th

Post by arturmaj » Tue Nov 24, 2015 2:19 pm

Thanks SoopaNoob for the plugin. Yesterday I received my milights. I set them up according to the manuals: Protocol: UDP port 8899: Work Mode STA. My router assigns the same IP to the hub. It all works with the android app, but I have no reaction to the plugin. What am I doing wrong?

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. NOV 18th

Post by SupahNoob » Tue Nov 24, 2015 9:32 pm

arturmaj wrote:Thanks SoopaNoob for the plugin. Yesterday I received my milights. I set them up according to the manuals: Protocol: UDP port 8899: Work Mode STA. My router assigns the same IP to the hub. It all works with the android app, but I have no reaction to the plugin. What am I doing wrong?
I'm not positive what your problem is. Are you assigning the specific IP of the hub to the plugin's configuration page? Did you add the lights to the hub and can control the lights via the android app? Which app are you using? I used this milight app within the PlayStore.

arturmaj
Posts: 23
Joined: Sun Apr 19, 2009 4:55 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. NOV 18th

Post by arturmaj » Wed Nov 25, 2015 6:39 am

I am using the same app. The app controlls my lamp, no problem. The plugin has the right IP and port. I can login into the milight hub with the mentioned IP. The setup page shows the port 8899 and UDP protocol. When iItry to use action like all lights on or off there is nothing happening. When I try executing light status I am getting nothing. Are you using UDP?

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin - Upd. NOV 18th

Post by SupahNoob » Wed Nov 25, 2015 2:21 pm

arturmaj wrote:I am using the same app. The app controlls my lamp, no problem. The plugin has the right IP and port. I can login into the milight hub with the mentioned IP. The setup page shows the port 8899 and UDP protocol. When iItry to use action like all lights on or off there is nothing happening. When I try executing light status I am getting nothing. Are you using UDP?
Try IP 255.255.255.255, which is default for the "broadcast" option. Alternatively, it looks like in the miLight setup, you can skip the step of pairing with your router, which might then allow you to specify its IP - this might be something we want to try as well eventually. If you only have 1 bridge currently, then 255.255.255.255 should work just fine for you - I personally have two bridges, so I specify both their IPs so I can control them individually. Let me know if 255.255.255.255 works for you.

arturmaj
Posts: 23
Joined: Sun Apr 19, 2009 4:55 pm

Re: LimitlessLED / Mi-Light Plugin

Post by arturmaj » Fri Nov 27, 2015 12:41 am

Thanks Supa. My problem are the bulbs. I have both color and white only bulbs. The white only can only be controlled with app interface (3). The color bulbs only by interface (4). Your plugin works only with the color bulbs and does not work with white only.
This is the bulb not compatibile with the plugin "2.4G 6W RGB WIFI LED Light Dimmable Bulb Lamp E27 Mi Light AC86-265V Nice. The description says RGB but it is not here is the link ;http://www.ebay.ca/itm/311310345814?_tr ... EBIDX%3AIT. Do you think you can make it work. Thank you again for the plugin.

SupahNoob
Posts: 21
Joined: Mon Jun 29, 2015 11:32 pm

Re: LimitlessLED / Mi-Light Plugin

Post by SupahNoob » Fri Nov 27, 2015 8:11 pm

Does this look like your WiFi bridge that you purchased with the lightbulb? Currently, the plugin doesn't control Dual White bulbs, only the RGBW bulbs.. the bulb you listed is compatible with my plugin, as it is the RGBW version, and MiLight, LimitlessLED, LEDENET, and the other website variants all use the same controller, with the same RF protocols. I don't have any of the Dual White bulbs, but I can integrate them into this plugin, it just comes down to execution, and I have not decided on how I want to do this yet. Some things to think about .. I would like to hear your opinion.

- Should you be able to control bulbs in groups, regardless of protocol? (RGBW vs Dual White)
That is, control group1, regardless of the protocol being unable to discern the bulbs from each other.

- Should you be able to control bulbs by classification? (RGBW vs Dual White)
That is, control group1 and turn on ONLY RGBWs, leaving the Dual Whites alone.. and vice-versa

- Should you be able to specify in the Plugin Configuration page which type of bulbs you have? What happens when you decide to purchase an RGBW bulb?

tallguyjv
Posts: 2
Joined: Wed Oct 28, 2015 8:17 pm

Re: LimitlessLED / Mi-Light Plugin

Post by tallguyjv » Wed Mar 30, 2016 4:45 pm

SupahNoob wrote:Does this look like your WiFi bridge that you purchased with the lightbulb? Currently, the plugin doesn't control Dual White bulbs, only the RGBW bulbs.. the bulb you listed is compatible with my plugin, as it is the RGBW version, and MiLight, LimitlessLED, LEDENET, and the other website variants all use the same controller, with the same RF protocols. I don't have any of the Dual White bulbs, but I can integrate them into this plugin, it just comes down to execution, and I have not decided on how I want to do this yet. Some things to think about .. I would like to hear your opinion.

- Should you be able to control bulbs in groups, regardless of protocol? (RGBW vs Dual White)
That is, control group1, regardless of the protocol being unable to discern the bulbs from each other.

- Should you be able to control bulbs by classification? (RGBW vs Dual White)
That is, control group1 and turn on ONLY RGBWs, leaving the Dual Whites alone.. and vice-versa

- Should you be able to specify in the Plugin Configuration page which type of bulbs you have? What happens when you decide to purchase an RGBW bulb?
They should have separate groups. This is how it works with the remote and any further naming or grouping could happen within eventghost itself. You second bullet sounds like the most strait forward configuration.

Post Reply