LiFX new SDK

Same over here, i even deleted and readdded the lights, no love. I wish there was a way to control them w/o the cloud.

Think i found the issue, they renewed their SSL certificate today, the new certificate is allocated to *.lifx.com
Perhaps ST doesnt like a wildcard cert? Not sure if the previous cert was api.lifx.com or *.lifx.com

If it was a simple renewal, perhaps its just a timezone issue and the new cert isnt active yet

Perhaps @zzarbi may know how to make the ST app not worry about the SSL hostname?

___exception: javax.net.ssl.SSLException: hostname in certificate didn't match: <api.lifx.com> != <*.lifx.co> OR <*.lifx.co> OR <lifx.co>

I updated the code about 3 hours ago. I change the URL to lifx.co instead of lifx.com
I don’t know why i see the correct certificate but smarthings doesn’t… it might be timezone issue.

@icepicknz In PHP i know how to bypass ssl verification, in groovy however I didn’t find a way

Tried that it didnt work, also copied all the code and replaced the code I had and saved and published; no change?
Is yours now working?

This seams similar to the netamo issue that @Dianoga fixed. You might to PM him to see how he fixed it.

Mine is working, I’m not sure what’s happening here.

Oh and I started integration of Groups:

It’s mostly working and kinda acting as “one” bulb so everything you can do with one bulb you can do with one group… However the syncing between group and bulb might be delayed a bit. What this mean is, if you turn a group on, it will turn the lights on however their respective device on Smartthings won’t be on until, the poll request get call which happen every 5 minutes. The syncing is a bit more complicated…

If you guys have some feedback that would be great also I was thinking of integrating scenes but I’m not sure how yet.

3 Likes

Excellent @zzarbi groups is something i was keen on; have you had any luck talking to the lights direct through the hub rather than cloud? i.e. LAN

I been tweeting to lifx and smartthings. Lifx made a change not supported by smartthings. They have reverted the certificate back to cloud flare so things may break again @zzarbi

Oh yeah it was an outage on their part http://status.lifx.com they seem to have fixed it.
@icepicknz There is no way to control them via the LAN, the protocol used by LIFX is a bit complicated and the HUB can’t handle it… At least not this version of the hub.

1 Like

Updated the code… put it back to lifx.com

thanks for your effort on this. I’m keen to get groups in… right now all my lights that are in a group turn on and off individually… which is fine but i’m guessing groups does it all at once when using it via smartthings.

I’m also guessing I cannot delete the existing devices (bulbs) as i use them in my lights and switches etc so i’d have to update all my rules - not the end of the world and it will be neater. i ask as if i add groups then it’s a bit of a duplicate of devices.

Groups work. But for some reason when using them In a light rule (motion ) they are turning red. Wife wasn’t happy haha. I turned it back to bulbs instead of groups on the light switch rules and they no longer turn red.

@zzarbi i assume your grouped lifx lights don’t turn red when switching them via the group device?

@joel_eggenhuize The group device has the same functionality than the bulb device

weird as my bulbs turn red when turning them on and off via the group but not via the bulb.

@joel_eggenhuize oh yeah! When setting colors on a group the bulb turn on automatically… But the bulb it self doesn’t because I didn’t set it up that way.

but i’m only toggling the group on off as a single “thing”. and it is turning red. I’m not setting it red via the color wheel.

@zzarbi is there any way that the app can read when the light is unreachable? I know that when status is 200 is “ok”, and when status is 408 is “unreachable”, but i have no idea how to code it i have almost zero experience in programing, sorry if my question is too basic.

Regards