Page 1 of 1

Plugin for LIFX Wifi lights

Posted: Mon Nov 30, 2015 11:31 am
by mlinnen
I am new to OSA and I have not written any plugins yet. But I was wondering if anyone has written or thought of writing a plugin for the LIFX lights ( I have two of these lights and I have written some C# code to use the Alljoyn platform ( to control them. I know LIFX supports an HTTP protocol as well.

I am thinking of starting with a plugin that just does the HTTP protocol just to get started. This will be a lot simpler than the Alljoyn approach as that protocol is a lot more powerful but it is also more complex.

In any case has anyone attempted a plugin to control LIFX bulbs?


Re: Plugin for LIFX Wifi lights

Posted: Mon Nov 30, 2015 11:44 am
by Vaughn
No on the specific bulbs. An Alljoyn plugin would be awesome, as new Insteon products all support it also. I was some Alljoyn sample code for Windows IoT on Raspberry Pi 2. Their sample code just sent commands from a cloud type web site, and nothing on the PC side. So it is doable, practical and needed, but I had to put it on the back burner working on core issues.

Also there are a few techs out there like that, PubHub is another that I started writing a plugin for, but again got pulled of to work on the 047 version of OSA.

If you find sample code for Alljoyn in C#, or an API/dll that you think you can handle, I can help by starting the plugin, getting it in the repository, and then help build the object_types in OSA to hold any settings or info that the plugin needs, etc. Then you can work on the code for the methods that OSA sends, and pass them on to the Alljoyn backend, and the listener for Alljoyn messages, which then send very simple api commands to OSA.

Let me know if you are interested.


Re: Plugin for LIFX Wifi lights

Posted: Mon Nov 30, 2015 7:44 pm
by mlinnen
I have some experience doing Alljoyn with the Raspberry Pi 2 running Win 10 IoT. Basically a UWP app that can send lamp state changes and receive the state changes via Alljoyn. I am not sure if I have enough experience with the platform to make a generic Alljoyn plugin that can do all things, but I am sure I can at least work on a plugin that handles some aspect of the Allseen Lighting Service Framework (LSF): ... g#projects

I have some code working on the UWP app that hits the Lamp Service directly and I also have some code that hits the Lighting Controller Service. The Lighting Controller Service basically allows you to control all lights that implement the Lamp Service and allows you to define presets, groups and scenes. I just don't know how well that will translate into OSA. Some of the Lighting Controller Service functions seem to overlap with some of the OSA capabilities. Also at least one Lighting Controller Service has to be running on the network which means the OSA plugin would be dependent on it.

I think my best bet is to create an OSA plugin that goes against the Lamp Service directly as that is embedded in the LIFX bulbs (and any future bulb that is created that supports LSF). This will still give the end user the ability to have full control over the bulb and the high level functions like presets, grouping and scenes can still be managed in OSA with scripting. The Lamp Service definition is fully described here: ... nition.pdf. I think the LampDetails and LampState interfaces would be all that is needed.

So ya I am interested.