Shelly plus 1 in watchdog role - is it possible ?

  • I would like to use shelly plus 1 in role of watchdog.

    It means - i have periodic On/Off signal available (approx. period is 0.5s ) connected to shelly input.

    I would like to have active (ON) switch output until this periodic signal is connected to input.

    But as soon as signal disappears , the switch should set OFF with some delay - for example 2 seconds from detecting of loosing input signal.

    But in case that signal appears again within this two second delay, the switch remains in ON state until signal not disappear for longer than 2 secs.

    Is it possible to set this kind of configuration with shelly plus 1 device ?

  • I have just done something similar with a Shelly Plus 1, in my case it was reading the input from a entrance gate indicator light and detect whether it is on, off or flashing. In my case I have an openHAB automation server in place and implemented it there via scripting. You can find details about this project here:

    https://www.the-ninth.com/blog/ditec-vivah-car-gates-shelly-plus-1-openhab

    If you do not have an automation server, you still might be able to do it via Shelly scripting. I have no experience with that and am not sure if it has the necessary features. You'd write a script that reacts to changes in the signal (on/off) and sets a timer to 2 seconds. If the script is executed again, it cancels and resets the timer. Only if the timer runs through the 2 seconds without cancellation you know that the on/off signal has stopped and can execute whatever action you like.

    Here is the documentation for Shelly scripting. On a quick glance it has everything you need, I am just not sure how you can save the reference to the timer from one script execution to the next.

    Shelly Script Language Features | Shelly Technical Documentation
    Since version 0.9.0
    shelly-api-docs.shelly.cloud