guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.45k stars 366 forks source link

Network monitoring does not work if WiFi was configured outside of the `/boot/octopi-wpa-supplicant.txt` file #804

Open CoryCharlton opened 1 year ago

CoryCharlton commented 1 year ago

What were you doing?

  1. Trying to enable network monitoring to detect network outages

What did you expect to happen?

The wifi network to be restarted when it fails

What happened instead?

The script does not actually execute the check and no output indicates this failure

Did the same happen when running OctoPrint in safe mode?

Not applicable

Version of OctoPi

1.0.0 RC3

Printer model & used firmware incl. version

Not applicable

Screenshot(s)/video(s) showing the problem:

Feb 12 11:31:00 octopi-01 systemd[1]: Started Network Monitor.
Feb 12 11:31:00 octopi-01 systemd[1]: networkcheck.service: Succeeded.

I have read the FAQ. 👍


I'll send over a PR to fix this shortly.

CoryCharlton commented 1 year ago

Sent over the PR #805 that fixes two issues

  1. Add failure condition if network configuration is not found
  2. Check /etc/wpa_supplicant/wpa_supplicant.conf for a network configuration in addition to /boot/octopi-wpa-supplicant.txt

The output of the script is now as follows:

Feb 12 11:45:00 octopi-01 systemd[1]: Started Network Monitor.
Feb 12 11:45:00 octopi-01 networkcheck[8148]: network config found...
Feb 12 11:45:03 octopi-01 networkcheck[8148]: Destination reachable - no action needed.
Feb 12 11:45:03 octopi-01 systemd[1]: networkcheck.service: Succeeded.
guysoft commented 1 year ago

Thanks, merged in