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.
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%
I’m looking to make below scenarios possible:
- Turn on bulbs via light switch at e.g. 22:15
- Bulbs dim due to scenario at 23:00 to 5%
- Turn off bulbs via light switch at 00:30
- Turn on bulbs via light switch at 08:30
- Bulbs shine at 80% brightness
- Turn off bulbs via light switch at 10:15
- Turn on bulbs via light switch at 23:15
- 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.
When the scheduled moment falls in a moment when the bulbs has no power, nothing happens.
- 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?
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:
- 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.
- 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:
- Turn off bulbs via light switch at 10:15 (brightness = 80%)
- Turn on bulbs via light switch at 23:15:00 (brightness = 80%)
- Bulb is polled and set to desired setting at 23:15:01
- 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.
But the light could issue a getState request to the cloud when powered on and cloud replies with the configured state. that shouldn’t be so hard.
Also it would be awesome if the light would always go back to it’s last state before power was lost.
For example: in the middle of the night there’s a power outage and when power comes back it gets super bright, instead of OFF with nightview. that’s annoying and it would be great if the light could store the real last state and get back to the last state (also when it was OFF or OFF with IR night view). in a next step the light could make a call to the cloud to fetch the desired state.
what do you think?
It’s a bit more complicated than that for schedule resumption.
As for configuring the light state after a power cycle. We are working on that. As with most things, I can’t give a timeline though