LIFX Plugin

[quote=“jeubanks, post:40, topic:199073”][quote=“Majimus, post:39, topic:199073”][quote=“jeubanks, post:38, topic:199073”]This is a cool plugin. Can I ask one thing. Can you set the Category for the LIFX bulbs as Category 2 which is the Mios standard for Dimmable.

Thanks![/quote]

Can you please expand a bit as to the reason for this request?[/quote]

When interfacing with Vera through the web api it reduces the amount of parsing necessary for device control. A LIFX bulb supports all the standard functions of a dimmable light (category 2) so if it’s registered as a category 2 it’s “auto” controllable. However registering as a “-1” then it has to be parsed out and “guessed” that it is a bulb or not a bulb as other plugins use the “-1” as well.

Example the two Hue plugins (mios and AltHue) both register as category 2 as dimmable which makes them immediately usable by external interfaces (dashboards…)[/quote]

Will push out an update.

[quote=“Majimus, post:41, topic:199073”][quote=“jeubanks, post:40, topic:199073”][quote=“Majimus, post:39, topic:199073”][quote=“jeubanks, post:38, topic:199073”]This is a cool plugin. Can I ask one thing. Can you set the Category for the LIFX bulbs as Category 2 which is the Mios standard for Dimmable.

Thanks![/quote]

Can you please expand a bit as to the reason for this request?[/quote]

When interfacing with Vera through the web api it reduces the amount of parsing necessary for device control. A LIFX bulb supports all the standard functions of a dimmable light (category 2) so if it’s registered as a category 2 it’s “auto” controllable. However registering as a “-1” then it has to be parsed out and “guessed” that it is a bulb or not a bulb as other plugins use the “-1” as well.

Example the two Hue plugins (mios and AltHue) both register as category 2 as dimmable which makes them immediately usable by external interfaces (dashboards…)[/quote]

Will push out an update.[/quote]

Cool. Thanks. That will make integrating much easier. Currently adding them adds the root device (controller) with the same settings as the bulbs… funny the controller getting a dim slider next to it when it doesn’t use it.

[quote=“jeubanks, post:42, topic:199073”][quote=“Majimus, post:41, topic:199073”][quote=“jeubanks, post:40, topic:199073”][quote=“Majimus, post:39, topic:199073”][quote=“jeubanks, post:38, topic:199073”]This is a cool plugin. Can I ask one thing. Can you set the Category for the LIFX bulbs as Category 2 which is the Mios standard for Dimmable.

Thanks![/quote]

Can you please expand a bit as to the reason for this request?[/quote]

When interfacing with Vera through the web api it reduces the amount of parsing necessary for device control. A LIFX bulb supports all the standard functions of a dimmable light (category 2) so if it’s registered as a category 2 it’s “auto” controllable. However registering as a “-1” then it has to be parsed out and “guessed” that it is a bulb or not a bulb as other plugins use the “-1” as well.

Example the two Hue plugins (mios and AltHue) both register as category 2 as dimmable which makes them immediately usable by external interfaces (dashboards…)[/quote]

Will push out an update.[/quote]

Cool. Thanks. That will make integrating much easier. Currently adding them adds the root device (controller) with the same settings as the bulbs… funny the controller getting a dim slider next to it when it doesn’t use it.[/quote]

There are some strange going on’s with the UI lately (after last update), but I have not changed anything…will have to sit down and have a good look.

That last update has messed up a LOT of stuff…

All fresh installs after the latest update:

Lutron RadioRA2 plugin is not working on fresh install (been working with support the last 2 days and still not working)

The Harmony Hub plugin was not working

LIFX (yours) working - cool

Both Hue plugins (Vera and AltHue) are working

Weird UI issues. I set Secure Mode on per support and then I couldn’t turn it off, the options were no longer available…just gone. Support had to disable it from being on the controller.

Just lots of weirdness. Great timing for me to be working on a plugin :slight_smile:

Hi Majimus
I have just updated to the latest version 1.1
Unfortunately my lights no longer work through the plugin. Do you know of this bug?
I have restarted the Vera Plus controller and removed one of the lights by unticking it and syncing then re adding it without success.
I have attached a txt file from the Vera log with what I think is the error.
Mark

[quote=“hollandr, post:45, topic:199073”]Hi Majimus
I have just updated to the latest version 1.1
Unfortunately my lights no longer work through the plugin. Do you know of this bug?
I have restarted the Vera Plus controller and removed one of the lights by unticking it and syncing then re adding it without success.
I have attached a txt file from the Vera log with what I think is the error.
Mark[/quote]

Hi,

I am not aware of a bug involving 1.1 AFAIK the changes made should not affect overall functionality in the event that something does go wrong. I’ve personally used this version for a while and I’ve been running version 1.2 which simply adds to 1.1 and have had no problems.

Have you done anything out of the ordinary? Maybe poked about a bit in the advanced settings section?

Majimus

Hi Majimus
I wish I could say that I had changed something at least it would be a potentially easy fix.
I haven’t changed anything for a fair while now. I did the update by logging in through the Vera website then choosing to update the ad on.
Is there a way to roll back to version 1.0?
Mark

[quote=“hollandr, post:47, topic:199073”]Hi Majimus
I wish I could say that I had changed something at least it would be a potentially easy fix.
I haven’t changed anything for a fair while now. I did the update by logging in through the Vera website then choosing to update the ad on.
Is there a way to roll back to version 1.0?
Mark[/quote]

An easy way would be a restore from backup on your vera, back to before you updated? There is another way to download specific versions from the app store that I am not familiar with (if you find that out then version 1.2 is up there as well and I have been using it with no issues).

You can also set “DEBUG” to 2 and then pm me the log so that I can take a quick look.

Majimus

Hi Majimus
I couldn’t work out how to pm you the log file so will attach it here.
I was trying to turn on the light called Mark’s Bedroom.
The log seems to be saying that the device isn’t ready, I am not sure if it means the app or the light, the light works through other apps and I have tried other lights with the same result.
Edit: I should point out that when I click on the light in the app the switch slider moves for half a second then returns to off, not sure if that helps or not.
Mark

[quote=“hollandr, post:49, topic:199073”]Hi Majimus
I couldn’t work out how to pm you the log file so will attach it here.
I was trying to turn on the light called Mark’s Bedroom.
The log seems to be saying that the device isn’t ready, I am not sure if it means the app or the light, the light works through other apps and I have tried other lights with the same result.
Edit: I should point out that when I click on the light in the app the switch slider moves for half a second then returns to off, not sure if that helps or not.
Mark[/quote]

Check the category_num and subcategory_num values for your lights, this is in the params tab of the advanced settings. They should be 2 and 4 respectively.

Sorry, I can’t see where you mean, I have attached a screen capture of what I see.
I have gone to Devices, Lifx Plugin then Advanced.
In the Device type I have: urn:schemas-majimus-com:device:LifxParent:1
Thanks again for you help so far

We are looking for the category and subcategory of the non working bulb, the light itself.

OK got you now, Still can’t find it though.
Attached is what I see when I go to the bulb then advanced.
The Device type field has: urn:schemas-majimus-com:device:LifxBulb:1

[quote=“hollandr, post:53, topic:199073”]OK got you now, Still can’t find it though.
Attached is what I see when I go to the bulb then advanced.
The Device type field has: urn:schemas-majimus-com:device:LifxBulb:1[/quote]

TOTAL EDIT: Your upgrade did happen, but some failures occurred apparently.

The parent device should have added the categories to all of the child devices. I will need to see the startup logs for the parent and I will try and decipher what is happening.

Going to downgrade to 1.1 and have a look.

EDIT: everything looks good with 1.1 on my end. Your logs do indicate you have a problem, and the lack of some parameters indicate that all is not well. Maybe a file corruption? I am at a loss…

Please try hitting the update button again in your apps section of vera to download the plugin again, if that fails I would try a restore from recent backup YMMV.

Just an update. I restored a backup from yesterday back to plugin version 1.0 and the light worked again. I upgraded again to 1.1 and it stopped working again. In the lights params I still don’t have sub category but I do have category numbers of 666 for all the lights.
Just wondering if I change this before upgrading do you think would it help?
I am happy to leave things for the time being as version 1.0 does everything I need and new firmware or new plug in version might fix this problem for me.
Thanks again for all the help, much appreciated.

The new version of the plugin should create the new parameters automatically you don’t have to change it yourself, and to be honest the new changes are mostly incremental improvements.

I need to get some sleep but would like to at least know why 1.1 fails for you, I used it for a while prior to releasing.

We can take this up later if you are up to it , send me a message with the logs from startup to attempting to turn on a light.

If anyone else has this issue do let us know then revert to backup and in that case I will pull 1.1

Thanks Majimus. I will try and get back to you within the next few days with complete logs.
Thanks again for the help and for the fantastic plugin

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=“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