epoch1970 wrote: ↑
Fri May 17, 2019 5:56 pm
Raspbian/Debian comes with administrative tasks defined in /etc/cron.hourly | .daily | .weekly | .monthly
Most of these tasks run early in the morning.
Thanks, I've had a look in these folders and there are quite a few files, mainly related to 'pi-hole' software which is also installed on this Pi; I should have mentioned this in the original post.
However the only weekly job is /etc/cron.weekly/man-db which seems to something to do with the man database, nothing networking related.
default_user8 wrote: ↑
Sun May 19, 2019 11:12 am
Although this isn't an actual fix or explanation it is a work around that should work for you. Just make sure you set the cron job to run before the 7 days + 2 hours you are reporting as your failure rate.
Thanks I do have something similar to this in where the Pi reports it's uptime over MQTT. I've got another Pi running HomeAssistant software that will send me an alert when the uptime goes over 7 days.
B.Goode wrote: ↑
Fri May 17, 2019 3:42 pm
An expired lease was my first guess, as you suggest.
But if you have used the Raspberry Pi Foundation documentation faithfully, the DHCP lease is for 24 hours:
Type or copy the following information into the dnsmasq configuration file and save it:
interface=wlan0 # Use the require wireless interface - usually wlan0
So for wlan0, we are going to provide IP addresses between 192.168.4.2 and 192.168.4.20, with a lease time of 24 hours.
So I don't have anything to contribute to why it fails after a week, not day. But I thought I would point out where it is configured.
Thanks, In fact this does help me quite a bit.
I went back and checked out all the config files from the guide it turns out that the 'Pi-Hole' installer has actually overwritten my '/etc/dnsmasq.conf' file with it's own, so I'm amazed my Wifi devices are connecting at all! I'm now going to remove Pi-Hole, redo all the steps from the guide, reboot and see if it now stays working for more than 1 week.
Hopefully it was just Pi-Hole causing this, I didn't realise the installer just wipes over your config files without warning.