zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

[Feature request]: Sonoff MINI-ZB2GS-L firmware feature request: expose single/double/long press events in detached mode

Open szbotms opened this issue 2 months ago β€’ 13 comments

Is your feature request related to a problem? Please describe

I am using a SONOFF MINI-ZB2GS-L in detached relay mode with smart bulbs.

Device details:

  • Model: MINI-ZB2GS-L
  • Firmware: 1.0.4 / build 4100
  • Zigbee2MQTT: 2.14.1
  • External trigger mode: pulse
  • Detach relay mode: enabled

At the moment, every physical input event is reported only as a standard genOnOff / commandToggle, and Zigbee2MQTT publishes toggle_l1.

Current behavior:

  • single press β†’ one commandToggle
  • double press β†’ two separate commandToggle frames
  • triple press β†’ three separate commandToggle frames
  • long press β†’ only one commandToggle
  • release after long press β†’ no separate event

I also tried reading the customClusterEwelink attribute detachRelayActionEvent (0x0028), which is used by the MINI-ZB1GS for detached-mode input events, but the MINI-ZB2GS-L returns UNSUPPORTED_ATTRIBUTE. This makes the device less useful as a smart-bulb wall controller, because double-click and long-press actions cannot be distinguished reliably at the device level, and hold-to-dim is not possible without a separate release event.

Describe the solution you'd like

I would like the MINI-ZB2GS-L firmware to expose distinct detached-input events over Zigbee, ideally:

single_click
double_click
long_press
long_press_release

As a first step, feature parity with the MINI-ZB1GS would already be very useful:

single_click
double_click
long_press

A separate long_press_release event would be especially useful for smart-light dimming:

long_press         β†’ start dimming
long_press_release β†’ stop dimming

If possible, implementing this through the same customClusterEwelink / detachRelayActionEvent mechanism used by MINI-ZB1GS would also make support in Zigbee2MQTT straightforward and consistent across the product family.

Describe alternatives you've considered

Double- and triple-click can technically be reconstructed in Home Assistant by counting consecutive toggle_l1 events within a short time window, but this introduces delay for single-click actions and still does not solve long-press/release detection.

I also considered other no-neutral devices such as Shelly 1L Gen4 and Tuya/AVATTO modules with custom firmware. However, these may require a bypass with some smart bulbs, while the MINI-ZB2GS-L works well in my installation without one.

The MINI-ZB2GS-L is otherwise a very good fit for this use case because it supports:

  • no-neutral installation,
  • detached relay mode,
  • local relay fallback when Zigbee connectivity is lost. So extending the input event reporting would avoid having to replace the device purely for richer button actions.

Additional context

Example debug output for a physical press: Received Zigbee message from 'bedroom_lightswitch_relay', type 'commandToggle', cluster 'genOnOff', data '{}' from endpoint 1 with groupID 0

Zigbee2MQTT then publishes: zigbee2mqtt/bedroom_lightswitch_relay/action toggle_l1

For a double press, two identical commandToggle messages are received. For a long press, only one identical commandToggle is received, with no event on release.

The device is currently running firmware 1.0.4 / build 4100.

The MINI-ZB1GS already exposes richer detached input events (single_click, double_click, long_press), so similar behavior on the MINI-ZB2GS-L would be very useful for smart-bulb installations.

A long_press_release event would be an additional improvement beyond ZB1GS parity, mainly to support native hold-to-dim behavior.

I can provide additional debug logs and would also be happy to test a beta firmware if useful. @CubeZ2mDeveloper β€” could this be considered for a future MINI-ZB2GS-L firmware update?

szbotms avatar Sep 28 '26 14:09 szbotms

Thanks for the detailed feature request and the additional information.

We have forwarded this request to our product and firmware teams for evaluation and further planning. We’ll keep you updated if there are any developments.

Thank you for your feedback and for helping us improve the MINI-ZB2GS-L.

CubeZ2mDeveloper avatar Oct 08 '26 11:10 CubeZ2mDeveloper

Yes, please bring this up for the Mini and Mini Duo! This is atm the only reason to use a shelly over a sonoff!

ss83 avatar Oct 13 '26 21:10 ss83

Thank you for your feature request. We plan to add support for exposing single-click, double-click, and long-press events in Detached Mode in December 2026. Thank you for your feedback and patience.

CubeZ2mDeveloper avatar Oct 15 '26 07:10 CubeZ2mDeveloper

@CubeZ2mDeveloper thanks for picking this up. Related request while you're working on the detached-mode firmware: on the -L, presses in detached mode only seem to reach the coordinator, bindings to bulbs/groups are accepted but never used. Details and tests here: #33482. Would be great if it could go in the same update.

Flopi-flop avatar Oct 23 '26 14:10 Flopi-flop

hi, I'm Ted from Sonoff. Thanks for sharing such a detailed description of your setup.

Before we evaluate the possibility of adding these input events, we'd like to better understand your actual wiring configuration.

Since the MINI-ZB2GS-L is a no-neutral device, and detached relay mode is being used with smart bulbs, could you help clarify a few things?

  1. How are your smart bulbs powered? Are they connected to the L Out terminal of the MINI-ZB2GS-L, or are they permanently connected to the mains independently of the device?
  2. What is connected to the L Out terminal of the MINI-ZB2GS-L, if anything?

We'd like to better understand how the device is installed and what load it is connected to, so we can properly evaluate your use case.

Thanks for your help!

Ted-Pana avatar Nov 02 '26 02:11 Ted-Pana

Hi @Ted-Pana,

When I was testing this device for its available features, a single IKEA E27 smart bulb was attached to the L Out terminal of the relay. I did not have any issues with their compatibility, there was no flickering or other issues. The bulb was 4.5W load, if I recall correctly your minimum recommended is 3W.

I would probably be using these relays with other lights too if this multi-ckick/hold feature was available, especially if binding support would also come to these relays. These were the easiest to install and to work with from the ones I’ve tested since they do not require a bypass to be installed at the lights.

szbotms avatar Nov 03 '26 09:11 szbotms

@szbotms Thanks for the clarification!

I'd like to confirm one more thing about your setup.

Since the IKEA smart bulb is connected to the L Out terminal of the MINI-ZB2GS-L, when you turn off the bulb via Zigbee, it enters its standby state while remaining physically connected to the module.

In this situation, does the MINI-ZB2GS-L continue to work normally? For example, can you still control the module and receive Zigbee commands reliably while the bulb is off?

We'd like to understand how the module performs with a low-power standby load in detached relay mode.

Ted-Pana avatar Nov 05 '26 03:11 Ted-Pana

5. @CubeZ2mDeveloper thanks for picking this up. Related request while you're working on the detached-mode firmware: on the -L, presses in detached mode only seem to reach the coordinator, bindings to bulbs/groups are accepted but never used. Details and tests here: #33482. Would be great if it could go in the same update.

@Flopi-flop Thanks for bringing up this additional request!

I'd like to better understand your intended use case for Binding in detached mode.

A few questions about your setup:

  1. What is connected to the L Out terminals of your MINI-ZB2GS-L? Do you still have lights or other loads connected to the module after enabling detached mode?
  2. Which Zigbee devices do you want to control through Binding? Are they the same lights connected to the module, or other independently powered Zigbee bulbs or groups?
  3. In your intended setup, what role does the physical relay output play after enabling detached mode? Do you still need it to control the connected load, or do you mainly use the module as a wireless Zigbee wall controller?

Understanding how you've wired the device and which devices you want to control will help us better evaluate the Binding requirements.

Thanks for your help!

Ted-Pana avatar Nov 05 '26 03:11 Ted-Pana

Hi @Ted-Pana,

I did not have any issues with the relay, even when the bulb was turned off.

I would also add feedback for the binding part too. I would want to control the lights attached to the relay with binding, in case of multi channel relays, each channel bound to its corresponding light. The minimum would be to control on/off of the light, but there are ways through zigbee to control brightness via long-pressing a momentary switch. That would also be nice, but on/off is enough at first, because I can do the brightness change through HA, given the relay exposes the right actions.

The main reason behind binding for me is to have seprate on/off (and brightness) control from HA, so if it goes down, the lights still work. These relays have a fallback in my experience that in case of a network kΓΆss they go back to relay mode from detached, but binding is superior since the on/off action with direct binding is also faster than when it goes through HA.

szbotms avatar Nov 05 '26 12:11 szbotms

@szbotms Thanks for sharing your use case. We'd also like to understand a little more about how you use binding alongside automation.

Do you currently use Zigbee binding and HA automations at the same time? For example, do you use binding to control one set of lights directly, while using events to trigger HA automations for other devices?

Or do you mainly rely on binding for light control, without using additional automations triggered by the events?

This would help us better understand how users combine direct binding and automation in real-world setups.

Ted-Pana avatar Nov 06 '26 06:11 Ted-Pana

Hi @Ted-Pana, thanks for the follow-up, and sorry for the delay: I wanted to test a single smart bulb with the relay first. More details are in #33482. I'll add a short note here once I've tried a bypass, in case anyone is interested.

What is on L Out:

  • Bathroom: L1 in detached mode feeds a smart bulb; L2 (attached relay) switches a conventional mirror light. This works well: the module stays online and presses arrive as toggle_l1. There is enough power available in standby in this use case.
  • Bedroom: L1 in detached mode with a single smart bulb as the only load (I also tried another simple connected LED bulb); L2 is not used; no neutral at the switch box. The power is insufficient: with the bulb turned off, the module drops off the Zigbee network, and it comes back as soon as the bulb is turned on again. This still has to be tested with a bypass. (szbotms had no issue with a 4.5 W IKEA bulb, so it may depend on the bulb's standby draw.) If it works with a bypass (and I believe it will), the new options requested in both tickets (#33216 and #33482) will be useful with a single bulb as well.

Flopi-flop avatar Nov 16 '26 16:11 Flopi-flop

Hi @Ted-Pana, sorry for the delay on my part too. I use binding for reliable operation even when my Zigbee network or coordinator goes down, that's the main reason for binding. The second if for speed as it's faster than if the request goes through a Home Assistant automation.

I use automatons for anything beyond that: dimming, scene switch, etc., based on the number of presses or if a button is held. If some of these can be done via binding, that's a bonus, but automation is also a need for smarter automatons.

szbotms avatar Nov 16 '26 16:11 szbotms

Follow-up on the bedroom setup (single smart bulb on L1, detached mode, no neutral at the switch box): I added a basic bypass at the ceiling light, a 0.33 Β΅F / 275 V X2 capacitor, and it now works perfectly. The module stays powered and online with the bulb turned off, and the wall switch presses arrive as toggle_l1 reliably.

So the supply problem was the only blocker with a single smart bulb. @Ted-Pana, in case it helps your evaluation: with such a bypass, the MINI-ZB2GS-L in detached mode works well even when the only load is one connected bulb in standby. The new detached-mode events (#33216) and the binding to bulbs/groups (#33482) will be just as useful in that configuration. Still happy to test a beta.

Flopi-flop avatar Nov 27 '26 15:11 Flopi-flop