Shelly watchdog - restart

  • Hi,

    at first I wanted to say, I'm not a coder by any means ;)

    So my goal is to have a script which checks if a Shelly is able to reach the Internet and if not, Shelly should be restarted.

    I have tried to modify existing script and my outcome looks like:

    I have checked and it looks like the script works. Maybe someone could check/advise if it is ok. Maybe some improvement could be made.

    Thanks in advance.