Firmware idea: Better light switch functioniality

I just set up my bedroom + living room with LIFX bulbs. I’m enjoying the ability to adjust brightness + color cast throughout the day, but it comes with the cost of some awkwardness – I have to leave light switches in the ON position if I want app control of the bulbs. If someone needs a light off and doesn’t have an app device handy, the light switch goes off and the bulb becomes unavailable via network.

This is a common problem, I’m sure, and it’s preventing me from replacing all of the bulbs in my house with LIFX. My wife has only so much patience for my fiddling, and I wouldn’t put LIFX bulbs in rooms where guests are commonly operating the lights (bathroom, guest room, etc.) because they’re not going to learn how to use my lighting.

Here’s my proposed solution: Update firmware in the bulbs to detect quick cycles of ordinary light switches and use that to toggle on/off the LIFX bulbs.

How it currently works:

(Notation: [S-] Switch position, [L-] LIFX bulb illumination.)

[S-oN] : [L-oN]

[S-oFF] : [L-oFF]

[S-oN] : [L-oN]

Proposed solution:

[S-oN] : [L-oN]
[S-oFF] <1s [S-oN] : [L-oFF]
[S-oFF] <1s [S-oN] : [L-oN]

Basically, if the bulb detects that the it’s been powered off for less than a second, the bulb stays off when the light switch is turned back on. I like this because:

  • You can toggle the on/off state of the bulb with the light switch.
  • Even when the bulb is toggled off, it is still powered and connected to the network.
  • Works with ordinary home light switches.

I can’t think of any downsides, except faster wear on your light switches.

AND, for LIFX, you could market a new light switch that even more gracefully handles this toggle (basically a button that automatically returns to the “on” position when pressed), without requiring any new wiring in the home. I’d be interested in a few.

This seems like an interesting idea. Does anyone know if it is possible?

1 Like

One of the challenges with this method is that the current bulbs can’t figure out how long they have been off for. The Originals had a capacitor that would discharge, but it wasn’t entirely accurate either.

That said I’ve forwarded this to the right people inside LIFX. They’re always on the lookout for ways to make the bulbs easier to use.

1 Like

I figured that might be a limitation. An alternate implementation:

[S-oN] : [L-oN] … [S-oFF] : [L-oFF] … [S-oN] : [L-oFF]
[S-oN] : [L-oFF] … [S-oFF] : [L-oFF] … [S-oN] : [L-oN]

Essentially, every EVEN power cycle of the bulbs, they illuminate, and every ODD power cycle of the bulbs, they stay off. This behavior is essentially the same as previously suggested, but without the “less than 1s” condition.

The downside to this implementation: If the user is expecting the old behavior, where the light switch directly operates the bulb like a traditional bulb, then this behavior interferes, and in a manner that is confusing if it’s not expected. In my opinion, this implementation would best be implemented as a user-selectable option – users can opt into “alternate between illumination states,” or something hopefully more eloquent than that :slight_smile:

I don’t think this is a firmware issue or something you should expect from the bulb. The user experience of flicking a switch on and off is non-standard and would need to be explained to anyone that ever needed to operate that switch.

I am able to control some of my connected bulbs (not LIFX) via the Lutron Connected Bulb Remote, which can be mounted to the wall or in place of an in-wall switch.

Wink currently supports this remote and it enables me to control my bulb(s) from either the Wink app or the remote.

Problems here are that Wink doesn’t currently support LIFX and SmartThings doesn’t currently support the Lutron remote–though they are working on it.

I see 4 potential options.

  1. LIFX and Lutron start working together and a compatible switch/remote
  2. Wink starts supporting LIFX and you install a Wink hub
  3. SmartThings starts supporting the Lutron remote and you install a SmartThings hub
  4. You unwire the in-wall switch and put a flic next to it.

The proposed solution wouldn’t change the “standard” operation of a LIFX bulb with a light switch – if I had LIFX in a bathroom, and a guest went into the bathroom, they’d find (a) the light switch already on, even if the bulb wasn’t on, which is unchanged from current LIFX behavior, and would (b) have to turn the switch off and back on again to light the bathroom, which is also unchanged from current behavior. The guest would then turn the switch off when leaving the bathroom, and would not know to flick it back on again – no doubt, this is a learned behavior. But without the learning, the result is the same – the guest left the switch in the off position to turn off the lights.

I suggested earlier, too, that the proposed firmware update would enable LIFX to sell a dumb light switch that operates the bulb in a manner that both (a) requires no additional wiring and (b) requires no learning on behalf of the user. It could replace a standard light switch with a push-button switch, which is always ON in the un-pushed position, and OFF only when the button is depressed. The button could automatically return to the ON position when pressed, effectively toggling on/off the switch signal with a single press. It could also be very cheaply manufactured.

Essentially, something like this, but reverse operation and without the concept of a time-delay: Clipsal Push Button Time Delay Switch - 319 - Independent Living Centres Australia

No traction on this?

I’ve talked with a number of friends and coworkers and everyone agrees the biggest hurdle with wifi lightbulbs – Philips Hue included – is that they can’t be operated with a light switch without sacrificing wifi functionality.

Philips offers a couple of different smart light switches, but the Hue users I know are still not totally satisfied because (a) they require battery power, and (b) don’t replace existing switches.

I really think there’s something here to significantly improve the user experience with LIFX bulbs and give them another advantage over other wifi bulbs.

1 Like

Unfortunately we haven’t had a chance to look into this too much. we have got some beta firmwares out to change the white restore settings but the hardware is still a very limiting factor for any power driven light switch changes.

We have seen logitech and other companies bring out some nice low power buttons that can control our lights. Unfortunately I haven’t had a chance to play with them much yet.

The backup design isn’t as ideal, but wouldn’t require a hardware memory of the time between power-off/on. The lights just stay off every other power cycle, regardless of the time between.

(I think this implementation would have to be an opt-in feature, rather than a default.)

This feature can be done with the LAN Protocol and polling the bulbs for their up time. I have a prototype working and just tweaking some of the parameters right now.

Essentially, if your lights are on, you can power cycle once, the bulb will turn back on as it does normally, but once the wifi is re-established, it’ll turn off.

I can post the code if anyone is interested. I agree though that it should be supported in the firmware. The issue with my solution is that it needs to wait for the wifi connection and so the behaviour isn’t consistent. You also need to run your own daemon to do the polling.

Just use lamps. Leave the main lights as they are. works for me.

Try using Logictech POP switches. You can program groups of lights to respond to different taps, 1 short tap, 2 short taps, 1 long tap and release.

You can switch off with one tap, switch back on with one tap, or set a double tap to switch a different set or group of lights back on.

This leaves the LIFX bulbs “online”, but overrides the schedule allowing someone else to power on or power off the light on demand without flipping the power switch.

I use several, each with 3 different groups or “scenes”.

I think the main idea of this thread is how to toggle the lifx bulb without purchasing additional hardware. The bulbs are already connected to the existing wall switch, so why not use it?

1 Like

This may be true, however, sometimes it is easier to spend a few dollars and get a solution that works for the family situation when the alternative gets too complex.

I have tried multiple ways to bypass adding extra hardware, but having people revert to switching off the LIFX bulbs is a greater waste of the cost of acquisition of bulbs and value to the LIFX system.

Everyone is different. For some people using the switch is fine, usually just the one person.
When you have a number of people never underestimate the human ability to not give a sh#@ and demand the most simple thing or not care.

So far the most simple thing I have found is Pop but it has its own issues (detecting all bulbs isn’t happening)

Whoa, that’s very cool. I take it the “up time” value is a network-based value, and not a hardware value, eh?

Based on the limitation you suggested, it sounds like the behavior might be…

[Power switch: On]
[Lights: On]

[Power switch: Off]
[Lights: Off]
[Power switch: On]
[Lights: On]
…lights connect to wifi…
[Lights: Off]


Definitely a bit awkward as a general consumer action, but to be honest it’d probably suit me well enough.

No, it’s hardware based. It uses the uptime: “time since last power on (relative time in nanoseconds)” - so it’ll be robust to intermittent wifi hiccups.

As to the behaviour, yes, it is as you describe. Still need to add the logic to distinguish short vs long power off times, but that’s easily determined by checking the last known timestamp of the device. I also need to check the behaviour with multiple bulbs, so I need to wait until my Cyber Monday 6 pack arrives.

I’m curious if you’re tracking the state of the bulb before it gets turned off via the LAN protocol.

Basically if the bulb is off when the person does the toggle, leave the light on with the toggle, otherwise turn it off. Also I’d be curious what your polling interval is.

Yes, the previous state is kept track of. If the light was previously off, it’ll leave it on. Also, if the switch was off for more than 15 seconds, it’ll leave the light on regardless what state it was in previously.

The polling interval is 1 second. In practice, it takes 5-10 seconds for the bulb to boot, reconnect to the wifi, detect that it has reconnected, and issue the turn off command. If this functionality was built into the firmware, then it would only take up until the time to boot to toggle the light, which is around 2 seconds I think.

A setting that forces the light to come on full white after each time it’s switched on (rather than remember last setting) would solved the guest/wife problem. That doesn’t seem like it would be too hard to implement.