I want to work out a way to trigger a few smart plugs to switch on when a light bulb is turned on.
So I thought if I replaced the bulb with a WIFI-enabled bulb, but just use it with a normal switch, could I trigger a flow when the bulb is powered up and connects to wifi? and also achieve the opposite, detect when powered down and disconnects to turn the plugs off?
I realise it’s slightly unorthodox, but I don’t want to rewire these switches as they are triples and complex.
You’ll probably want to use a smart switch vs bulb. There will be a considerable delay with a wifi bulb. When the power is off, the wifi connection is dropped. Then needs to reconnect before reporting it’s state back to HA.
You mean you have three switches controlling the same light?
There probably will be a delay as the others has mentioned, but I understand your reasoning.
Another option is to only replace one of the switches with a mains powered switch and the other two you replace with ZigBee switches.
That way you only need to do a very “easy” rewiring of the switches.
You are fighting a common communication problem in computers.
The problem is to identify when a device is actually “dead” or just really slow.
When you cut the power to the bulb, then it just dies without any option to tell other devices that it is going away,
The other devices then have to work out a method to realize this and that method is a timeout limit.
Once that limit is reached, then the device is dead, but that is only half the problem.
The other half is how to dail with its data sent.
Are these data now invalid or not?
If they are invalid, then the bulb should be set to unavailable.
If they are valid, then the bulb should be as last state.
This is the problem the HA core and integration developers have to handle.
Thanks, I get that, maybe I’ll try it & see how it goes.
I think there’s a gap in the market for a device specifically designed to do this. It would be a really simple way to trigger automations without rewriting. It could be built with a capacitor to enable the device to send a signal that it’s being powered down.
If my electronics knowledge was more up to date, I might consider designing one.
Even if you were to redesign a wifi bulb, the firmware would still need to be changed. HA has no state for “power off” so that would need to be programed into the back end. A lot of work for something a smart switch was purpose built for or even a simple lux sensor in the room. Many multi sensors include them.
Wouldn’t you even consider adding a sonoff basic whithin the triple switch just for that specific gang? You would instantly get the current state of the bulb this way.
Otherwise, as someone said, Aqara’s light sensor is not too expensive and very responsive. You couldplace it very close to the bulb and work your automation from there.
Smart bulb + battery powered switch would do it too.
Sengeled bulbs do send an ‘off’ status when power is removed. They also send an ‘on’ status when power is applied (I am told but can’t confirm the latter as it didn’t work on mine). Is that useful at all for your needs?