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 368 forks source link

Add a network monitoring for wifi connections #729

Closed hawkeyexp closed 3 years ago

hawkeyexp commented 3 years ago

Hi, i noticed from time to time (primary on very long prints with several hours) my pi has left the connection and was not comming back but print was still running until it's finish. So i decided to create this as a prevention mechanism which monitors the connection and if needed it will restart the connection without restarting the whole system - so no print will be interrupted and system becomes reachable again :-)

Hope you like it!

guysoft commented 3 years ago

Looks really cool! Will merge, but not sure how it would help when debugging for other users. Did it help you locate the issue or just manage disconnects?

hawkeyexp commented 3 years ago

It doesn't help to debug the issue and i can't really locate the final reason cause my system is running fully headless but it prevent's from system not reachable. A possible reason is the really heavy count of networks from neighbours etc which is sometimes > 20!

cp2004 commented 3 years ago

FWIW, there is a fairly large thread on the forums with people having random network disconnects. No single solution yet, only things that seem to be working are these regular checks. Not DHCP, not the connection, sometimes can be pinged, sometimes not, just general flakiness.

https://community.octoprint.org/t/octopi-losing-network-connection-mid-print/16315

Anyway, when this comes into a release, it will hopefully be usable to suggest to people.

guysoft commented 3 years ago

@cp2004 Thanks for the context.