LIFX Developer Zone

Is it possible to set brightness while power is off?

I have a set-up where I want to keep using the regular light switch in parallel with schedules.
Unfortunately I have not been able to make it work, and I hope someone can explain to me what I’m doing wrong or that it’s simply not possible.

Situation

3 LIFX mini Day & Dusk E27 bulbs connected to a single light switch. Bulbs updated to latest firmware. Configured via Android LIFX app.

Configured 2 schedules:

  • At 23:00 set brightness to 5%
  • At 08:00 set brightness to 80%

Intended goal

I’m looking to make below scenarios possible:

Scenario 1

  1. Turn on bulbs via light switch at e.g. 22:15
  2. Bulbs dim due to scenario at 23:00 to 5%
  3. Turn off bulbs via light switch at 00:30
  4. Turn on bulbs via light switch at 08:30
  5. Bulbs shine at 80% brightness

Scenario 2

  1. Turn off bulbs via light switch at 10:15
  2. Turn on bulbs via light switch at 23:15
  3. Bulbs shine at 5% brightness

What I’ve tried

Day & Dusk automation

Works as long as the bulb is powered. After power is turned off and turned on after a few hours, the bulbs uses the brightness when it was turned off.

Schedule

When the scheduled moment falls in a moment when the bulbs has no power, nothing happens.
For example:

  • at 23:00 there is schedule to set the brightness to 5%
  • at 22:55 I power off the bulb
  • at 23:05 I power on the bulb
  • the bulb shines with the brightness it had at 22:55

I understand that when a bulb has no power, it’s offline and cannot receive commands.
Is there a way to let the bulb get the configured brightness once it powers up and then use that brightness immediately?

Can these above scenarios somehow be configured in the LIFX android app? Or would IFTTT allow for that? Or is using a light switch with schedules simply not possible?

Hello,

Schedules (and day dusk) are stored in the cloud rather than on the device. This means the device needs to be connected to the internet when a schedule fires.

Also, the cloud wouldn’t be able to tell if a light should become the state of the last schedule when it connects to the cloud as it doesn’t necessarily know if it’s been disconnected since before or after the last schedule; or whether you have changed the device yourself during that time.

You could potentially make a script that runs on your network and just polls the device on a regular basis to see that it’s set to what you want given a particular time of day.

You could use my Docker container to do this: https://hub.docker.com/r/djelibeybi/lifx-daydusk

However, I strongly encourage you to stop turning off your LIFX bulbs via the light switch and just turn them off via a schedule or app or voice assistant. That way, the bulbs can get updated at any time rather than you having to deal with some amount of misalignment to your preferred schedule.

Thank you both for your reply!

Unfortunately I have to use the light switch for two reasons:

  1. The light switch toggles 4 light bulbs in total: 3 LIFX and 1 regular bulb. The regular bulb is in a dead spot WiFi-wise, so I can’t replace it with a smart bulb.
  2. It’s far more convenient (for me) to just press a light switch to toggle lights, instead of finding my phone, unlocking the device and opening the LIFX app to do so. I want to keep that freedom.

Polling periodically (e.g. every second) sounds interesting, but then I imagine scenario 2 might play out as follows:

  1. Turn off bulbs via light switch at 10:15 (brightness = 80%)
  2. Turn on bulbs via light switch at 23:15:00 (brightness = 80%)
  3. Bulb is polled and set to desired setting at 23:15:01
  4. Bulb shines at 5% brightness

It seems that then a flash of brightness would occur when I turn the light on at 23:15, right? This would be very undesirable.

Is there no way to store schedules “on the bulb”?

You can make it so that there is a duration when the script determines the device is not in the correct state so it does it slowly.

As for storing the schedule on the device, that is not possible due to memory constraints and the fact that the device has an inaccurate idea of what the time is.