Schedule reboot on if connection to specific Wi-Fi is down

My OpenWrt router is connected to a Huwaei Sun2000 inverter as a client on 2.4Ghz radio, as a client.

Since installing the USB and NTFS package, I have had a strange issue, whenever there is a power outage and after power is restored, the connection to the inverter is lost. Restarting the router or even restarting the 2.4Ghz radio ( from the network -- wireless -- restart ) fixes the issues.

restart button

fixed issue

My OpenWRT router is connected to a UPS, which means it doesn't lose any power during blackouts.

so there any way to restart automatically the 2.4Ghz radio only if the connection to the Inverter is lost?

This is how it looks like in Homeassistant


It seems to be the answer to my problem. what might be the issue though? this wasn't the case before installing USB-Kmod and NTFS.

Found a video on its usage in Indonesian, but I can get the idea.

They don't seem to be connected to your problem.

There are not so many options and they are self explanatory. You may want to go with restart_iface and ping the inverter at a high frequency, while keeping a ping_reboot as a backup at a lower frequency.

1 Like

I am using these settings, are these fine or should I modify them?

Looks good, now create a second one to reboot the router if there is no response for say 20 minutes.

Power outages/ Blackouts happen for 60mins each time. can't set a lower value than 65mins.

You know best. I gave an example.

1 Like

I came up with new math,
Ping every 20mins, restart interface if no reply for 1h/60mins. So there will be a total of 3 pings every 20mins after which the interface will be restarted in case of load shedding/ blackouts. It will be put to test for the next 24-48H, let's see what happens.


config watchcat
	option mode 'restart_iface'
	option period '1h'
	option pinghosts ''
	option pingperiod '20m'
	option pingsize 'standard'
	option interface 'wlan0'
	option mmifacename 'wlan'

how can I check in Status --- System logs
when was the interface was restarted?
I could only find this line.

Fri Jul  1 12:06:15 2022 watchcat[742]: Could not reach via "wlan0" for "1200" seconds. Restarting "wlan0" after reaching "3600" seconds

I think I have answered it. :sweat_smile:
Only found one instance of it. at least it survived the first instance of load-shedding / Black-outs.

Edit: a WLAN restart will look like this

Sat Jul  2 00:26:16 2022 user.notice INFO: Restarting network interface: "wlan0".

which was preceded by this

Sat Jul  2 00:06:15 2022 watchcat[742]: Could not reach via "wlan0" for "3600" seconds. Restarting "wlan0" after reaching "3600" seconds
Sat Jul  2 00:06:15 2022 user.notice INFO: Reconnecting modem: "wlan" now.
Sat Jul  2 00:06:15 2022 daemon.notice netifd: Interface 'wlan' is disabled
Sat Jul  2 00:06:15 2022 daemon.notice netifd: Interface 'wlan' is enabled

How to solve this problem i.e reboot an ISP's modem from OpenWrt's watchcat or something similar?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.