From a0a3aa79ac894bee65b3c6941b75c1b09987ec56 Mon Sep 17 00:00:00 2001 From: lixxbox Date: Tue, 11 May 2021 15:01:35 +0200 Subject: [PATCH 1/4] docs: a simple recommendation for remote access (#277) * docs: a simple recommendation for remote access new file: quicktips/remote-access.md * Update remote-access.md --- docs/quicktips/remote-access.md | 86 +++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 docs/quicktips/remote-access.md diff --git a/docs/quicktips/remote-access.md b/docs/quicktips/remote-access.md new file mode 100644 index 00000000..c235e854 --- /dev/null +++ b/docs/quicktips/remote-access.md @@ -0,0 +1,86 @@ +--- +layout: default +title: Remote Access +parent: Quicktips +permalink: /quicktips/remote-access +description: >- + A guide to safe remote access. +--- + +# {{ page.title }} +{{ page.description }} + +__Notice__ +This is not a complete guide with every single step in detail, but rather a recommendation of what to do and especially what not to do to get access to the printer from somewhere remote from your network. +{: .info} + +You have to decide if you .. +- only want to have status messages on your smartphone +- or you need full remote access to Mainsail from everywhere + +Of course, you can also use a combination of both. + +## Status messages + +For simple status messages there are a couple of additional tools that can be used: +- __discord:__ Mooncord is a bot that sends you status messages over discord. +[https://github.com/eliteSchwein/mooncord](https://github.com/eliteSchwein/mooncord) +- __telegram:__ moonraker-telegram is a bot that sends you status messages over telegram. +[https://github.com/Raabi91/moonraker-telegram](https://github.com/Raabi91/moonraker-telegram) + +These tools are installed on the local machine and send the status messages via the respective platforms. Thus, no access to your local network from outside is necessary. + +For details, please refer to the projects instructions. + +## Remote Access to Mainsail + +
+What not to do: + + https://isc.sans.edu/forums/diary/3D+Printers+in+The+Wild+What+Can+Go+Wrong/24044/ +
+ +
+What you could do: + +
+ +
+Recommendation what you should do: + +
+ +## Set up VPN + +Several routers allow you to set up a VPN tunnel without much effort. +After you have entered the login data into e.g. your smartphone, you will have secure access to your entire network, including Mainsail. + +If your router does not support this, you can also set up your own VPN, e.g. on your Pi. +Therefore you could use: [OpenVPN](https://openvpn.net/), [WireGuard](https://www.wireguard.com/) or [PiVPN](https://www.pivpn.io/) + +To be able to reach your home network even with a non-static IP address, you should use a dynamic DNS service. This will forward a domain directly to your IP address. Often, these DynDNS services can also be set up directly in the router, so that the IP address gets automatically updated on a change. + +Some free services: [DuckDNS](https://www.duckdns.org) or [FreeDNS ](https://freedns.afraid.org/) + +__Notice__ +The devices that dial in via the VPN tunnel are assigned to a different address range. This address range must be configured in moonraker under _trusted_clients_ and _cors_domains_. [https://moonraker.readthedocs.io/en/latest/configuration/#authorization](https://moonraker.readthedocs.io/en/latest/configuration/#authorization)

+For example: +__192.168.1__.x _// devices on your regular LAN_ +__192.168.50__.x _// devices connected through your VPN tunnel_ +{: .info} From 6096704fe542dc7057cc127878fab013cfaca0b9 Mon Sep 17 00:00:00 2001 From: Alex Zellner <37265689+zellneralex@users.noreply.github.com> Date: Tue, 11 May 2021 15:02:29 +0200 Subject: [PATCH 2/4] remove defaut_parameter from macro (#276) * remove defaut_parameter Change macros in preparation of the removal of default_parameter * fix typo --- docs/necessary-cfg.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/necessary-cfg.md b/docs/necessary-cfg.md index 85748ee9..7abe70e6 100644 --- a/docs/necessary-cfg.md +++ b/docs/necessary-cfg.md @@ -35,27 +35,39 @@ These should be modified to your own needs. ```yaml [gcode_macro PAUSE] rename_existing: BASE_PAUSE -default_parameter_X: 230 #edit to your park position -default_parameter_Y: 230 #edit to your park position -default_parameter_Z: 10 #edit to your park position -default_parameter_E: 1 #edit to your retract length gcode: + ##### set defaults ##### + {% set x = params.X|default(230) %} #edit to your park position + {% set y = params.Y|default(230) %} #edit to your park position + {% set z = params.Z|default(10)|float %} #edit to your park position + {% set e = params.E|default(1) %} #edit to your retract length + ##### calculate save lift position ##### + {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set act_z = printer.toolhead.position.z|float %} + {% set lift_z = z|abs %} + {% if act_z < (max_z - lift_z) %} + {% set z_safe = lift_z %} + {% else %} + {% set z_safe = max_z - act_z %} + {% endif %} + ##### end of definitions ##### SAVE_GCODE_STATE NAME=PAUSE_state BASE_PAUSE G91 - G1 E-{E} F2100 - G1 Z{Z} + G1 E-{e} F2100 + G1 Z{z_safe} G90 - G1 X{X} Y{Y} F6000 + G1 X{x} Y{y} F6000 ``` ```yaml [gcode_macro RESUME] rename_existing: BASE_RESUME -default_parameter_E: 1 #edit to your retract length gcode: + ##### set defaults ##### + {% set e = params.E|default(1) %} #edit to your retract length G91 - G1 E{E} F2100 + G1 E{e} F2100 G90 RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 BASE_RESUME From 598a7fe94fac96ecd7f112e7000517c86c7e6d59 Mon Sep 17 00:00:00 2001 From: lixxbox Date: Tue, 11 May 2021 16:52:15 +0200 Subject: [PATCH 3/4] docs: stylesheets & escaping gcode (#279) * docs: just a few stylesheet adjustments modified: docs/_sass/color_schemes/mainsail.scss new file: docs/assets/img/alert.svg new file: docs/assets/img/info.svg new file: docs/assets/img/success.svg new file: docs/assets/img/warning.svg * docs: escape gcodes, so that it can be rendered. modified: necessary-cfg.md --- docs/_sass/color_schemes/mainsail.scss | 78 +++++++++++++------------- docs/assets/img/alert.svg | 1 + docs/assets/img/info.svg | 1 + docs/assets/img/success.svg | 1 + docs/assets/img/warning.svg | 1 + docs/necessary-cfg.md | 7 ++- 6 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 docs/assets/img/alert.svg create mode 100644 docs/assets/img/info.svg create mode 100644 docs/assets/img/success.svg create mode 100644 docs/assets/img/warning.svg diff --git a/docs/_sass/color_schemes/mainsail.scss b/docs/_sass/color_schemes/mainsail.scss index 83fb3d85..40974d05 100644 --- a/docs/_sass/color_schemes/mainsail.scss +++ b/docs/_sass/color_schemes/mainsail.scss @@ -1,52 +1,52 @@ $link-color: $red-300; $btn-primary-color: $red-300; +.success, .info, .warning, .alert { + margin: 16px 0px; + padding: 20px; + position: relative; + border-radius: 3px; + width: 100%; + display: block; + background: #f5f6fa; + border: 1px solid hsl(0, 0%, 85%); + border-left: 4px solid; + padding-left: 3.5em; + +} .success { - margin: 16px 0px; - padding: 20px; - position: relative; - border-radius: 3px; - width: 100%; - display: block; - background-color: #f5f6fa; - border-left: 4px solid; - border-color: rgb(38, 203, 124); + border-left-color: rgb(38, 203, 124); } - .info { - margin: 16px 0px; - padding: 20px; - position: relative; - border-radius: 3px; - width: 100%; - display: block; - background-color: #f5f6fa; - border-left: 4px solid; - border-color: rgb(56, 132, 255); + border-left-color: rgb(56, 132, 255); } - .warning { - margin: 16px 0px; - padding: 20px; - position: relative; - border-radius: 3px; - width: 100%; - display: block; - background-color: #f5f6fa; - border-left: 4px solid; - border-color: rgb(247, 125, 5); + border-left-color: rgb(247, 125, 5); +} +.alert { + border-left-color: rgb(255, 70, 66); } -.alert { - margin: 16px 0px; - padding: 20px; - position: relative; - border-radius: 3px; - width: 100%; - display: block; - background-color: #f5f6fa; - border-left: 4px solid; - border-color: rgb(255, 70, 66); +.success::before, .info::before, .warning::before, .alert::before { + display: inline-block; + position: absolute; + left: 1.0em; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + margin: 0px 10px 0px 0px; +} +.success::before { + content: url("/assets/img/success.svg"); +} +.info::before { + content: url("/assets/img/info.svg"); +} +.warning::before { + content: url("/assets/img/warning.svg"); +} +.alert::before { + content: url("/assets/img/alert.svg"); } .key { diff --git a/docs/assets/img/alert.svg b/docs/assets/img/alert.svg new file mode 100644 index 00000000..dd5a522e --- /dev/null +++ b/docs/assets/img/alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/img/info.svg b/docs/assets/img/info.svg new file mode 100644 index 00000000..0f824098 --- /dev/null +++ b/docs/assets/img/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/img/success.svg b/docs/assets/img/success.svg new file mode 100644 index 00000000..3aa19d35 --- /dev/null +++ b/docs/assets/img/success.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/assets/img/warning.svg b/docs/assets/img/warning.svg new file mode 100644 index 00000000..c13d986f --- /dev/null +++ b/docs/assets/img/warning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/necessary-cfg.md b/docs/necessary-cfg.md index 7abe70e6..4f518469 100644 --- a/docs/necessary-cfg.md +++ b/docs/necessary-cfg.md @@ -30,8 +30,9 @@ This enables pause / resume in mainsail. ``` # Macros -## for pause /resume / cancel functionality +## for pause / resume / cancel functionality These should be modified to your own needs. +{% raw %} ```yaml [gcode_macro PAUSE] rename_existing: BASE_PAUSE @@ -73,6 +74,7 @@ gcode: BASE_RESUME ``` + ```yaml [gcode_macro CANCEL_PRINT] rename_existing: BASE_CANCEL_PRINT @@ -82,11 +84,13 @@ gcode: SDCARD_RESET_FILE BASE_CANCEL_PRINT ``` +{% endraw %} # Optional ## customize klipper default commands for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate". +{% raw %} ```yaml [gcode_macro BED_MESH_CALIBRATE] rename_existing: BASE_BED_MESH_CALIBRATE @@ -99,3 +103,4 @@ gcode: BASE_BED_MESH_CALIBRATE #after the original gcode ``` +{% endraw %} \ No newline at end of file From f346db30fc5a26c733a6aedf58693c366a307d10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 May 2021 22:15:41 +0200 Subject: [PATCH 4/4] build(deps): bump rexml from 3.2.4 to 3.2.5 in /docs (#273) Bumps [rexml](https://github.com/ruby/rexml) from 3.2.4 to 3.2.5. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.4...v3.2.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/Gemfile.lock | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index e5d406a9..cb6674be 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -24,6 +24,7 @@ GEM http_parser.rb (~> 0.6.0) ethon (0.12.0) ffi (>= 1.3.0) + eventmachine (1.2.7) eventmachine (1.2.7-x64-mingw32) execjs (2.7.0) faraday (1.3.0) @@ -31,6 +32,7 @@ GEM multipart-post (>= 1.2, < 3) ruby2_keywords faraday-net_http (1.0.1) + ffi (1.14.2) ffi (1.14.2-x64-mingw32) forwardable-extended (2.6.0) gemoji (3.0.1) @@ -213,6 +215,8 @@ GEM multipart-post (2.1.1) nokogiri (1.11.1-x64-mingw32) racc (~> 1.4) + nokogiri (1.11.1-x86_64-linux) + racc (~> 1.4) octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) @@ -223,7 +227,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.4) + rexml (3.2.5) rouge (3.26.0) ruby-enum (0.9.0) i18n @@ -251,6 +255,7 @@ GEM tzinfo (>= 1.0.0) unf (0.1.4) unf_ext + unf_ext (0.0.7.7) unf_ext (0.0.7.7-x64-mingw32) unicode-display_width (1.7.0) wdm (0.1.1) @@ -258,6 +263,7 @@ GEM PLATFORMS x64-mingw32 + x86_64-linux DEPENDENCIES github-pages