Sonoff ZBmini. Need it to switch on then off then back on quickly. Fixture link inside

Hey everyone. I'm super new here and I've been learning a lot. I've got a couple ZB minis doing other things via contact sensors and have been working great.

In my living room and kitchen we have a bunch of these lights which we love.

https://www.homedepot.com/p/Commercial-Electric-Ultra-Slim-6-in-Canless-Selectable-CCT-Integrated-LED-Recessed-Light-Trim-with-Night-Light-Feature-900-Lumens-53828101/313658680

To go into "night light" mode You switch them on, back off and then back on again. This has to be done within a couple seconds if not the light will just turn on and off as a normal fixture would.

Can I automate the ZB mini to turn on, then off right away and then back on right away?

I have a three gang switch box with one unused slot. I'm going to wire slot one to just simply turn the lights on with a ZB mini behind them. I'm hopefully looking to wire slot two with a standard non 3-way switch, the ZBmini behind it and have it automate the on/off/on so slot 2 goes right to "nightlight".

What would be the best way to do this? Thanks so much in advance and I appreciate your time.

Ninja edit: Say I come into the room and hit slot one. This turns on the main recessed lights. But what will happen if I hit slot 2 looking for the "night light"? It seems that I would also need to slot to to know its current state, on or off as if they were on they would just need an off > on trigger.

The short answer is yes, but your proposed setup seems like it would be a challenge. The ZBMINI doesn't actually know or report the state of the connected switch. It's only hard- coded to toggle the relay when the switch input changes state. Using a single ZBMINI with a connected switch would maintain the function of the lights as designed plus the ability to automate the sequence.

A scene controller like the Zooz Zen32 seems like a better device for this. The main button toggles the switch relay, one of the other buttons triggers a rule to cycle it ON-OFF-ON as needed. Then you could skip flipping the switch manually.

1 Like

You could do this, but as dylan.c pointed out it could get out of synch. Say the wall switch is on, and you turn it off from your dashboard or smartphone. The wall switch is in the on position but the light is now off. The zbmini itself will report back to hub whether it is on or off, and from that report a rule can be created to say if zbmini is on and time is between 9pm and 1am, then turn off, wait 1 second and turn on, activating nightlight mode.

1 Like

Again I thank everyone for thier time.

An actual zigbee dacora SPST switch is kind of out of the question because it's all matte black switches/plates in our living room.

The actual orientation "up/down" or "on/off" of the switch wouldn't bother us.

What do you guys mean out of sync? Like out of sync so when you tell Alexa to turn it on It will turn it off? Nothing will happen? It may be triggered in the middle of one of its actions?

I understand there is probably a bunch of simple ways to do this that most would find acceptable but I promised the wife she "wouldn't even notice" and Im into that as well. Everything must remain to work as a "normal" home.

Sometimes the switch will be in the up position (traditionally on for a non-3-way switch) and the light will be off, or vice versa.

Sound like that won't be an issue for you.

2 Likes

Okay I'm going to try this in a little bit today. I appreciate all the help. I'll report back.

It might be easiest to do this in Rule Machine. Here's a simple rule for a zigbee switch (called Computer Fan).

Screen Shot 2022-03-20 at 3.29.23 PM

This runs very fast. The on/off/on takes less than 50 milliseconds (I do have a really good zigbee mesh).

You might want to add a couple delays...half a second between steps should do it. Too fast and it might not work as intended.

2 Likes

This is awesome guys thank you. About the timing, in real life it takes me less than half a second to do that on off on sequence.

1 second would definitely be too slow between the switching. OCD will flare up.

Honestly appreciate the replies. Now I just wait for a time when I can kill power to the living room.....

So not even thinking but after getting everything in making a rule on off on then retrievers itself because it turns on. Also the speed cannot be fast. It looks like a little under a second is the fastest that relay/switch wants to work at.

So when I hit my light switch it basically just turns on and off until I delete the rule. There must be a way around this... I've been trying to figure out how.