Skip to content

[question/feature/plugin] reset (switch on/off connected device) when network not available #1550

Description

@wsw70

I have a need which is probably too specific to be included as part of the firmware: I use (among others) a Sonoff Basic behind two devices:

  • a server
  • a set top box provided by the ISP (Internet / TV / phone)

The idea is that when things go horribly wrong, a forced power reset of the devices can be the ultimate save. This is true for the server (it happened that I did some things remotely which cut me off and rebooting the server brought it back to a working state), and certainly for the set top box which is a big pile of [censored], provided by the largest French national fiber provider whom I would like to thank for the reliability of their equipment /s

Today I have a script which runs periodically and check whether Internet (1.1.1.1) is available - if not then after a few tries an MQTT message is sent which switches off the switch, waits a moment and switches it back. This is great until the machine which runs the script is not the one which is faulty (or the network, or the broker or anything else on the way).

This is why I am considering to try to write a plugin which would bring this functionality right into the switch.

  • considering because the last C program I wrote was 20 years ago
  • plugin because of the probable specificity - but I do not know whether plugins are supported (I did not see that in the docs, but has not extensively searched either).

This post is more a quest for information (and ideally documentation) than anything else (well except if someone did not realize they had the need and are jumping on the idea :))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions