Have been looking at the Sonoff ZBMINIR2 but not sure there is any edge driver specifically available for this device. I note it has some settings which only seem available through MQTT, like detach mode.
Is there an introductory ‘how to’ anywhere for a SmartThings user looking to use MQTT ? Do I need to use some third party tool like MQTT Explorer ? Is the SmartThins hub an MQTT broker ? How would I send an MQTT message to put the ZBMINIR2 into detach mode as a SmartThings user ?
That sonoff device communicates using Zigbee, not MQTT. Detach mode is a custom Zigbee attribute configurable via a custom cluster (apparently it’s cluster 0xfc11 and the boolean attribute 0x0017, although there’s one more attribute, a bitmap 0x0019, related to that feature so maybe there’s more to it).
An Edge driver would need explicit code to read/write that attribute and expose it to SmartThings, maybe there’s a custom driver around or one that you could ask the developer to modify in exchange for a coffee.
Hi there, did you have any success getting the device into detached mode, or did anyone follow up? the zbminir2’s detach mode is very promising, and such driver would be awesome. i can’t help since i have no experience at all coding, many people will be interested on this too
You could try to convince them to provide a driver for this device. Writing a driver shouldn’t take longer than a few hours.
And if they had a nicely structured (with lazy loaded sub drivers) driver for all of their switches/relays, adding ST support for every new product would take less than an hour.
They should hire on of us for a month to do that and maybe for another month to guide them through the WWST process.
So I bought a sonoff hub and hooked up a ZBMiniR2 so that I could control the detach mode setting. This works, however there seems to be no way to detect the use of the detached physical switch from outside of the ewelink App. That is, you cannot detect someone flipping the detached physical switch from SmartThings to trigger a SmartThings routine to run to turn on the smart bulbs.
Integrated the ZBMiniR2 directly via Zigbee to a Sonoff hub (Sonoff Zigbee Bridge Pro). I then have the Sonoff hub linked to Smartthings. The ZBMiniR2 shows as a device in SmartThings but only as an on/off device with the status being that of the relay itself. There is no separate value or attribute in smartthings giving the status of the physical switch connected to the ZBMiniR2. Therefore it is impossible to use SmartThings to create a routine to turn the smart bulbs on and off when the physical switch is operated.
You can only create a scene in eWELink (The Sonoff App) where the status of the physical switch connected to the ZBMINIR2 is available as ‘‘PRESS’’. Therefore it can be used in If…Then.. statements.
I have several ZBMiniL that come across to Smartthings from my iHost as Matter switch, and as such show on and off, both when triggered, or when the physical switch is used. They are controlled in my case by Smartthings automations.
Not sure that the ‘detach’ capability of the ZBMiniR2 is possible on the standard Matter switch driver. That would be down to Sonoff, apart from noting that the ZBMiniR2 has issues reported on the Sonoff forum.
Combining a smart switch with a smart bulb can be done with the Sonoff S Mate switch on the iHost which is the way I do it, but that’s another story.
The S mate appears to be a battery powered device for use in an unconnected switch to turn it into a wireless smart switch. Seems to be an entirely different use case TBH ?
I am just looking to solve the usual problem of physical switch turning off power to smart bulbs or lights and therefore deactivating them from further control.
I would have expected the R4 when set to detach mode to present itself as 2 switches - the physical switch, and the relay switch - because that is what it is under detach mode. The physical switch and the relay switch become two independent switches. But it hasn’t been implemented that way so the only visibility of the physical switch status is on the sonoff bridge.
I could potentially create a virtual switch device on the sonoff bridge, and then flip this using a sonoff scene if…then, which then might replicate to SmartThings. But it seems I must subscribe £10pa or £24pa just to create a virtual device.
That’s exactly whst can be done with the S Mate and the iHost. See here
I haven’t looked to see if the same can be done with your Sonoff hub. As commented the ability to show 2 switches in Matter needs to be developed by Sonoff.
Thanks for the info on the smate. However I think it has some drawbacks.
Seems to use some other remote control protocol (proprietary?) to communicate with capable sonoff devices rather than zigbee or zigbee associations, or zwave, or Wifi.
Inserting an smate at the light switch would then require a second device like an R4 to also be installed into the light circuit. There is unlikely to be enough room in the switch back box for 2 devices and it anyway seems silly to be installing 2 devices which wirelessly link together, one of which is battery powered in the same backbox. Therefore it seems designed for installing the second device elsewhere in the circuit such as at the light. While possible, I don’t find it desirable as this location is less accessible and would itself presumably require a permanent live not a switched live to be present.
Why install a battery powered device when there is a permanent live available at the wall switch. The only use case I see is for a remote wireless switch which doesn’t depend on the hub for operation.
In my case I want to retain physical wired wall switches so that smart devices could be removed and the lighting work in the traditional way. I also want the lights to operate using just the wall switches because grandma has no idea how to use smart lights/apps etc
So I think detach mode is the better solution - no proprietary protocol - no in wall battery device - no requirement for 2 devices rather than 1. Whilst I could wire the lighting circuit to be permanently on, the addition of a relay device also seems desirable so the circuit is easily powered off if necessary when changing a bulb etc.
No, much simpler than that, no other smart switch, but you do need the iHost to pair to the S Mate.
Basically the physical switch is bridged to be always live to the smart bulb. The wireless relay is flipped by the action of the physical switch, which via a rule on the iHost, reverses the on/off state of the smart bulb.
So are you saying you have wired the circuit directly to be always on ? Then the smate is allowing you to generate a physical switch signal back to iHost to trigger a rule to control the smart bulb ?
If so it seems you have no smart control which allows you to turn the circuit off. Plus it uses a battery which will need replacing.
Detach mode still seems a better solution, if I can get the ‘‘PRESS’’ signal from the physical switch fed across to SmartThings which hopefully I can by using a virtual device, or a dummy physical device. (It seems I could enable integration of SmartThings devices into the Sonoff bridge, but uncertain about this given Amazon don’t allow this for Alexa devices).
I see there are some new Sonoff devices coming out soon.
Has anyone used detach mode on a different brand of device e.g. shelly ? How have other brands implemented it ?
I’ve implemented “detached” mode with a cheap tuya 2gang module. The smart bulb is wired to one relay and is only controllable through the app. The other relay is only wired to the physical switch, to generate on/off events.
The smart bulb is also controlled by the iHost, by any system bridged to it in Matter like ST or Apple, and in my case as they are Hue I also have Bluetooth control.
The consumption for a RF signal is very low - 3 years according to Sonoff.
Anyway, I wish you the best with your setup. I’ll step back from this thread, as it seems more relevant to the Sonoff forum than to continue here and I’ve no interest in trying to convince you.
OK, but that sounds like it is not using detatched mode as such, just using a device with two switches where one switches the circuit only, and the other switch is used to generate a physical switch signal back to your hub ?