diff --git a/AUTHORS.md b/AUTHORS.md
index 705d6bb33..cbdfc50f8 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -144,6 +144,7 @@ date of first contribution):
* [Yvan Rodrigues](https://github.com/TwoRedCells)
* [Elton Law](https://github.com/eltonlaw)
* ["sparxooo"](https://github.com/sparxooo)
+ * ["Stevil Knevil"](https://github.com/StevilKnevil)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst
index a945a6c2a..992e9af39 100644
--- a/docs/configuration/config_yaml.rst
+++ b/docs/configuration/config_yaml.rst
@@ -708,6 +708,11 @@ Use the following settings to configure the serial connection to the printer:
- M0
- M1
+ # Commands which should not be sent to the printer and just silently ignored.
+ # An example of when you may wish to use this could be useful if you wish to manually change a filament on M600,
+ # by using that as a Pausing command (below)
+ ignoredCommands:
+
# Commands which should cause OctoPrint to pause any ongoing prints.
pausingCommands:
- M0
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py
index 7d6c07146..ce2ce4c09 100644
--- a/src/octoprint/server/api/settings.py
+++ b/src/octoprint/server/api/settings.py
@@ -203,6 +203,7 @@ def getSettings():
"longRunningCommands": s.get(["serial", "longRunningCommands"]),
"checksumRequiringCommands": s.get(["serial", "checksumRequiringCommands"]),
"blockedCommands": s.get(["serial", "blockedCommands"]),
+ "ignoredCommands": s.get(["serial", "ignoredCommands"]),
"pausingCommands": s.get(["serial", "pausingCommands"]),
"emergencyCommands": s.get(["serial", "emergencyCommands"]),
"helloCommand": s.get(["serial", "helloCommand"]),
@@ -769,6 +770,10 @@ def _saveSettings(data):
data["serial"]["blockedCommands"], (list, tuple)
):
s.set(["serial", "blockedCommands"], data["serial"]["blockedCommands"])
+ if "ignoredCommands" in data["serial"] and isinstance(
+ data["serial"]["ignoredCommands"], (list, tuple)
+ ):
+ s.set(["serial", "ignoredCommands"], data["serial"]["ignoredCommands"])
if "pausingCommands" in data["serial"] and isinstance(
data["serial"]["pausingCommands"], (list, tuple)
):
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py
index 062272421..6032bf36b 100644
--- a/src/octoprint/settings.py
+++ b/src/octoprint/settings.py
@@ -136,6 +136,7 @@ default_settings = {
"blacklistedBaudrates": [],
"longRunningCommands": ["G4", "G28", "G29", "G30", "G32", "M400", "M226", "M600"],
"blockedCommands": ["M0", "M1"],
+ "ignoredCommands": [],
"pausingCommands": ["M0", "M1", "M25"],
"emergencyCommands": ["M112", "M108", "M410"],
"checksumRequiringCommands": ["M110"],
diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js
index 056fefe1f..606a7e840 100644
--- a/src/octoprint/static/js/app/viewmodels/settings.js
+++ b/src/octoprint/static/js/app/viewmodels/settings.js
@@ -207,6 +207,7 @@ $(function () {
self.serial_longRunningCommands = ko.observable(undefined);
self.serial_checksumRequiringCommands = ko.observable(undefined);
self.serial_blockedCommands = ko.observable(undefined);
+ self.serial_ignoredCommands = ko.observable(undefined);
self.serial_pausingCommands = ko.observable(undefined);
self.serial_emergencyCommands = ko.observable(undefined);
self.serial_helloCommand = ko.observable(undefined);
@@ -1058,6 +1059,9 @@ $(function () {
blockedCommands: function () {
return splitTextToArray(self.serial_blockedCommands(), ",", true);
},
+ ignoredCommands: function () {
+ return splitTextToArray(self.serial_ignoredCommands(), ",", true);
+ },
pausingCommands: function () {
return splitTextToArray(self.serial_pausingCommands(), ",", true);
},
@@ -1260,6 +1264,9 @@ $(function () {
blockedCommands: function (value) {
self.serial_blockedCommands(value.join(", "));
},
+ ignoredCommands: function (value) {
+ self.serial_ignoredCommands(value.join(", "));
+ },
pausingCommands: function (value) {
self.serial_pausingCommands(value.join(", "));
},
diff --git a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2 b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2
index a7c9887b4..bb6695cad 100644
--- a/src/octoprint/templates/dialogs/settings/serialconnection.jinja2
+++ b/src/octoprint/templates/dialogs/settings/serialconnection.jinja2
@@ -408,6 +408,13 @@
{{ _('Use this to specify commands that should never be sent to the printer. Just the G or M code, comma separated. Defaults to M0 and M1 since most firmware will block until a button on the controller has been pressed if it receives either of those two commands.') }}
+