LIFX bulb UK work around

Continuing the discussion from IFTTT not working (OAuth issues for UK servers):

Thanks. Still will not work for me. I get the network id, setup a new device in IDE which adds and says it is active but in ST app there’s a ? over the device and the settings do not do anything.

1 Like

Are you sure you’ve used the 12 character ID which is in the equivalent position of the first line of the result example (“id”: “d3b2f2d97452”) here: http://api.developer.lifx.com/docs/list-lights ? There are other ones listed in the response too which relate to other things. Also, did you manually create the device via the IDE? Make sure you also select the customer device you created under “Type”.

I found the live logging page very handy for seeing any errors which may be occurring:
https://graph-eu01-euwest1.api.smartthings.com/ide/logs

You’ll need to be on the page while you try to interact with the device in your app. Watch out for any errors from the LIFX device, you can filter by device.

If want to send me a couple of screenshots I can have a quick look at your settings, the following should do:

  1. The page relating to your LIFX device if you click on it from here: https://graph-eu01-euwest1.api.smartthings.com/device/list
  2. The page on the app with the “?”
  3. Logging page output for device after you have tried to toggle the LIFX on and off.
1 Like

Thanks for helping.

The device type screen on IDE reads as follows:

LIFX Bulb LIFX Color Bulb Flat 4 Home Hub d073d5009e97 INACTIVE 5 hours ago

and:

Name LIFX BYLB
Label
Type LIFX Color Bulb
Version Published
Device Network Id d073d5009e97
Status INACTIVE
Hub Home Hub
Last Activity At 2015-11-01 11:48 AM GMT
Date Created 2015-11-01 11:38 AM GMT
Last Updated 2015-11-01 11:38 AM GMT
Data No data found for device
Current States No states found
Events List Events
In Use By

Log when I try to turn the bulb on:

2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: error java.lang.NullPointerException: Cannot invoke method apiGET() on null object @ line 183
2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: debug Executing ‘poll’ for LIFX BYLB script14462537021931168588872@23cd6f3 d073d5009e97
2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: debug Executing 'refresh’
2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: error java.lang.NullPointerException: Cannot invoke method apiGET() on null object @ line 183
2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: debug Executing ‘poll’ for LIFX BYLB script14462537021931168588872@23cd6f3 d073d5009e97
2d4904ab-2988-4941-95dc-6f75d6d45f53 16:59:05 GMT: debug Executing 'refresh’
78ae8e7e-a2b2-469a-8049-10ded7cf6d64 16:59:00 GMT: debug Parse returned Duran’s iPhone has arrived

I’ll attach a screenshot of the app in a second post shortly.

Make sure you are creating a device of the device type that you added manually, which in my case is’ LIFX Bulb’ near the end of the list of devices, and then select the ‘Self-Published’ version to pick up your edited version of the code that contains your API key. I think you are mistakenly creating a ‘LIFX Color Bulb’ which is a different device type.

1 Like

I concur with @xAPPO and suspect your issue is caused by the incorrect device type being selected. You should be able to change it as @xAPPO suggested and it will likely work.

Amazing thank you so much that worked. Very happy indeed. Now just to fix my keypad which doesn’t work :frowning:

1 Like

When I create a custom smartapp from the code provided by @ian1 I am receiving the following error message when I try and hit save within the IDE:-
“groovy.lang.MissingMethodException: No signature of method: script1446920015985112640424.metadata() is applicable for argument types: (script1446920015985112640424$_run_closure1) values: [script1446920015985112640424$_run_closure1@383396d2]
Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)”

So to be clear - I have followed these steps:-

  1. Create a new SmartApp from code - and pasted the code exactly as @ian1 said.
  2. I inserted my LIFX API key from the LIFX website
  3. Try to hit save and I get the above error.

Any ideas? Do I need to create the custom device first or something?

cheers Will

@DRoss - I am getting exactly the same problem as you with exactly the same output. What “Type” did you select? I have selected LIFX Color Bulb as that is exactly what it is. @xAPPO mentioned creating a device of the device type type that had been added manually - in his case “LIFX Bulb” I cannot see that device type.

Any chance you could help me - most appreciated!

@Will_Hogg, you will need to make sure the device type “LIFX Bulb” is selected not “LIFX Color Bulb” as the latter is the default one which will not work. “LIFX Bulb” is the custom device type which you will need to create beforehand.

Regarding the error you are experiencing, you should be creating a Device Type not SmartApp. This could be what is going wrong, with the method I suggested you only need to create a new device type and there is no need to create a SmartApp.

1 Like

Thanks so much @ian1. If there is a level of coder a few notches back from “Novice” that is me!

Thanks again mate!

1 Like

No worries Will, glad you’re sorted.

2 Likes

Hi ian1,

I wanted to see if you ever managed to get this working fro LIFX groups? I can’t seem to do it!

Obviously, it’s not totally necessary as we can just add each bulb individually, however then Smartthings turns them on in sequence and it’s not that aesthetically pleasing as having the whole group fade on in unison!

Let me know if you had any luck here,

Been offline for a couple of days with home network problems so have just got everything up and running again.

Just updated app to 2.0.6. Seems OK although it has crashed a few times but seems to be settling.

Best bit is all my Lifx bulbs have appeared in marketplace, so have been able to link SmartThings to my Lifx account.

So sitting happy linking control of my Lifx bulbs to SmartThings.

Oh happy days !!!

Thanks SmartThings this is the one I have been waiting for.

yeah looks like official support for uk lifx has been put back in the app noticed myself yesterday

Just picked up a LIFX and just discovered this issue with the U.K. version is still present.

Can someone be kind enough to provide step by step for the workaround for a complete newbie?

Thanks