Delayed switching off in Sonoff ZBMINI?

Hi,

I have a ZBMINI wired up to a smart lightbulb and I was wondering if there is a way to:

  • Keep the smart lightbulb always powered up.
  • Toggle the lightbulb using the state of the ZBMINI.
  • (This is the hard part!) Allow the switch to physically toggle the lightbulb if HA is down.

I know I could just not use the Lout terminal in the ZBMINI and just wire up the lightbulb to L but this would mean that there would not be a way to turn the lightbulb off if HA is not available.

I’ve also tried to switching the ZBMINI back on every time it turns off (and also toggling the lightbulb in the process), but there is a very noticeable delay in which the lightbulb goes on → off → on → slow transition to off.

Looking through the zigbee attributes I’ve discovered an interested one called “off_wait_time” (Endpoint ID:1, Cluster ID: 0x0006, in, Attribute ID: 0x4002) that currently has a value of “None”. So I’m wondering if that attribute would allow me to set a delay of the physical relay turning off, in hopes that it would allow me to toggle the state back to on from HA before it physically disconnects the relay. This would allow me to fulfill the requirements, I think.

So the questions are:

  • Does anybody know if that attribute works indeed as I imagine?
  • The device seems to ignore my attemps at altering the value of the attribute, does anybody know the override code for this device?
  • Does anybody has any clue on any other way to accomplish my requirements?

I have several ZBMINI2 and wire a push switch on S1/S2 - this gives manual switching in case HA is not running.

Typical set up is a press button to turn on (and off) the cupboard light and an automation to turn it off after ten minutes - in case I forgot.

Thanks for your answer but I’m not sure if I understand. If I’m not mistaken your setup does not maintain the smart light bulb powered on, I’m I right?

Sorry misread. The ZBMINI is not really the tool for the job.

I use Hue smart wall switch modules for this scenario.
The original wires going to the wall switch are shorted - keeping the smart bulb powered.
Then the battery powered module is connected to the wall switch contacts.

The smart module status turns on / off according to the wall switch position.

I also failed in setting up my ZigBee switches like this.

In the end I solved it by using a esphome wifi switch for that task which easily allows having different actions on a button press depending if HA (api) is connected or not.