LIFX Plugin

[quote=“Majimus, post:60, topic:199073”][quote=“jeubanks, post:59, topic:199073”]Just a note. I’m seeing this in my log and the category/sub-category are not set.

01 06/16/18 13:30:10.169 LuaInterface::CallFunction_Startup-1 device 39 function startupMajimusLifx failed [string “–[[…”]:1090: attempt to concatenate local ‘cat’ (a nil value)

{ "name": "Floor Lamp", "altid": "id:d073d5274ee6", "id": 40, "category": 0, "subcategory": -1, "room": 0, "parent": 39, "status": "1", "level": "100" }, { "name": "Room", "altid": "group_id:084cfbc0981bba7ab07a2d73e97cb533", "id": 42, "category": 0, "subcategory": -1, "room": 0, "parent": 39, "status": "1", "level": "100" }, { "name": "Small Lamp", "altid": "id:d073d52876a5", "id": 41, "category": 0, "subcategory": -1, "room": 0, "parent": 39, "status": "1", "level": "100" },[/quote]

There we go, that is definitely a bug…a strange one (arguably not a result of sloppy coding). I suspect you have some other underlying issues on your vera, orphaned devices perhaps?

Thanks…

EDIT: This sort of thing should not have happened, but life’s like that. So for anyone else out there reading this…if 1.1 works for you then you just keep going, 1.2 should also work for you. Anyone else with issues please roll back and wait for 1.3[/quote]

BTW it left my vera unit in a bad state until I removed the plugin. After removing and reloading luup things started being “normal” again… normal for vera. I’ve seen this behavior with actual devices as well when Vera doesn’t pair/load the device correctly.

This is a test unit and only has a handful of devices, but because I’m taking things in and out a lot it could be residual “junk”.

With all that, probably not an app issue but problems on my Vera. But just in case I thought you might be interested.

Yay.

I have been waiting sooo long for someone to expand the LiFX plugin to use LAN Control… I’m so happy to even have the 1.0 release! Thank you, thank you, thank you! 8) 8) 8) 8)

Version 1.3 available now.

Just installed 1.3 and am happy to report that everything works.
Thanks again Majimus

I’ve been playing around with this plugin a lot, it’s working really well for me since 1.3. Is there a way that I can set the colour to a kelvin temperature though? I’ve tried messing about with the SetColor, SetColorRGB, and SetColorTemp but no joy (in the advanced scene builder). SetColorRGB seems to be the only one that works at all.

I also tried calling the script from the Luup portion of the scene but there doesn’t seem to be a way that I can use that without changing the state of the lights (I want to keep them all on the same colour temp but not turn ones on that aren’t on). I also couldn’t see to get “kelvin:5000” to work in that in the colour position anyway even though the LIFX Docs seem to indicate that’s the way to do it.

Is setting a Kelvin possible? If not is there a workaround such as reading the value when it is at the right setting and then calling that RGB colour in the scene?

[quote=“MelbourneChris, post:65, topic:199073”]I’ve been playing around with this plugin a lot, it’s working really well for me since 1.3. Is there a way that I can set the colour to a kelvin temperature though? I’ve tried messing about with the SetColor, SetColorRGB, and SetColorTemp but no joy (in the advanced scene builder). SetColorRGB seems to be the only one that works at all.

I also tried calling the script from the Luup portion of the scene but there doesn’t seem to be a way that I can use that without changing the state of the lights (I want to keep them all on the same colour temp but not turn ones on that aren’t on). I also couldn’t see to get “kelvin:5000” to work in that in the colour position anyway even though the LIFX Docs seem to indicate that’s the way to do it.

Is setting a Kelvin possible? If not is there a workaround such as reading the value when it is at the right setting and then calling that RGB colour in the scene?[/quote]

HSBK is on the TODO list…at this time only RBG is supported.

Thanks for the update to the categories. The devices are not automatically detected and controllable through the interface I’m building.

The latest plugin version installed and is working great.

[quote=“MelbourneChris, post:65, topic:199073”]I’ve been playing around with this plugin a lot, it’s working really well for me since 1.3. Is there a way that I can set the colour to a kelvin temperature though? I’ve tried messing about with the SetColor, SetColorRGB, and SetColorTemp but no joy (in the advanced scene builder). SetColorRGB seems to be the only one that works at all.

I also tried calling the script from the Luup portion of the scene but there doesn’t seem to be a way that I can use that without changing the state of the lights (I want to keep them all on the same colour temp but not turn ones on that aren’t on). I also couldn’t see to get “kelvin:5000” to work in that in the colour position anyway even though the LIFX Docs seem to indicate that’s the way to do it.

Is setting a Kelvin possible? If not is there a workaround such as reading the value when it is at the right setting and then calling that RGB colour in the scene?[/quote]

In version 1.4 use SetColorTemp and the value is the numeric kelvin value within 2500-9000, I’ve also changed the UI controls(device_json is now “D_DimmableRGBLight1.json”) but that may not reflect in existing devices (bulbs and groups only), feel free to change it if you wish/dare.

SetColor is used by the sliders and has it’s own esoteric format so once again…use SetColorTemp.

EDIT: No, there still is no getColor at this time.

Hi Majimus,
I was just wondering if you could shed some light on something I’ve been looking at recently. Still enjoying this fantastic plugin – though I noticed that sometimes when I pulse the lights as a notification with a script, they stay on and often times with altered brightness and color settings. Anyway, that is not the reason I’m posting today.
I purchased an Aeotec Wallmote Quad several months ago and had some initial difficulties pairing the device to my Vera. Finally it seems that it is functioning as it should (knock on wood). Now that it’s working, I’ve been looking at its ability to employ “Multi-channel associations” with supported devices. Observing the instructional page here: Using WallMote Quad with Vera UI7 (Group Association / Direct Control). : Aeotec Help Desk ,
I notice that there are checkboxes in the list for an "LED Strip, as well as a “Colored Light Bulb”.
I’m wondering if there is something that could be adjusted in the plugin that would allow our LIFX bulbs and groups as an option (as a dimmer switch possibly?), or is this just not possible with the LIFX hardware?
Reading the same instructions I can see at the top:

What is a Group Association?
A Group Association is a specific function in Z-Wave that allows you to tell the Wallmote who it can speak to. Some devices may only have 1 group association meant for the gateway, or multiple group associations that can be used for specific events. This type of function isn’t used too often, but when it is available, you may be able to use it to directly communicate to Z-Wave devices instead of controlling a scene within a gateway which can have unforeseen delays.
Vera has the ability to set Group Associations to devices that have these special events and functions. In Wallmotes case, it can speak directly to the devices it is associated to for directly toggling On/Off/Dim controls without communicating to Vera, then have Vera relay the command to the Z-Wave devices.
For example:
Using Group associations will talk directly to a Z-Wave device, this will process less than 1 second usually within 10-100ms.
Triggering a scene, a device will need to update its status to your gateway, then have the gateway process the status update then send an action or change to a Z-Wave device based on the trigger. Sometimes there may be delays if your gateway is already processing other data which can cause 1-2 second delays from time to time.

So I’m thinking maybe it’s impossible to use this feature unless it’s a Zwave device, but maybe there is some way to spoof that in the plugin so that the Vera considers the LIFX a Zwave device and relays the command after getting the trigger from the Wallmote? I’m really just after the “swipe to dim/brighten” features.
Bit of a long-shot, but I’d figure I’d run it by you in case the answer is obvious to you. Thanks in advance!

I don’t think there is any way for your Quad to talk directly to the lights.

Majimus

No, I mean send the command to the Vera as a group (scene?) association and then intercept that with the plugin and relay the appropriate message to the lights/group for on/off control as well as dimming/brightening.

Based of my understanding of this, there won’t be any messages to intercept since the quad will talk to the devices directly.

Ok, I think I understand a bit better now. The way they have it worded in the document (where I’ve made the font bold) sounded as if it was possible. It almost seems as if you could have a dummy Zwave switch that you associate it to and then use that to trigger light changes. Oh well, guess I’ll have to figure something else out.
Thanks for your replies.

Would you (or someone else) be able to help me out with the Lua needed to flash (or “pulse”) my lights with different colors in quick succession? So far I use multiple pulses of several different colors to notify me of different events (eg.- 5 long red pulses for the doorbell, 10 really quick orange pulses for a certain motion sensor). The problem is that I can foresee myself running out of colors for notifications, and not only that, some colors are a little difficult to differentiate when the lights are only in my peripheral vision. What I’d like to do is do something like pulse red, blue, green, purple and repeat a couple of times, all in one script. How can I accomplish this?
Thanks!

Still hoping for some advice on this. ???
I’ve tried this script:

lifx_ctrl(“group:Bedroom”,“pulse”,“yellow”,1,1,2)
lifx_ctrl(“group:Bedroom”,“pulse”,“purple”,1,1,2)

but the results are not reliable. What am I missing here? Any help would be appreciated. Thanks

[quote=“Quixote, post:75, topic:199073”]Still hoping for some advice on this. ???
I’ve tried this script:

lifx_ctrl(“group:Bedroom”,“pulse”,“yellow”,1,1,2)
lifx_ctrl(“group:Bedroom”,“pulse”,“purple”,1,1,2)

but the results are not reliable. What am I missing here? Any help would be appreciated. Thanks[/quote]

I’ve been pretty busy lately… Will try to take a look this week.

When trying to change color using PLEG and the LiFX Plugin 1.4, I’m getting this error when using the SetColorRGB command:

LuaInterface::CallFunction_Job device 77 function SColor1_Color1_SetColorRGB_run failed [string “–[[…”]:668: attempt to concatenate local ‘value’ (a table value) <0x716fe520>

I’m using the USE LOCAL=true setting

Can you assist please?

Thanks for your work on this plugin! Much appreciated!

Does this happen all the time? Sporadic? This sort of thing may happen under some error conditions, I will post an update (1.5) that will better handle those scenarios.

I can’t even edit the first post to update the version history…fancy new forum, less functional…argh /rant

It happens every time I try to run it from within PLEG using various colours (white/yellow/red/blue). I’ve played around a little but bit don’t appear to have the knowledge/skills to get it to work from the Vera Test Luup Code area.

Instead of white etc can you try something like “0,255,0”. Once this works you can take it from there, that is the way you specify the RGB color.

I’ve pushed an update to get rid of the error, but ultimately you need to make the call with your colors specified in the above mentioned manner.

This new forum really sucks…argh / rant