LIFX Developer Zone

Alexa not cooperating

Hi,
I’m having some difficulty with my Echos when using LIFX devices.
It seems that certain devices will always turn on to defaults that I have never set, even when I change the color and brightness, then turn them off and ask Alexa to turn them on again. For example, I usually have my kitchen under-cabinet LIFX-Z strips set to a white-orange at 100%. They are constantly turning on at something like 10% when I use the Alexa. I also have one single bulb out of the ten in my den that always turns on red.
Very annoying. Can anyone tell me how to fix this? I’ve already tried removing the offending devices from the Alexa app and re-adding them with no results.
Thanks in advance.

Hi,

That sounds strange!

Are you able to use the contact support option in the app to create a ticket?

Tell us which of your lights is the one that keeps turning on red. And also if you go to the “Alexa Privacy” section of the Settings page in the Alexa app, you can see what Alexa thinks you said at what times, the ones that relate to your lights will be useful to have. And what timezone you’re in will be helpful to correlate those times to our logs.

And then send me a private message with the ticket number and I’ll have a look.

Thanks

Out of pure laziness I am currently using the LIFX skill via various Echos throughout my house and I have to say, that out of GA, Alexa and Siri the first two are unpredictable at the best of times (HomeKit, other than voice recognition processing, doesn’t rely on the web and Siri in general seems to be a lot better with arbitrary request or changing your mind halfway through a request).

GA and Alexa get confused very easily if you’ve lots of devices with similar names even if the recording history indicates it heard you correctly.

I persist with Alexa because Amazon kinda got me hooked (damn you Bezos). Turns out, Echos are a cheap way to have an inter-room intercom system. A very, very, cheap way.

Then they had a special on Echo Shows which I swore I’d return but the the novelty of shopping on Amazon suddenly became part of my household’s daily workflow (again, damn you Bezos). But I digress.

Both VAs don’t seem to understand context and can’t complete concatenated requests since they take everything literally.

Words that sound similar, especially people’s names, Alexa and GA are terrible with . Neither cannot work out that even though it didn’t quite hear you correctly, if something is named “Lara” and you heard “Laura” and there’s no device called “Laura” then you should probably assume the person said “Lara” where as I have never had that problem with Siri.

Amazon has really specific words for each colour, including whites, which don’t match the names of the colours that the LIFX app uses in many cases. I think “Daylight” and “Warm” are the only two that are remotely the same (other than standard colours but even then there are stupid caveats like Alexa’s inability to set the colour “yellow”).

There also seems to be a bunch of unpublished reserved words that you shouldn’t name your devices if you want Google or Amazon devices to be consistent. Apple doesn’t let you name any object (device/room/group) in HomeKit using reserved words but not only do GA and Amazon let you create device names you can never actually activate Amazon, in all their wisdom, doesn’t disallow devices with identical names (!).

Basically, the OP’s experience is probably about what the average user should expect out of Alexa or Google Assistant. The only way to get a consistent experience, in my opinion, is not to use the LIFX skill.

When I said I was lazy, I meant that I haven’t deployed Home Assistant since I moved into a new house and it is painful.

HA provides numerous advantages over using the LIFX skill. Alexa is more likely to understand your request because you can directly configure the name of the thing you want to affect including colours (either directly or via an automation) and it doesn’t rely on the HTTP REST API (which Alexa would need to since Echos are basically a fancy API Gateway for anything other than BTLE and ZigBee).

Amazon’s IoT workflow does suck, don’t get me wrong, but LIFX’s web API is doing us no favours either.

v3.lifx.com is hosted on GCP (using Cloud Endpoints I assume?) but only in North America. If you’re in Australia, like myself, latency to that endpoint is 200ms on a good day.

~500ms bidirectional delay (request/response) to service a single API request is definitely going to lead to state inconsistency and is 100% my experience when my lights cannot be discovered via UDP (which used to be the case prior to reliably getting UDP broadcasts on 56700 to work between firewall zones without destroying the performance of my WiFi for every other client) or when I’m not on my LAN.

Point of note, I have 110 lights and ~200 wireless clients across four access points in a regular residential setting (double story town house). There are two adults and two kids under the age of 4 (so no devices of their own). I.e., I have a lot of connected stuff. Notwithstanding quantity, connected stuff is anything but smart and will act dumb if you rely on a voice assistant and/or an OEM’s REST API.

To LIFX’s credit, their Alexa skill is arguably the best of the bunch. That is definitely a compliment but let’s be honest, Amazon haven’t exactly enabled a high level of quality control within that ecosystem.

I also think the REST API is excellently documented and feature rich, but it sucks if you’re not in the US.

The state inconsistencies start occurring when I have >10 lights and progressively gets worse as that number increases.

Discretely changing a colour for a single light is next to impossible and the state in the Alexa app is almost always in conflict with the LIFX app (current v4 beta). I’ve witnessed the LIFX app reset the state of a light to whatever it was in the app when Alexa has actually changed it.

I’m not a developer but I’m very familiar with all the major public cloud provider’s API gateways and IoT workflows and if your API endpoint is nowhere near the client making the request, expect the UX to be horrendous.

Ultimately, there doesn’t seem to be a good way to maintain state if you rely on a state database that isn’t local to you and by local, I mean you host it, either via a vendor solution (like Apple HoneKit, Vera, Homey etc.,) or Home Assistant, Domictz, OpenHAB et al.

LIFX and Alexa constantly have issues with syncing state with Alexa eventually failing to set your request silently (I don’t know if the skill ever actually makes a request for the current state once a 200 OK has been received). Alexa can’t even get its state consistent across Echo devices that are on the same broadcast domain and that in turn can cause unexpected things to happen (like the state being different to what you had previously set it to).

Speaking from my personal experience and taking into account all of the above in terms of environment (and professional skill set), my view is that as your LIFX or other externally API driven device footprint grows, and those API endpoints aren’t lightning quick (50-150ms total request/response RTT), then you do what every platform encourages you to do and introduce routines/automations/scenes/IFTTT or other external API gateways to your everyday workflow, you’ll find out way before you reach 200 wireless clients that LIFX and other device OEMs can only do so much to help unless there is a drastic change in the way connected stuff collaborates.

Well that was a long post! I’ll see if I can address the main points you made.

So, firstly, our integration is an Alexa Smart Home Skill which means we never see what the user says. Alexa is responsible for matching what you say to a command that is sent to us that says “change this property to this value on this device”. I agree with you that it’s ability to do that can be disappointing. When I started at LIFX in early 2016 I would name my lights with human names (i.e. bob, james, matt, etc) but when I was tasked with rewriting the Alexa integration to use v2 of their API I quickly found out that Alexa failed to recognise those names and so I started naming them after rooms (i.e. kitchen, bathroom, loft, etc) so that it would understand what I was saying. I believe Alexa is a lot better now, but sometimes it can be frustrating, especially with an Australian accent!

As for the words that mean different kelvin values (shades of white), the same thing happens there where Alexa just gives us a kelvin value and we don’t get to see what words led to that value being chosen.

It is true that our Cloud is hosted in servers in America. This may change in the future, but I can’t promise any timeline of when/if we’ll get around to having servers in other countries instead of just America. I will say that given requests are going from Australia to the US and then back to Australia, it’s pretty incredible how quick it is in an absolute sense! (i.e. the technology that powers the internet itself is very cool). The good news is Google Assistant already does local control of lights if you’re using a physical google home. And I believe Alexa will have something similar soon.

110 lights is a lot of lights, and unfortunately our discovery mechanism (broadcast a special packet to the network) doesn’t scale very well. I personally don’t have enough knowledge around setting up a LAN network to offer any advice there.

So when you say state inconsistencies, do you mean your lights don’t change to the new value? The integration doesn’t store the current/new state of the device, it just sets to the new value when we get a command. The one exception to this is if you ask to make your lights brighter/warmer/cooler as we just get told how much to change brightness/kelvin by and so we ask our caching layer what the current value is. When we do that the system will first ask the device for it’s current value to increase the likelihood that the cache is correct, but with a very short timeout to make sure this doesn’t cause the request to take too long.

Just my 2p, I’ve been using Google Assistant with LIFX for a while now and it usually does what I want. I’m interested to hear GHs are now communicating locally with LIFX. It’s always been pretty snappy here but that’s a nice touch.

I also have a Samsung Smartthings system, and there are a couple of lights on that, but that tends to just be handy when running presets, as in: I can easily set up a preset in Smartthings for various lights and appliances and run the whole thing with "Hey Google, activate "

I find the GHs usually identify my lights pretty well. Again, named things like “Kitchen”, “Living Room”. I also really like that the GH knows which room it’s in, so “Turn on the lights” switches the lights in the room I’m in (caveat: “Turn off the lights” and “Turn off all the lights” do vastly different things when you’ve got more than a couple of smart bulbs :grimacing:)

Edit: also my 5 year old has discovered that saying “Turn the lights blue” is fun, but saying “Turn all the lights blue” is better. Thankfully she doesn’t know how to un-mute a GH yet!

1 Like