Skip to content

Commit cede3fc

Browse files
authored
Added plugin portretry (#1325)
* Added plugin portretry * Updated portretry according to commens from jneilliii * Updated portretry documentation to work with global serial port setting
1 parent cab5bae commit cede3fc

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

_plugins/portretry.md

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
layout: plugin
3+
4+
id: portretry
5+
title: OctoPrint-PortRetry
6+
description: PortRetry retries the serial connection on a configurable interval when the printer disconnects
7+
author: VEhystrix
8+
license: AGPLv3
9+
10+
# today's date in format YYYY-MM-DD
11+
date: 2024-09-15
12+
13+
homepage: https://github.com/vehystrix/OctoPrint-PortRetry
14+
source: https://github.com/vehystrix/OctoPrint-PortRetry
15+
archive: https://github.com/vehystrix/OctoPrint-PortRetry/archive/main.zip
16+
17+
# Set this if your plugin heavily interacts with any kind of cloud services.
18+
#privacypolicy: your plugin's privacy policy URL
19+
20+
# Set this to true if your plugin uses the dependency_links setup parameter to include
21+
# library versions not yet published on pypi. SHOULD ONLY BE USED IF THERE IS NO OTHER OPTION!
22+
#follow_dependency_links: false
23+
24+
tags:
25+
- disconnect
26+
- recovery
27+
28+
#screenshots:
29+
#- url: url of a screenshot, /assets/img/...
30+
# alt: alt-text of a screenshot
31+
# caption: caption of a screenshot
32+
#- url: url of another screenshot, /assets/img/...
33+
# alt: alt-text of another screenshot
34+
# caption: caption of another screenshot
35+
#- ...
36+
37+
#featuredimage: url of a featured image for your plugin, /assets/img/...
38+
39+
# You only need the following if your plugin requires specific OctoPrint versions or
40+
# specific operating systems to function - you can safely remove the whole
41+
# "compatibility" block if this is not the case.
42+
43+
compatibility:
44+
45+
# List of compatible versions
46+
#
47+
# A single version number will be interpretated as a minimum version requirement,
48+
# e.g. "1.3.1" will show the plugin as compatible to OctoPrint versions 1.3.1 and up.
49+
# More sophisticated version requirements can be modelled too by using PEP440
50+
# compatible version specifiers.
51+
#
52+
# You can also remove the whole "octoprint" block. Removing it will default to all
53+
# OctoPrint versions being supported.
54+
55+
octoprint:
56+
- 1.10.0
57+
58+
# List of compatible operating systems
59+
#
60+
# Possible values:
61+
#
62+
# - windows
63+
# - linux
64+
# - macos
65+
# - freebsd
66+
#
67+
# There are also two OS groups defined that get expanded on usage:
68+
#
69+
# - posix: linux, macos and freebsd
70+
# - nix: linux and freebsd
71+
#
72+
# You can also remove the whole "os" block. Removing it will default to all
73+
# operating systems being supported.
74+
75+
os:
76+
- linux
77+
#- windows
78+
#- macos
79+
#- freebsd
80+
81+
# Compatible Python version
82+
#
83+
# Plugins should aim for compatibility for Python 2 and 3 for now, in which case the value should be ">=2.7,<4".
84+
#
85+
# Plugins that only wish to support Python 3 should set it to ">=3,<4".
86+
#
87+
# If your plugin only supports Python 2 it will no longer be accepted on the plugin repository.
88+
#
89+
# Uncomment the appropriate setting
90+
91+
#python: ">=2.7,<3" # Python 2 & 3
92+
python: ">=3,<4" # Python 3 only
93+
94+
# TODO
95+
# If any of the below attributes apply to your project, uncomment the corresponding lines. This is MANDATORY!
96+
97+
#attributes:
98+
# - cloud # if your plugin requires access to a cloud to function
99+
# - commercial # if your plugin has a commercial aspect to it
100+
# - free-tier # if your plugin has a free tier
101+
---
102+
103+
When the printer is disconnected, this plugin will try to reconnect the printer on a configurable interval
104+
105+
Comes in handy when running octoprint in an lxc, and the port device is available even if the printer is not connected.
106+
107+
Should also work to solve the issue with Prusa printers that don't remove the serial port from the system when powering down
108+
109+
Caveats: only tested on OctoPrint 1.10.2, python 3 and on linux
110+
111+
## Configuration
112+
113+
In ~/.octoprint/config.yaml, the interval can be configured to something other than the default 5 seconds.
114+
There is also a settings page in the webui
115+
```
116+
plugins:
117+
portretry:
118+
interval: 5
119+
```
120+
121+
**This plugin will do nothing if the serial port in Serial Connection > General is set to `AUTO`, you will need to specify a port there for this plugin to work!** Or in ~/.octoprint/config.yaml:
122+
```
123+
serial:
124+
port: /dev/ttyUSB0
125+
```
126+
When you change the port from `AUTO` to something else, you will need to connect to the printer manually first (or restart the server).

0 commit comments

Comments
 (0)