Network issues? No problem!

A few users have reported their WiFi being problematic dropping the connection every now and then. HestiaPi has its WiFi to automatically reconnect once the network is available but this hasn’t always solved the problem.

Our latest update introduces a new optional cronjob script that does more.

It tries to ping the WiFi’s (wlan0) gateway

https://github.com/HestiaPi/hestia-touch-openhab/blob/master/home/pi/scripts/netcheck.sh

10 times. If all pings fail it turns the (wlan0) interface down, then up and then asks for a new IP (DHCP) lease.

sudo /sbin/ifdown --force
sudo /sbin/ifup
sudo dhclient wlan0

It then tries again after 10 minutes. If it fails again it restarts HestiaPi.
By default this script is not activated. You will need to download it over SSH
wget https://github.com/HestiaPi/hestia-touch-openhab/raw/master/home/pi/scripts/netcheck.sh -O /home/pi/scripts/netcheck.sh
and make the script executable
sudo chmod a+x /home/pi/scripts/netcheck.sh
and then type
sudo crontab -e
and add this at the end to check every 10 minutes
*/10 * * * * /home/pi/scripts/netcheck.sh

Please also note that restarting the Pi will stop any current task and will not resume after restart so enable only if it is needed.

The netcheck.sh script on Github: