From aa0e269446642a46952a9c43ad87e361fb2e04fd Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Tue, 20 Mar 2018 19:27:21 +0100 Subject: [PATCH] fixes and slashes --- DuetRRFOutputDevice.py | 10 +--------- DuetRRFPlugin.py | 2 ++ DuetRRFPlugin.qml | 2 +- README.md | 18 ++++++++++++++---- plugin.json | 2 +- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/DuetRRFOutputDevice.py b/DuetRRFOutputDevice.py index 7e9906a..2cc325e 100644 --- a/DuetRRFOutputDevice.py +++ b/DuetRRFOutputDevice.py @@ -33,15 +33,7 @@ class DeviceType(Enum): class DuetRRFOutputDevice(OutputDevice): - def __init__( - self, - name="DuetRRF", - url="http://printer.local", - duet_password="reprap", - http_user=None, - http_password=None, - device_type=DeviceType.print - ): + def __init__(self, name, url, duet_password, http_user, http_password, device_type): self._device_type = device_type if device_type == DeviceType.print: description = catalog.i18nc("@action:button", "Print on {0}").format(name) diff --git a/DuetRRFPlugin.py b/DuetRRFPlugin.py index 16e2f12..af477b1 100644 --- a/DuetRRFPlugin.py +++ b/DuetRRFPlugin.py @@ -99,6 +99,8 @@ def saveInstance(self, oldName, name, url, duet_password, http_user, http_passwo manager = self.getOutputDeviceManager() if oldName and oldName != name: self.removeInstance(name) + if not url.endswith('/'): + url += '/' self._instances[name] = { "url": url, "duet_password": duet_password, diff --git a/DuetRRFPlugin.qml b/DuetRRFPlugin.qml index f2ee99b..433934c 100644 --- a/DuetRRFPlugin.qml +++ b/DuetRRFPlugin.qml @@ -257,7 +257,7 @@ UM.Dialog Item { width: parent.width; height: displayNameLabel.height; } Label { visible: !instanceDialog.validUrl; - text: catalog.i18nc("@error", "URL not valid. Example: http://192.168.1.42"); + text: catalog.i18nc("@error", "URL not valid. Example: http://192.168.1.42/"); } } diff --git a/README.md b/README.md index b6a8eb4..7b1d040 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,20 @@ above. * From the menu bar choose: Extensions -> DuetRRF -> DuetRRF Connections * Click "Add" * Enter the name of your printer -* Enter the URL to your DuetRRF instance, e.g., http://printer.local or http://192.168.1.42 -* Leave "HTTP Basic Auth" empty if you don't run a reverse-proxy + - e.g., `MyBigBox` +* Enter the URL to your DuetWifi/DuetEthernet board + - make sure this URL works if you copy & paste it into your browser + - if you browse to that URL, you should see the DuetWebControl (DWC) + - e.g., `http://printer.local/` or `http://192.168.1.42/` +* If you used `M551` in your `config.g`, enter the password + - e.g., `my_little!secret` or the default `reprap` +* If you use a reverse proxy to add *HTTP Basic Auth*, enter the credentials + - if you don't know what *HTTP Basic Auth* is, leave these fields empty + - e.g., username: `alice`, password: `ecila` * Click "Ok" -* Done! Look at the bottom right - there should be the big blue button with you printer name on it! +* Done! + +Look at the bottom right - there should be the big blue button with you printer name on it! ## Features @@ -40,7 +50,7 @@ above. * Works with HTTP and HTTPS connections and URLS * Works with HTTP Basic Auth (optional) * Works with RRF passwords (if you used `M551`, default is `reprap`) -* No support for UNC paths as URL +* No support for UNC paths, only IP addresses or resolvable domain names (DNS) ## Use diff --git a/plugin.json b/plugin.json index 730fada..6491a59 100644 --- a/plugin.json +++ b/plugin.json @@ -2,6 +2,6 @@ "name": "DuetRRF", "author": "Thomas Kriechbaumer", "description": "Provides direct upload of gcode to DuetRRF.", - "version": "0.0.10", + "version": "0.0.11", "api": 4 }