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.
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.
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.
Sat Jul 2 00:06:15 2022 daemon.info watchcat: Could not reach 192.168.200.1 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