Continuous power with Sonoff ZBMINI via software

I saw in another post here that it is possible to use a Sonoff ZBmini to provide continuous power to your outlet. The recommended way was to connect both the line in and line out wires to the Line In terminal of the ZBMini.

However, I was wondering if there’s a way to accomplish this via the home assistant or sonoff software so that I would retain access (via Home Assistant) to cut the power to the switch.

I have a lamp with a smart bulb connected to the outlet and I plan to use an automation to switch the smart bulb on and off while the Sonoff provides continuous power to the outlet, but I would also like to be able to cut the power to that outlet if needed in the future. For example, if I want to move the smart bulb somewhere else.

Which results “bridging” the relay (connecting the load independently from the sonoff) and allowing no load control therfor.

You can make an automation in HA that the moment the device (sonoff) comes “online” it will be triggered to turn the relay on. But from my (bad) experience with zigbee devices their could be some (edge) cases were this implementation could not work and your lights stay off.

On the other hand if you have the same sonoff mini type device but instead of zigbee with wifi (esp) you can install esphome and have it (locally) to set the relay to ON when the device boots (is powered). This way it is guaranteed to work in all cases and not only when HA is available for example.

Be aware that depending on your location outlets can often provide (and are rated) for 15 or 20A. If I’m not mistaken this mini relays are only rated 10A and are not supposed to work behind an outlet for that very reason.

I might not be fully understanding what you’re saying. The Sonoff will always be “online” since it’s always connected to power (regardless of whether both the line in and line out are wired to the Line In terminal), right?

What I’m wondering is whether I can wire it the standard way with line in and line out being separated and then have the physical toggle switch not cause the Sonoff to toggle the power (unless I later changed the setting back). This is basically the functionality of having the relay bridged without actually wiring it that way.

Yes, this is an important reminder, thanks. I’ve got a label on the outlet and its only load now is an LED bulb.

Just think about a power outage (if that is something which happens in your area). The sonoff will boot quickly and stay “offline” (from a viewpoint of HA) until it is up and running. That can lead to minutes without powering your bulb essentially “extending” the power outage for you even after energy is back.

The sonoff has no idea what is wired in parallel (“before”/in the Line In contact). It can only control what is wired to Line Out.

This is often called detach mode. From my experience with (cheap) zigbee devices it is a hit and miss if this (for me very basic) function is supported. Again, if you choose the same device with wifi based on a esp you can install esphome and you have access to this “function” (and many many more).

Still if you have luck your sonoff might offer the both functions you need which is “always on”/“power on” and “detach mode”. How that would work to setup - ether with some (shitty) vendor app or some ZHA/Z2M magic I can’t tell because I got so frustrated of all that zigbee stuff that I got rid of them all.

1 Like