From 6ce6160f3da603db73c768ff0beb71267a94be6b Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Mon, 27 Nov 2017 12:10:47 -0500 Subject: [PATCH 1/9] Added ResettableTimer class --- src/octoprint/util/__init__.py | 81 +++++++++++++++++++++++++++++ tests/util/test_resettable_timer.py | 59 +++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 tests/util/test_resettable_timer.py diff --git a/src/octoprint/util/__init__.py b/src/octoprint/util/__init__.py index e4b7932cb..2a7703121 100644 --- a/src/octoprint/util/__init__.py +++ b/src/octoprint/util/__init__.py @@ -1090,6 +1090,87 @@ class RepeatedTimer(threading.Thread): if callable(self.on_finish): self.on_finish() +class ResettableTimer(threading.Thread): + """ + This class represents an action that should be run after a specified amount of time. It is similar to python's + own :class:`threading.Timer` class, with the addition of being able to reset the counter to zero. + + ResettableTimers are started, as with threads, by calling their ``start()`` method. The timer can be stopped (in + between runs) by calling the :func:`cancel` method. Resetting the counter can be done with the :func:`reset` method. + + For example: + + .. code-block:: python + + def hello(): + print("Ran hello() at {}").format(time.time()) + + t = ResettableTimers(60.0, hello) + t.start() + print("Started at {}").format(time.time()) + time.sleep(30) + t.reset() + print("Reset at {}").format(time.time()) + + Arguments: + interval (float or callable): The interval before calling ``function``, in seconds. Can also be a callable + returning the interval to use, in case the interval is not static. + function (callable): The function to call. + args (list or tuple): The arguments for the ``function`` call. Defaults to an empty list. + kwargs (dict): The keyword arguments for the ``function`` call. Defaults to an empty dict. + on_cancelled (callable): Callback to call when the timer finishes due to being cancelled. + on_reset (callable): Callback to call when the timer is reset. + """ + + def __init__(self, interval, function, args=None, kwargs=None, on_reset=None, on_cancelled=None): + threading.Thread.__init__(self) + self._event = threading.Event() + self._mutex = threading.Lock() + self.is_reset = True + + if args is None: + args = [] + if kwargs is None: + kwargs = dict() + + self.interval = interval + self.function = function + self.args = args + self.kwargs = kwargs + self.on_cancelled = on_cancelled + self.on_reset = on_reset + + + def run(self): + while self.is_reset: + with self._mutex: + self.is_reset = False + self._event.wait(self.interval) + + if not self._event.isSet(): + self.function(*self.args, **self.kwargs) + with self._mutex: + self._event.set() + + def cancel(self): + with self._mutex: + self._event.set() + + if callable(self.on_cancelled): + self.on_cancelled() + + def reset(self, interval=None): + with self._mutex: + if interval: + self.interval = interval + + self.is_reset = True + self._event.set() + self._event.clear() + + if callable(self.on_reset): + self.on_reset() + class CountedEvent(object): diff --git a/tests/util/test_resettable_timer.py b/tests/util/test_resettable_timer.py new file mode 100644 index 000000000..1e227ad8b --- /dev/null +++ b/tests/util/test_resettable_timer.py @@ -0,0 +1,59 @@ +# coding=utf-8 +from __future__ import absolute_import, division, print_function + +__author__ = "Gina Häußge " +__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' +__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" + +import unittest +import mock +import time + +from octoprint.util import ResettableTimer + +class ResettableTimerTest(unittest.TestCase): + + def setUp(self): + pass + + def test_function(self): + timer_task = mock.MagicMock() + + timer = ResettableTimer(10, timer_task) + timer.start() + + # wait for it + timer.join() + + self.assertEqual(1, timer_task.call_count) + + def test_reset_callback(self): + timer_task = mock.MagicMock() + on_reset_cb = mock.MagicMock() + + timer = ResettableTimer(10, timer_task, on_reset=on_reset_cb) + timer.start() + + timer.reset() + + # wait for it + timer.join() + + self.assertEqual(1, timer_task.call_count) + self.assertEqual(1, on_reset_cb.call_count) + + def test_canceled_callback(self): + timer_task = mock.MagicMock() + on_cancelled_cb = mock.MagicMock() + + timer = ResettableTimer(10, timer_task, on_cancelled=on_cancelled_cb) + timer.start() + + time.sleep(5) + + timer.cancel() + + time.sleep(10) + + self.assertEqual(0, timer_task.call_count) + self.assertEqual(1, on_cancelled_cb.call_count) From 86934c8863ed985fb3dc7c53552b29f58c23b9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 6 Dec 2017 16:03:19 +0100 Subject: [PATCH 2/9] Support M114 response from RepRapFirmware RRF uses format X:... Y:... Z:... E0:... E1:... instead of X:... Y:... Z:... E:... --- .../plugins/virtual_printer/virtual.py | 35 ++++-- src/octoprint/settings.py | 1 + src/octoprint/util/comm.py | 116 ++++++++++++++---- tests/util/test_comm_helpers.py | 99 +++++++++++++++ 4 files changed, 214 insertions(+), 37 deletions(-) diff --git a/src/octoprint/plugins/virtual_printer/virtual.py b/src/octoprint/plugins/virtual_printer/virtual.py index a3991ccff..a0d490fc3 100644 --- a/src/octoprint/plugins/virtual_printer/virtual.py +++ b/src/octoprint/plugins/virtual_printer/virtual.py @@ -88,7 +88,7 @@ class VirtualPrinter(object): self._lastX = 0.0 self._lastY = 0.0 self._lastZ = 0.0 - self._lastE = 0.0 + self._lastE = [0.0] * self.extruderCount self._lastF = 200 self._unitModifier = 1 @@ -428,7 +428,19 @@ class VirtualPrinter(object): self._deleteSdFile(filename) def _gcode_M114(self, data): - output = "X:{} Y:{} Z:{} E:{} Count: A:{} B:{} C:{}".format(self._lastX, self._lastY, self._lastZ, self._lastE, int(self._lastX*100), int(self._lastY*100), int(self._lastZ*100)) + if settings().getBoolean(["devel", "virtualPrinter", "reprapfwM114"]): + output = "X:{} Y:{} Z:{} {}".format(self._lastX, + self._lastY, + self._lastZ, + " ".join(["E{}:{}".format(num, self._lastE[self.currentExtruder]) for num in range(self.extruderCount)])) + else: + output = "X:{} Y:{} Z:{} E:{} Count: A:{} B:{} C:{}".format(self._lastX, + self._lastY, + self._lastZ, + self._lastE[self.currentExtruder], + int(self._lastX*100), + int(self._lastY*100), + int(self._lastZ*100)) if not self._okBeforeCommandOutput: ok = self._ok() if ok: @@ -482,7 +494,7 @@ class VirtualPrinter(object): if self._lastZ is not None: self._lastZ *= 2.54 if self._lastE is not None: - self._lastE *= 2.54 + self._lastE = [e * 2.54 if e is not None else None for e in self._lastE] def _gcode_G21(self, data): self._unitModifier = 1.0 @@ -493,7 +505,7 @@ class VirtualPrinter(object): if self._lastZ is not None: self._lastZ /= 2.54 if self._lastE is not None: - self._lastE /= 2.54 + self._lastE = [e / 2.54 if e is not None else None for e in self._lastE] def _gcode_G90(self, data): self._relative = False @@ -894,15 +906,16 @@ class VirtualPrinter(object): if matchE is not None: try: e = float(matchE.group(1)) - if self._relative or self._lastE is None: + lastE = self._lastE[self.currentExtruder] + if self._relative or lastE is None: duration = max(duration, e * self._unitModifier / speedE * 60.0) else: - duration = max(duration, (e - self._lastE) * self._unitModifier / speedE * 60.0) + duration = max(duration, (e - lastE) * self._unitModifier / speedE * 60.0) - if self._relative and self._lastE is not None: - self._lastE += e + if self._relative and lastE is not None: + self._lastE[self.currentExtruder] += e else: - self._lastE = e + self._lastE[self.currentExtruder] = e except: pass @@ -922,7 +935,7 @@ class VirtualPrinter(object): matchE = re.search("E([0-9.]+)", line) if matchX is None and matchY is None and matchZ is None and matchE is None: - self._lastX = self._lastY = self._lastZ = self._lastE = 0 + self._lastX = self._lastY = self._lastZ = self._lastE[self.currentExtruder] = 0 else: if matchX is not None: try: @@ -941,7 +954,7 @@ class VirtualPrinter(object): pass if matchE is not None: try: - self._lastE = float(matchE.group(1)) + self._lastE[self.currentExtruder] = float(matchE.group(1)) except: pass diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 350c63bf9..d2929b013 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -367,6 +367,7 @@ default_settings = { "repetierStyleResends": False, "okBeforeCommandOutput": False, "smoothieTemperatureReporting": False, + "reprapfwM114": False, "extendedSdFileList": False, "throttle": 0.01, "sendWait": True, diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index e3fb219d3..09a3834fa 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -118,7 +118,7 @@ Groups will be as follows: * ``target``: new target temperature (float) """ -regex_position = re.compile("X:(?P{float})\s*Y:(?P{float})\s*Z:(?P{float})\s*E:(?P{float})".format(float=regex_float_pattern)) +regex_position = re.compile("X:(?P{float})\s*Y:(?P{float})\s*Z:(?P{float})\s*((E:(?P{float}))|(?P(E\d+:{float}\s*)+))".format(float=regex_float_pattern)) """Regex for matching position reporting. Groups will be as follows: @@ -126,7 +126,17 @@ Groups will be as follows: * ``x``: X coordinate * ``y``: Y coordinate * ``z``: Z coordinate - * ``e``: E coordinate + * ``e``: E coordinate if present, or + * ``es``: multiple E coordinates if present, to be parsed further with regex_e_positions +""" + +regex_e_positions = re.compile("E(?P\d+):(?P{float})".format(float=regex_float_pattern)) +"""Regex for matching multiple E coordinates in a position report. + +Groups will be as follows: + + * ``id``: id of the extruder or which the position is reported + * ``value``: reported position value """ regex_firmware_splitter = re.compile("\s*([A-Z0-9_]+):") @@ -218,29 +228,39 @@ gcodeToEvent = { } class PositionRecord(object): + _standard_attrs = {"x", "y", "z", "e", "f", "t"} + + @classmethod + def valid_e(cls, attr): + if not attr.startswith("e"): + return False + + try: + int(attr[1:]) + except: + return False + + return True + def __init__(self, *args, **kwargs): - self.x = kwargs.get("x") - self.y = kwargs.get("y") - self.z = kwargs.get("z") - self.e = kwargs.get("e") - self.f = kwargs.get("f") - self.t = kwargs.get("t") + attrs = self._standard_attrs | set([key for key in kwargs if self.valid_e(key)]) + for attr in attrs: + setattr(self, attr, kwargs.get(attr)) def copy_from(self, other): - self.x = other.x - self.y = other.y - self.z = other.z - self.e = other.e - self.f = other.f - self.t = other.t + # make sure all standard attrs and attrs from other are set + attrs = self._standard_attrs | set([key for key in dir(other) if self.valid_e(key)]) + for attr in attrs: + setattr(self, attr, getattr(other, attr)) + + # delete attrs other doesn't have + attrs = set([key for key in dir(self) if self.valid_e(key)]) - attrs + for attr in attrs: + delattr(self, attr) def as_dict(self): - return dict(x=self.x, - y=self.y, - z=self.z, - e=self.e, - t=self.t, - f=self.f) + attrs = self._standard_attrs | set([key for key in dir(self) if self.valid_e(key)]) + return dict((attr, getattr(self, attr)) for attr in attrs) class TemperatureRecord(object): def __init__(self): @@ -1306,17 +1326,26 @@ class MachineCom(object): # position report processing if 'X:' in line and 'Y:' in line and 'Z:' in line: - match = regex_position.search(line) - if match: + parsed = parse_position_line(line) + if parsed: # we don't know T or F when printing from SD since # there's no way to query it from the firmware and # no way to track it ourselves when not streaming # the file - this all sucks sooo much self.last_position.valid = True - self.last_position.x = float(match.group("x")) - self.last_position.y = float(match.group("y")) - self.last_position.z = float(match.group("z")) - self.last_position.e = float(match.group("e")) + self.last_position.x = parsed.get("x") + self.last_position.y = parsed.get("y") + self.last_position.z = parsed.get("z") + + if "e" in parsed: + self.last_position.e = parsed.get("e") + else: + # multiple extruder coordinates provided, find current one + self.last_position.e = parsed.get("e{}".format(self._currentTool)) if not self.isSdFileSelected() else None + + for key in [key for key in parsed if key.startswith("e") and len(key) > 1]: + setattr(self.last_position, key, parsed.get(key)) + self.last_position.t = self._currentTool if not self.isSdFileSelected() else None self.last_position.f = self._currentF if not self.isSdFileSelected() else None @@ -3474,6 +3503,41 @@ def parse_resend_line(line): return None +def parse_position_line(line): + """ + Parses the provided M114 response line and returns the parsed coordinates. + + Args: + line (str): the line to parse + + Returns: + dict or None: the parsed coordinates, or None if no coordinates could be parsed + """ + + match = regex_position.search(line) + if match is not None: + result = dict(x=float(match.group("x")), + y=float(match.group("y")), + z=float(match.group("z"))) + if match.group("e") is not None: + # report contains only one E + result["e"] = float(match.group("e")) + + elif match.group("es") is not None: + # report contains individual entries for multiple extruders ("E0:... E1:... E2:...") + es = match.group("es") + for m in regex_e_positions.finditer(es): + result["e{}".format(m.group("id"))] = float(m.group("value")) + + else: + # apparently no E at all, should never happen but let's still handle this + return None + + return result + + return None + + def gcode_command_for_cmd(cmd): """ Tries to parse the provided ``cmd`` and extract the GCODE command identifier from it (e.g. "G0" for "G0 X10.0"). diff --git a/tests/util/test_comm_helpers.py b/tests/util/test_comm_helpers.py index 0da2cf609..10ab72122 100644 --- a/tests/util/test_comm_helpers.py +++ b/tests/util/test_comm_helpers.py @@ -297,3 +297,102 @@ class TestCommHelpers(unittest.TestCase): from octoprint.util.comm import parse_resend_line result = parse_resend_line(line) self.assertEqual(expected, result) + + @data( + # Marlin + ("ok X:62.417 Y:64.781 Z:0.2 E:2.72328 Count: A:6241 B:6478 C:20", dict(x=62.417, + y=64.781, + z=0.2, + e=2.72328)), + ("X:62.417 Y:64.781 Z:0.2 E:2.72328 Count: A:6241 B:6478 C:20", dict(x=62.417, + y=64.781, + z=0.2, + e=2.72328)), + + # RepRapFirmware + ("X:96.99 Y:88.31 Z:0.30 E0:0.0 E1:0.0 E2:0.0 E3:0.0 E4:0.0 E5:0.0", dict(x=96.99, + y=88.31, + z=0.3, + e0=0.0, + e1=0.0, + e2=0.0, + e3=0.0, + e4=0.0, + e5=0.0)), + + # invalid + ("", None), + ("X:62.417 Y:64.781 Z:0.2", None) + ) + @unpack + def test_parse_position_line(self, line, expected): + from octoprint.util.comm import parse_position_line + result = parse_position_line(line) + if expected is None: + self.assertIsNone(result) + else: + self.assertDictEqual(expected, result) + + +class TestPositionRecord(unittest.TestCase): + + def test_as_dict_regular(self): + coords = dict(x=1, y=2, z=3, e=4) + + position = self._create_position(**coords) + + expected = dict(coords) + expected.update(dict(f=None, t=None)) + self.assertDictEqual(position.as_dict(), expected) + + def test_as_dict_extra_e(self): + coords = dict(x=1, y=2, z=3, e0=4, e1=5) + + position = self._create_position(**coords) + + expected = dict(coords) + expected.update(dict(e=None, f=None, t=None)) + self.assertDictEqual(position.as_dict(), expected) + + def test_copy_from_regular(self): + coords = dict(x=1, y=2, z=3, e=4) + position1 = self._create_position(**coords) + position2 = self._create_position() + + position2.copy_from(position1) + + expected = dict(coords) + expected.update(dict(f=None, t=None)) + self.assertDictEqual(position2.as_dict(), expected) + + def test_copy_from_extra_e(self): + coords = dict(x=1, y=2, z=3, e0=4, e1=5) + position1 = self._create_position(**coords) + position2 = self._create_position() + + position2.copy_from(position1) + + expected = dict(coords) + expected.update(dict(e=None, f=None, t=None)) + self.assertDictEqual(position2.as_dict(), expected) + + def test_copy_from_extra_e_changed(self): + coords1 = dict(x=1, y=2, z=3, e0=4, e1=5) + position1 = self._create_position(**coords1) + + coords2 = dict(x=2, y=4, z=6, e0=8, e1=10, e2=12) + position2 = self._create_position(**coords2) + + expected_before = dict(coords2) + expected_before.update(dict(e=None, f=None, t=None)) + self.assertDictEqual(position2.as_dict(), expected_before) + + position2.copy_from(position1) + + expected_after = dict(coords1) + expected_after.update(dict(e=None, f=None, t=None)) + self.assertDictEqual(position2.as_dict(), expected_after) + + def _create_position(self, **kwargs): + from octoprint.util.comm import PositionRecord + return PositionRecord(**kwargs) From 0a2e2ed297e419999197b3c209258a79538a2992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 7 Dec 2017 11:15:43 +0100 Subject: [PATCH 3/9] Don't write default update type & method to config If we set method to pip in 1.3.6 and then roll back to 1.3.5 we will need to a manual config.yaml update otherwise or we will no longer be able to update. Be removing the force parameter and using the actual default settings instead of current ones, we don't do that anymore. --- .../plugins/softwareupdate/__init__.py | 32 ++++--------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/src/octoprint/plugins/softwareupdate/__init__.py b/src/octoprint/plugins/softwareupdate/__init__.py index adcbb84a5..6d91000a8 100644 --- a/src/octoprint/plugins/softwareupdate/__init__.py +++ b/src/octoprint/plugins/softwareupdate/__init__.py @@ -306,30 +306,10 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, if "notify_users" in data: self._settings.set_boolean(["notify_users"], data["notify_users"]) - checks = self._get_configured_checks() - if "octoprint" in checks: - check = checks["octoprint"] - update_type = check.get("type", None) - update_method = self._get_update_method("octoprint", check) - checkout_folder = check.get("checkout_folder", None) - update_folder = check.get("update_folder", None) - prerelease = check.get("prerelease", False) - prerelease_channel = check.get("prerelease_channel", None) - else: - update_type = update_method = checkout_folder = update_folder = prerelease_channel = None - prerelease = False - defaults = dict( plugins=dict(softwareupdate=dict( checks=dict( - octoprint=dict( - type=update_type, - method=update_method, - checkout_folder=checkout_folder, - update_folder=update_folder, - prerelease=prerelease, - prerelease_channel=prerelease_channel - ) + octoprint=self.get_settings_defaults()["checks"]["octoprint"] ) )) ) @@ -338,7 +318,7 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, if "octoprint_checkout_folder" in data: self._settings.set(["checks", "octoprint", "checkout_folder"], data["octoprint_checkout_folder"], defaults=defaults, force=True) - if update_folder and data["octoprint_checkout_folder"]: + if self._settings.get(["checks", "octoprint", "update_folder"]) and data["octoprint_checkout_folder"]: self._settings.set(["checks", "octoprint", "update_folder"], None, defaults=defaults, force=True) updated_octoprint_check_config = True @@ -346,13 +326,13 @@ class SoftwareUpdatePlugin(octoprint.plugin.BlueprintPlugin, octoprint_type = data["octoprint_type"] if octoprint_type == "github_release": - self._settings.set(["checks", "octoprint", "type"], octoprint_type, defaults=defaults, force=True) - self._settings.set(["checks", "octoprint", "method"], "pip", defaults=defaults, force=True) + self._settings.set(["checks", "octoprint", "type"], octoprint_type, defaults=defaults) + self._settings.set(["checks", "octoprint", "method"], "pip", defaults=defaults) updated_octoprint_check_config = True elif octoprint_type == "git_commit": - self._settings.set(["checks", "octoprint", "type"], octoprint_type, defaults=defaults, force=True) - self._settings.set(["checks", "octoprint", "method"], "update_script", defaults=defaults, force=True) + self._settings.set(["checks", "octoprint", "type"], octoprint_type, defaults=defaults) + self._settings.set(["checks", "octoprint", "method"], "update_script", defaults=defaults) updated_octoprint_check_config = True if "octoprint_release_channel" in data: From 133a4658ee678daa6218dd48764674c026353085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 7 Dec 2017 16:35:01 +0100 Subject: [PATCH 4/9] Switch to https for (plugins.)octoprint.org Also add utm tags to the two support-octoprint links so we have a chance to see if anyone ever actually clicks on those. --- src/octoprint/plugins/announcements/__init__.py | 10 +++++----- .../templates/corewizard_pluginblacklist_wizard.jinja2 | 2 +- .../templates/octopi_support_about.jinja2 | 2 +- src/octoprint/plugins/pluginmanager/__init__.py | 4 ++-- .../templates/pluginmanager_settings.jinja2 | 2 +- src/octoprint/settings.py | 2 +- src/octoprint/templates/dialogs/about/about.jinja2 | 4 ++-- .../templates/dialogs/settings/features.jinja2 | 2 +- .../templates/dialogs/wizard/firstrun_end.jinja2 | 2 +- src/octoprint/templates/index.jinja2 | 2 +- .../server/serverPluginBlacklistDescription.jinja2 | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/octoprint/plugins/announcements/__init__.py b/src/octoprint/plugins/announcements/__init__.py index 668bc3cdc..c5d6935bd 100644 --- a/src/octoprint/plugins/announcements/__init__.py +++ b/src/octoprint/plugins/announcements/__init__.py @@ -60,27 +60,27 @@ class AnnouncementPlugin(octoprint.plugin.AssetPlugin, description="Important announcements about OctoPrint.", priority=1, type="rss", - url="http://octoprint.org/feeds/important.xml"), + url="https://octoprint.org/feeds/important.xml"), _releases=dict(name="Release Announcements", description="Announcements of new releases and release candidates of OctoPrint.", priority=2, type="rss", - url="http://octoprint.org/feeds/releases.xml"), + url="https://octoprint.org/feeds/releases.xml"), _blog=dict(name="On the OctoBlog", description="Development news, community spotlights, OctoPrint On Air episodes and more from the official OctoBlog.", priority=2, type="rss", - url="http://octoprint.org/feeds/octoblog.xml"), + url="https://octoprint.org/feeds/octoblog.xml"), _plugins=dict(name="New Plugins in the Repository", description="Announcements of new plugins released on the official Plugin Repository.", priority=2, type="rss", - url="http://plugins.octoprint.org/feed.xml"), + url="https://plugins.octoprint.org/feed.xml"), _octopi=dict(name="OctoPi News", description="News around OctoPi, the Raspberry Pi image including OctoPrint.", priority=2, type="rss", - url="http://octoprint.org/feeds/octopi.xml")), + url="https://octoprint.org/feeds/octopi.xml")), enabled_channels=[], forced_channels=["_important"], channel_order=["_important", "_releases", "_blog", "_plugins", "_octopi"], diff --git a/src/octoprint/plugins/corewizard/templates/corewizard_pluginblacklist_wizard.jinja2 b/src/octoprint/plugins/corewizard/templates/corewizard_pluginblacklist_wizard.jinja2 index 5c6eebbea..744bcbc0d 100644 --- a/src/octoprint/plugins/corewizard/templates/corewizard_pluginblacklist_wizard.jinja2 +++ b/src/octoprint/plugins/corewizard/templates/corewizard_pluginblacklist_wizard.jinja2 @@ -6,7 +6,7 @@ normal operation, allowing you to uninstall or update them to a newer version. {% endtrans %}

-

{% trans url="http://plugins.octoprint.org/blacklist/" %} +

{% trans url="https://plugins.octoprint.org/blacklist/" %} By default, OctoPrint will use the blacklist hosted at plugins.octoprint.org/blacklist.json which you can also take a look at in a more human readable format here. {% endtrans %}

diff --git a/src/octoprint/plugins/octopi_support/templates/octopi_support_about.jinja2 b/src/octoprint/plugins/octopi_support/templates/octopi_support_about.jinja2 index 5e0212b31..6dcb2d674 100644 --- a/src/octoprint/plugins/octopi_support/templates/octopi_support_about.jinja2 +++ b/src/octoprint/plugins/octopi_support/templates/octopi_support_about.jinja2 @@ -5,7 +5,7 @@

Version {{ plugin_octopi_support_version }}

diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py index c8ef95b92..2ee271bb4 100644 --- a/src/octoprint/plugins/pluginmanager/__init__.py +++ b/src/octoprint/plugins/pluginmanager/__init__.py @@ -117,9 +117,9 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin, def get_settings_defaults(self): return dict( - repository="http://plugins.octoprint.org/plugins.json", + repository="https://plugins.octoprint.org/plugins.json", repository_ttl=24*60, - notices="http://plugins.octoprint.org/notices.json", + notices="https://plugins.octoprint.org/notices.json", notices_ttl=6*60, pip_args=None, pip_force_user=False, diff --git a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 index 4dc8b2ae7..6541c2b58 100644 --- a/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 +++ b/src/octoprint/plugins/pluginmanager/templates/pluginmanager_settings.jinja2 @@ -133,7 +133,7 @@ {{ pluginmanager_safemode() }} {{ pluginmanager_offline() }}

- {{ _('... from the Plugin Repository', url='http://plugins.octoprint.org') }} + {{ _('... from the Plugin Repository', url='https://plugins.octoprint.org') }}