LIFX Developer Zone

4sec delay with motion sensors?

#1

Has anyone had any problems with Lifx lights turning on after motion is detected (Xiaomi motion detecors)?
I have been testing some downlights and via the app they seem to turn on right away but with motion there is a real noticible delay of about 4 seconds. I do not think it is the motion detection as I watch the log and can see it picks up motion quick and there are also Hue and Seglend lights with these detectors and they both come on with no problems.

The hub I am using for this is Hubitat, with Google WiFi and the lights are only about 10 M away in the room down the hallway.

0 Likes

#2

The reason the LIFX bulbs are slower to react than the Hue/Sengled ones is because Hubitat has a direct link (Zigbee) to either the bulbs or the Hue Bridge (depending on how you’re set up) and a cloud link to LIFX.

I came across a similar issue with SmartThings, although my delay wasn’t as severe as yours. My solution was to spin up my own local server running LifxLAN and make calls to that instead (in WebCore). Dropped my response times down from ~2 seconds to under .5 seconds.

0 Likes

#3

Thanks for that mate. Was there any particular document or guide followed to set that up? Sounds like what I will have to do, was it pretty complicated to set up?

0 Likes

#4

Err, I didn’t think so, but I’m a software developer :wink:

repo is here:

Ignore the stuff about Arduinos. You want a WebCore rule that looks something like this:

Mine is using the Scene Control command from a Fibaro S2 at the moment, so yours can be much simpler

0 Likes

#5

So would this be a simpler approach? As I do not have much coding knowledge :stuck_out_tongue:
https://github.com/frakman1/lifx-lan-gui/releases

Or I watched a few youtube videos on getting started with Python, so I installed it and set it. Worked out that having 2.7.0 is important as I was getting a few errors so uninstalled 3.7 and put 2.7 on and some of the errors got fixed but there is one I am not sure of.

ImportError: No module named apscheduler.schedulers.background

0 Likes

#6

Never mind got it installed and set up (after a lot of youtube videos :stuck_out_tongue: ) but now my motion sensors are acting up but will test it tomorrow and see. Thanks for the guide/help!

0 Likes

#7

So every thing seems to be working no errors or anything like that but the lights just do not turn on. Is there anything can see in these logs that stands out where I might of messed up?
1 3 2

0 Likes

#8

Good work!

It looks like you’re sending a POST request, but you’re not including the parameters for which light, and what to do with it.

Mine is set up like this:

I’m using mac and ip here, but you could also just use light with the name of the light.

I’m actually just working on improving the server to enable group handling this evening. Give me a shout if you’d like the updated version

0 Likes

#9

I’m hoping to release a beta of my LIFX Lan Protocol driver for Hubitat sometime this week or at least during February.

0 Likes