Hi, is there a plugin to check if the raspberry pi is connected to the internet after a print and if not reboot the system?
Thanks
Hi, is there a plugin to check if the raspberry pi is connected to the internet after a print and if not reboot the system?
Thanks
You find all the OctoPrint plugins here:
Losing internet connection can have different reasons and do not need a reboot of the Pi in all cases.
Checked the repository before asking here, found none at least with the search terms I used. In my case the only solution is to reboot or cycle power, so I thought maybe there is a plugin...
but the latest OctoPi 1.0.0 release has a wifi watchdog built in.
- Add a network monitoring for wifi connections #729 (thanks @hawkeyexp)
Thanks! Just installed it. Hope It solves my lack of connectivity from time to time.
I created a script that runs under Cron to check connectivity and restart networking if the router and/or the internet itself is unreachable.
I will post it when I get back to the house
I suspect it's very similar to the one that was added to OctoPi 1.0.0.
Used to use the Network Health plugin on Octopi 0.18, but have switched to the included network monitoring support in Octopi 1.0.0 enabled and configured in octopi.txt with more reliable network performance.
What do you add for it to be enabled in octopi.txt? Thanks
It requires the latest 1.0.0 OctoPi version. It's in there like this.
# Configuration of network monitoring
#
# This enables network monitoring for wifi connections with a simple ping test.
# If connection terminates by variable reasons system tries to restart the wifi connection to reestablish a connection.
# The connection test is done every minute.
# By default it is disabled (0 = off / 1 = on)
# dstination_host can be an ip address or a hostname (for hostname ensure dns resosultion is working correctly)
enable_network_monitor=0
destination_host=192.168.1.1
you make the 0 a 1 and enter IP you want to ping for checking connectivity (typically your router).
Here's the relevant section from octopi.txt:
# Configuration of network monitoring
#
# This enables network monitoring for wifi connections with a simple ping test.
# If connection terminates by variable reasons system tries to restart the wifi connection to reestablish a connection.
# The connection test is done every minute.
# By default it is disabled (0 = off / 1 = on)
# destination_host can be an ip address or a hostname (for hostname ensure dns resosultion is working correctly)
enable_network_monitor=1
destination_host=8.8.8.8
Changed the host to one of my choice.
Thanks! Just updated it and rebooted, hope it solves my problem. Thanks!
Well the printer (prusa MK4) is printing a long job since yesterday, but today around noon connectivity was lost, it still printing (I'm still next to the printer) but cannot ping, ssh or connect via the web interface.
I guess the network monitor will detect this after the print is finished and try to recover, or it should try to recover mid print and its not doing its job?
A network scan doesn't sees the PI, even tried a router reboot, but, can't see it. Will post logs once print is finished
My Octopi & 3D printer are situated at the far reaches of the wifi network in a pretty dirty wifi environment & it gets knocked off the network regularly. My experience with Octopi 1.0.0 network monitoring have shown these issues to be corrected within two minutes of the disconnect, even while a print job is active. If I disable network monitoring, in eight out of ten disconnects the Pi won't restore connectivity without a reboot of the Pi. It has worked well for me. Interested in what you find.
I don't know if this system log could help, but here it goes! Raspi is connected wireless via wlan0
messages.zip (8.9 KB)
octoprint-systeminfo-20230809164459.zip (31.9 KB)
The first thing that jumped out at me when looking at your sysinfo bundle on the Octoprint Bundle Viewer is that you still have the Network Health plugin installed and enabled. When I switched to Octopi 1.0.0 network monitoring I first disabled and subsequently uninstalled that plugin. The two are trying to accomplish the same task. You don't need them both. The Network Health plugin did fill your Octoprint.log with unsuccessful attempts to reset the network connection about every three minutes. I'm worried about potential conflict between the two & would be inclined to stick with the support that is now part of Octopi
I'll keep looking and hopefully someone more knowledgeable will spot something.
ok, disabling the plugin for the time being. Thanks