Workaround to try for enabling/ disabling auto scenes

Hello all,

I experiencend issues while trying to enable/disable an auto scene from another auto scene and I found a workaround to make it work that I share here for you people to try.

My ecosystem: full SonOff devices, ZBBridge-U, eWeLink App.

Scenario I needed to automate: upon motion detection with a SNZB-03P sensor, turn on 8 different lights in the garden for 10 min then switch then off. Must work only between sunset and 22:00 not the rest of the night because of bloody cats invading the garden, can be disabled from the press of a SNZB-01P button.
Note : you can’t set the effective period of a scene between sunset/sunrise and a fixed time. It’s either sunset/sunrise OR fixed time/ fixed time, the mix of both is not possible.

What I defined initially :

  • Manual scene “ON” : sets 8 different R2 switches (1 per light) to ON
  • Manual scene “OFF” : sets 8 different R2 switches (1 per light) to OFF
  • Auto scene “Movement” : IF motion detected and low light THEN call manual scene “ON” + Delay 10 min + call manual scene “OFF” - effective period from sunset to sunrise.

Note: I defined the manual scenes to ON/OFF all the lights for modularity because I also use them in other auto scenes such as “Turn On lights for 10mins at the press of a button”, “Turn On lights for 15min when the gate opens”, etc… It’s easier to manage this way

To restrict the auto scene between sunset and 22:00 and being able to disable this scene from the press off a button SNZB-01P, I then added the following auto scenes:

  • Auto scene “Disable Movement button”: IF button pressed THEN Disable smart scene “Movement”
  • Auto scene “Disable Movement 22:00”: IF time is 22:00 everyday THEN Disable smart scene “Movement”
  • Auto scene “Enable Movement Sunset”: IF sunset -5 min THEN Enable smart scene “Movement” (just to relaunch the scene on time)

As many other people in this forum, I found out that these auto scenes were NOT ABLE to properly enable/disable the auto scene “Movement”. I don’t know why and did not found any explanation or solution on the forum.
Note: I investigated quite a bit and tried several debugging tests:
- to only turn on a single device only in case it was the call of a manual scene within the auto scene that would cause the issue;
- to remove the delay of 10 min in case it was the autoscene still being executed while other presence detections were pinging on top of the initial ping.
Nothing changed: the enable/disable was still not functionning.

Here is a workaround I eventually managed to implement and that works totally fine:

I created 2 additional manual scenes:

  • Manual Scene “Disable Movement” : on tap, Disable auto scene “Movement”
  • Manual Scene “Enable Movement” : on tap, Enable auto scene “Movement”

Then I changed my not working auto scenes to call these newly created manual scenes instead of trying to directly enable/ disable the other auto scene:

  • Auto scene “Disable Movement button”: IF button pressed THEN execute manual scene “Disable Movement”
  • Auto scene “Disable Movement 22:00”: IF time is 22:00 everyday THEN execute manual scene “Disable Movement”
  • Auto scene “Enable Movement Sunset”: IF sunset -5 min THEN execute manual scene “Enable Movement”

I don’t know if it’s because you switch between auto and manual scenes as an intermediary step instead of staying in the auto scene space only, but it works fine now.
Maybe the eWeLink team could give us some insights about why this works and not the other way around, it would be interesting for us to better understand the conditions for the enable/disable function to work properly.

Hope this will help.

1 Like