Lifx Bulb Power Up Status

conditions

#1

1) Give a description of the problem
Cannot determine when the Lifx bulb first powers up.

2) What is the expected behaviour?
I would like to be able to trigger a routine when the bulb powers up

3) What is happening/not happening?
I have tried:
When the bulb comes online, active using $status
When the bulb switch state is ON (not good per requirements below)
bulb level is below a threshold (will not work per below, given voice control conflicts)

4) Post a Green Snapshot of the pistonimage
I have tried several approaches and would have to copy in multiple pistons.

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)
N/A

I have a standard (non-smart) light switch that controls my ceiling fan light and the spot light over the fireplace. Since the fireplace light is blinding when I watch TV, I want to change the level to 30% or possibly off right after the Lifx bulb gets powered up. Later, if I want to adjust the light with Google Home or Alexa, I do not want my routine interfering and setting it back to the power-up level I set. The next time the switch is turned on, I want the routine to run again and turn the light on to X% (30% or off depending on where I land).

As mentioned above, I have tried several things, and the only thing close is when the level stays below a constant level for a time, change the brightness to what I want. This will not work if I change the brightness to 20% with Google Home, given it would set it back to 30%.

As a bonus, it would be really helpful to have $status, DeviceWatch-DeviceStatus, DeviceWatch-Enroll, and healthStatus explained. A manual link that explains this and more would be awesome!


#2

Just trying to understand this. You have a standard dumb switch which controls the (dumb?) ceiling fan light as well as a (dumb?) fireplace spot light? When those two are on, you want the (smart) LIFX bulb to dim to 30% or off? What controls/triggers the LIFX to come on to begin with? Or is the LIFX bulb one of those two aforementioned lights? Otherwise do you have anything in the existing chain of dumb switch to dumb ceiling/fireplace lights to tell your smart home they are on?


#3

The dumb switch controls the ceiling fan light and fireplace light socket. I put the Lifx in the fireplace light socket. When I turn the switch on, the Lifx powers up and I want to capture the event when it comes on-line so I can set the brightness.


#4

Personally I dont have a lot of experience with LIFX bulbs but it would seem to me that this would be difficult to nail. Just for the fact that once the bulb comes on, it has to do the handshake and resync and such with the entire ecosystem again. Part of that is status reports, it might not issue a status report right away which would defeat the current idea of implementation. Ideally there should always be power to the smart bulb so that you can control it as needed.

My suggestion would be to try and find a way for that smart bulb to always have power. One method might be to swap out the ceiling fan bulb for a smart bulb as well and just always leave that dumb switch on. At that point you would have more precise and timely control over the lighting.

If its 100% not possible to get that smart bulb on its own always on circuit, you could approach the piston from the point of looking at the start up setting of the bulb. Once the bulb gets power and turns on, it might default to a setting. Mine go to 100% if they get power back after losing it. Your issue is going to be time. Since the bulb previously had no power it wont have any previous time or action to use as a trigger. Your piston could be something like IF “smart bulb” turns on for x amount of time, THEN set to “##” level.


#5

I often take a totally different route…

The logic below works IF the bulbs come on FULL brightness when first powered on.

pic

The only extra thing to keep in mind is that ALL other programming for that bulb should NEVER set the level to anything above 99%. (you should make those small changes before importing my piston)


Pro Tip:

This logic also works well to detect when the entire house comes back from a power failure.


#6

That sounds like a great approach. Unfortunately the Lifx bulbs had a firmware update that keeps them at the same level when they power up that they were at power down.


#7

I have switched my efforts to a Hue bulb I have never used before. It works with Zigbee, easily configured in Smartthings without the Hue app (no Hue hub). It does come on at 100% regardless of where it was set when turned off. Unfortunately, my piston never executes. Note that I have verified that the classic smartthing app sees it at 100% when powered up, and I can change the brightness from the app.

image

I would greatly appreciate any help you can provide.


#8

I have sat here turning the light on and off, waiting in between. My code is executing 8 seconds after the light comes on at 100%. It is turning it down to 30% upon execution.

Is this the best I can do on a Zigbee connection to the bulb? Would it work any better if I had the Hue Hub in the middle?


#9

With most bulbs, the full 100% brightness happens instantly, the moment power is restored.

It actually takes a bit longer for the bulb to become “Smart” again and connect to the ST hub.

Unfortunately, 8 seconds sounds a bit better than normal… With some bulbs, it can take up to 30 seconds! (perhaps even longer if the whole house lost power, because all (50?) devices will be trying to reconnect at the same time)


This is one of the reasons why I always try to make sure all of my Smart devices get power 24 hours a day, 7 days a week.

Essentially, all of my “dumb” switches serves one of two possibilities:

  • The switch stays on 24/7, and I connect only “smart” devices
  • The switch works traditionally, and I use only “dumb” devices

If you stick with a dumb switch and smart device connected, then you will always have limitations when the power is cut or restored.