ZHA: Advanced features of Sonoff ZBMINIR2

pardon,

I meant ZBMINIR2

Totally aligned with you Eric, disappointed for the moment although the module is great

1 Like

I hope this will be sorted out for us.

I’m gonna keep an eye on this thread. Was planning to buy a few ZBMINIR2s to use them in detached mode. Glad I didn’t yet.

(Don’t want to switch from ZHA to MQTT just yet
) Hopefully this gets fixed soon!

I’m also interested in the detached mode, but I have an additionell question. Can I use one device to contact two different switches to two different lamps or is it designed to switch one lamp with two switches?

I am not exactly sure what you mean.

In an electrical sense, it is a relais. A single switch in an electrical circuit.
This circuit can still be built to turn on/off multiple lamps.
This is common if you have multiple ceiling lights in a room: You can still wire them to one dumb wall switch and it will switch all of them on or off - the other option would be a (dumb) double wall switch to control them independently. This is up to personal choice.

But essentially, the zbminir2 - at least the relais in it - does the same as a common (single) wall switch.

Of course, your Home Assistant will take notice of every wall switch toggle. So you can create an automation that does anything you like when you toggle the switch, if the zbminir2 is installed. Turn on music, close the blinds, switch a socket to rotate your disco ball, 


The only thing that changes with detached mode is if the relais closes / opens the electrical circuit or not.

fyi, with the new z2m 2.0.0, the action sensor for triggering automations is now depreciated. Cannot figure out how to get it to sense a state change anymore while in detached mode.

Where would be a good place to post the lost of this sensor for developers? fixing it is unfortunately outside of my wheel house.

I want to control with one zbmninir2 to different switches on two different zigbee lamps, so I need the detached mode.
So I have L1 & L2 as in and also as out.So I think I need two.

I got it working in z2m yesterday, version 2.0.0-2. There is a “settings (specific)” tab where I had to enable the action first. After that, it worked.

HI all,

So I’ve got my first ZBMINIR2, which I connected to my Sonoff Zigbee Dongle replacing my Conbee 2. I see all these options in vanilla ZHA (ha-core 2025.1):

Looks perfect. Now what I want to do this the following: NO detached switch. The switch (rocker type) needs to turn the light on and off. This works.

What I would also like to do is turn on/off the light from HA. Is this possible? I only can turn off the “switch”, but the “switch” state doesn’t reflect the state of the power that is sent to the light. It’s like the relay itself.

image

I though this would be like the first thing that comes up when installing these switches: keep the regular switch, and enable smart functionality. Or am I not getting it?

Update** to give an idea that this is not what it should be: let’s say I turn off the switch in HA. Then I can still turn on the light by flipping the physical switch. After that the “switch” in HA is still disabled?

Cheers
Vincent

I fixed it, as the solution was reported here https://www.reddit.com/r/sonoff/comments/1gdxhpb/zbminir2_doesnt_update_its_state_if_activated_by/ worked for me as well.

So the problem? Physical rocker switch does not toggle “Switch” of ZBMINIR2 in HA, using ZHA.

Fix: click “Reconfigure” when you are looking at the ZBMINIR2 device in ZHA, 5 seconds later, it works!

2 Likes

Hello, no news of the initiial bug of detached relay not working with ZHA?

I feel like everyone doesn’t care.

1 Like

There is a bug report mentioned in this thread where you can follow the progress:

As you see, it is an open issue and flagged as medium priority with some information about the possible root cause and depth of the problem.

In the end, this is still an open source project and I assume most (and probably all) of it is still done voluntarily in peoples free time.
There are currently 326 open issues regarding zigbee handlers and this is only one of them.

Sometimes it is just not as easy as it seems and sometimes things take a while.

1 Like

how did you managed to make the physical (dumb) switch work? I dont see any event ot anything when I am pressing it


I’ve bought 20 of these ZBMINIR2 switches, but I want to use the detach relay mode for most of them. So I’m patiently waiting for a fix in ZHA that allows me to use them as advertised :wink:. though it’s taking longer than I anticipated.
When will this be fixed?

Like everyone here, I want it for the detached mode.
I’m in ZHA, core 2025.4.4

WHAT WORKS
To test an outage, I have powered-off my coordinator. After a few seconds the ZBMINIR2 led starts blinking fast. I guess this indicates it has to failback in controlling the relais from the physical switch, and indeed it behaves that way.

WHAT FAILS
In normal connectivity situations, and detach-relais=ON, if I toggle the physical switch, then 2 things happen:

  1. the relais is not toggled, which is what we expect
  2. (bad behaviour) after 2-4 seconds the ZBMINIR2 led starts blinking fast, which means that the devices thinks to be isolated from ZigBee, and indeed any following physical switch toggle translates in a relais status change, i.e. it doesn’t behave as detached.
    NOTE: The blinking doesn’t go away on its own, even after 1 minute. The only way to bring it back to “detached” is to click “RECONFIGURE” on the device page.

Now I try to see if the RECONFIGURE can go inside an automation and we can get the result we all want. I’ll post any update

UPDATE
In detached mode, when we toggle the physical switch, the device sends 3 events, not 1 as expected: on-off, off-on, on-off
To remove the blinking-led that signals the network-disconnection, it is not necessary to use the RECONFIGURE, which is not available as an action, but it is also possible to change the detached-relais to off, and then back to on. Unfortunately, this action cannot be executed before the led start blinking, otherwise it is ineffective for our purpose, so it is necessary to introduce a delay.

That said, probably it is possible to arrange a solution, that includes wait states and probably a polling automation to catch up after quick physical switch toggles, but i hate polling devices and set timers.

If anyone confirms that with Z2M it works, then this is my good time to switch from ZHA to Z2M

I can confirm that it works flawlessly with Z2M, after having exactly the same issues as you with ZHA.

1 Like

Thank you Jesper

Yes 
 with z2mqtt your get a toggle action each time you click switch on zbmimir2