Restart router when it's gone offline?
-
Hi!
Once a month or so, my internet access is lost, and I have to cut the power to the router, to restart it. When I'm away this become a problem, so I thought that if I got a zigbee switch (in Home Assistant), problem is solved. But how do I (MSR) know if it's offline?- What's the easiest and most effective way to make this work? Do I ping a few websites every ten minutes or so, or is there a better approch?
- If I'm going to ping, what URL is recommended?
For information, I have a set up with Asus routers, Home Assistent with zigbee-, z-wave and wifi devices (a total of appr. 150) and every of my 60-70 automation is done by MSR.
I run MSR ver. 22080-ae7212f (docker on my Home Assistant blue). HA ver 2022.4.6.
Thanks in advance.
Take care, you all!
/Fanan -
toggledbitswrote on Apr 25, 2022, 8:36 PM last edited by toggledbits Apr 25, 2022, 4:37 PM
Yes, much better, thanks. There is a script to drive a boolean attribute on the Reactor system entity to track the up-down state of Internet access (bare metal users can find that in the
tools
subdirectory), but I can't guide you on how to get that running under Home Assistant Blue.Here's a thread that may help you get the equivalent running in Hass, which you would then be able to see as a binary sensor in Reactor: https://community.home-assistant.io/t/home-assistant-checking-if-internet-connection-is-online/313324
-
Attention to the posting guidelines, please: need to know your host platform information, Reactor version number, etc.
-
@toggledbits my bad. I've added some info in my first post. Hopefully it's enough.
/Fanan -
toggledbitswrote on Apr 25, 2022, 8:36 PM last edited by toggledbits Apr 25, 2022, 4:37 PM
Yes, much better, thanks. There is a script to drive a boolean attribute on the Reactor system entity to track the up-down state of Internet access (bare metal users can find that in the
tools
subdirectory), but I can't guide you on how to get that running under Home Assistant Blue.Here's a thread that may help you get the equivalent running in Hass, which you would then be able to see as a binary sensor in Reactor: https://community.home-assistant.io/t/home-assistant-checking-if-internet-connection-is-online/313324
-
@toggledbits How does one make use of that script within MSR?
-
toggledbitswrote on Apr 25, 2022, 10:04 PM last edited by toggledbits Apr 25, 2022, 6:05 PM
The script header contains the simple instructions to get it up and running. From there, you just test the value of the Reactor System entity's attribute
reactor_system.internet_ok
-
@toggledbits When I review the readme in the
config
directory it says:These are the distribution (original) versions of the Reactor configuration files. You may keep them as a reference, or delete them (and this sub- directory). The configuration files used in runtime are in the 'config' subdirectory.
When I review the readme in the
dist-config
directory it says the same thing. Which one is the actual config directory (I'm bettingconfig
). -
gwp1replied to toggledbits on Apr 26, 2022, 1:55 AM last edited by gwp1 Apr 25, 2022, 10:04 PM
@toggledbits So digging thru the script/s a bit I went with
config
directory as the location.Attempting to run the script
./reactor_inet_check.sh
results in this:Just for clarify, this is my
config
directory:and I'm running MSR on RPi4 bare metal Model B 2GBs latest-22080-ae7212f.
-
-
You have to run the script from the Reactor home directory.
cd /path/to/reactor tools/reactor_inet_check.sh
-
-
The included script only runs on Linux systems. A version of the script for Windows would make a great community contribution.
-
-
8/12