Now I am going to talk about how LIFXcl works, then how LIFXtend works.
LIFXcl
First, the command must reach the gateways. If you don't specify a gateway, the command is broadcast to all devices on your network ("255.255.255.255"). This usually works fine, however some routers might block this communication, which is why I added the ability to specify a Gateway.
So now the command is at the gateway. The gateway will relay the command to the other bulbs as long as the site defined in the command is the same as the bulbs site. When a command is issued by LIFXcl with only the "Site" given, the target will be declared as "FF-FF-FF-FF-FF-FF" which means "everyone" or broadcast. Your gateway bulbs will communicate this command to the pan, and all your bulbs will do what you broadcast.
If you define a target mac address however, it will only be executed by that specific bulb.
LIFXtend
First I told you the bulbs don't react if a site is not defined. That's not true all the times. They react to "Get Pan gateway", which is there to find the gateways and the site. So the first thing LIFXtend does when you press "Discover" is issue this command. All gateway bulbs will answer and tell their site and their mac_address.
Next, we can broadcast "Get light state" to our new found site. Then, all of your bulbs will answer, and your list of bulbs will get populated. From there on we can issue commands to the individual bulbs via their own gateway, which is a much smoother way than just broadcasting all the time. The rest is just some update calls from time to time to check if the bulbs behave and if they are still all online. You can even disconnect a gateway bulb, LIFXtend will find another way after 10-20 seconds. (Actually the LIFX Network itself finds another way, the bulbs are pretty clever in that regard).
More information about the packets: https://github.com/magicmonkey/lifxjs/blob/master/Protocol.md#0x66
Sunday, February 2. 2014
LIFX Network Part Two
Solution 2: Control your LIFX Bulbs with a remote control (or any button on your keyboard)
This is by Mark Howard:
Sounds like I need to buy a remote
I have a HTPC which runs 24/7 and is connected to the TV via HDMI. Within my pc I have an MCE receiver, and I use a Logitech Harmony remote programmed with MCE commands. At a basic level the MCE remote is a bit like a keyboard. By that I mean digit '1' is number '1' on the keyboard, if you had notepad open and it had focus, pressing 1 on the remote would type 1 in notepad.
To get this working I installed EventGhost (http://www.eventghost.org) and setup 'keyboard' as an input. I then created a macro called 'on' using the 'Start Application' module. The application to start is obviously lifxcl.exe. I then added an event which is the keyboard press for '1'.
Now every time 1 is pressed eventghost runs the macro.
As I said its a bit dirty, i.e. if I was writing this email on the HTPC my lights would have been going on and off like crazy, but I only use the HTPC for watching TV and I don't use the number digit pad at all so this works for me.
I know from past experience eventghost can pick up custom ir codes, so if you wanted to you could separate the MCE codes and use another remote \ set of commands.
Sounds like I need to buy a remote
Create a Scheduled Setting with LIFXcl in Windows
I am receiving new feedback from users of LIFXcl and LIFXtend daily. I will post some of their solutions here, their findings might as well help others.
This describes a way to gives specific commands to your bulbs automatically at specific times.
This solution is by Greg Sax:
Note (by Nate):
I don't have time to try it, but I guess you could also just in the "Edit Action" menu browse for the LIFXcl.exe, and under "Add arguments" enter all the arguments for example "off D0-73-D5-00-98-18 D0-73-D5-00-98-18".
However by using a .bat, you can execute multiple commands one after the other.
This describes a way to gives specific commands to your bulbs automatically at specific times.
This solution is by Greg Sax:
I used the Start in (optional) field in the Action section of Task Scheduler. After this was working I did some tinkering and figured I could combine the commands into one .bat file and the /C to close the window after running. It all works now so have set up the lights to turn off on a schedule.
StairLightOff.bat
start "c:\windows\system32" cmd.exe /C
start "D:_Downloads\Home Automation" LIFXcl.exe off D0-73-D5-00-98-18 D0-73-D5-00-98-18
Note (by Nate):
I don't have time to try it, but I guess you could also just in the "Edit Action" menu browse for the LIFXcl.exe, and under "Add arguments" enter all the arguments for example "off D0-73-D5-00-98-18 D0-73-D5-00-98-18".
However by using a .bat, you can execute multiple commands one after the other.
« previous page
(Page 3 of 3, totaling 9 entries)