* init test setup
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: ts typos
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: better tab system
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add touch support for drag&drop and split components
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add panel filter to each viewport
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: mjpegstreamerAdaptive dont start with a wront image url
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add i18n support for dashboard settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* test new flow and velocity
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* test build for live speed & flow
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: fix ToolSlider.vue for printsettings and machine limits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* remove debug output
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* rework MachineLimits
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: live extruder, toolhead speed and position data in StatusPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* test vue-echarts and dataset>source instead of series>data
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix disposed state of chart & delete update interval of settings page
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* init TS migation & dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: dashbaord console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add "disabled" status to the filament runout sensor on the dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix klipper restart process
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix status panel during a print
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert g-code files to typescript
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert history files to typescript
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert machine limits to typescript
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert update manager to typescript
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert endstops & logfiles to typescript
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix temp display in tools panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert machine > config files to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert select printer dialog to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert select printer menu to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert farm page to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix debug output of farm printer getters
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix import webcam streams in farm view
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* better handling when changing printers
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert heightmap to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert heightmap to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* Console QOL (#300)
* CHORE
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* NEW: console ts refactor, linux autocomplete, gui helplist, multiline
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* FIX: console autocomplete flood fix
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* fix merged console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fixed return of ConsoleTable.vue isCommand
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: add toast after creating file in ConfigFilesPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: file upload message
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add toolbar to files panels
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: disable scrollbars in TempChart.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: sidebar z-index and farm printer toolbar
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: sidebar & topbar z-index and farm printer toolbar
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* update toolbars in gcode-files and history
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: new settings dialog (#302)
* create settings dialog and integrate general, console, control, marcos, presets, webcams
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: renamed webcam gui state variable
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: temperature_fan chamber in farm printers dashboard
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: only display RPM in tools panel, when its available
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: reading empty remote printers list
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: loading additionalSensors in temp panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix: bed_mesh loading
rework heightmap settings
save heightmap settings in moonraker db
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add remote printers to settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix types
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add beforeDestroy to echarts
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add heightmap visualMap scaling and format tooltip
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: logo & primary color customizing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* remove keep-alive in app.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* round tempchart data
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* normalize toolbar buttons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix series attributes & update echarts-gl
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix hostname in sidebar
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* rework websocket loadings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix rework websocket loadings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* Fixes for console QOL PR (#301)
* FIX: command help dialog added
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* FIX: console fixes
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* rework events store
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: check customFilters if string or array
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: edit preset dont work (existing name check)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: save webcam with index 0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: tool combobox input dont work
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: tooltip position & z-index
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* rework console
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix output name of filament sensor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* store performance updates and StatusPanel.vue optimizing
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* console bugfixes
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix icon-rotate in temperatures panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add auto-grow to console input fields
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix dialog action button colors
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix refreshMetadata of gcocde files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add multi fileupload to drag&drop upload
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* convert SystemPanel to TS
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add init and getters for system panels
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add init and getters for system panels
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* finish SystemPanel.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: raspberry throttled flags in topbar
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: fix type in TheThrottledStates.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add new editor (#307)
* init test
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* theme test
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: switch to codemirror editor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: fix type in TheThrottledStates.vue
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* reformat flags output and deactivate debug output
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* add types to throttle states
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* display "dirty" in the board firmware version string
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix mini console array cut
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* delete old comment
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* fix config files on small devices
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: display macro description in settings tab
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* change settings icons
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* rename dashboard panel & change slider text in settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* responsive optimations for settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix throttled state flags filter
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* Code highlighting for codemirror (#309)
* init test
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* theme test
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: switch to codemirror editor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* NEW: klipper_config editor theme
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
* NEW: code highlighting for codemirror
Signed-off-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
Co-authored-by: Stefan Dej <meteyou@gmail.com>
* feature: hide/show jobs with special print status
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* redesign console help modal
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: default state of sidebar was wrong on mobile devices
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: mobile view interface settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: optimize mobile view interface settings
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: block empty console commands
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* push version number
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add current / max flow in status panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* feature: add big gcode thumbnail to status panel
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: fix favicon and setting tab names
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* cleanup old editor
Signed-off-by: Stefan Dej <meteyou@gmail.com>
* bugfix: add redirect for updates from 1.6.0 to 2.0.0
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Co-authored-by: Eike Ahmels <hui_buh-@gmx.net>
* Changed from Balena to RPI-Imager
Enhanced Docs accordingly
Signed-off-by: Stephan Wendel <me@stephanwe.de>
* Added 'include mainsail.cfg'
Fixed Typo
Signed-off-by: Stephan Wendel <me@stephanwe.de>
* Removed SSH Login, no need for that.
Fixed Typo
Signed-off-by: Stephan Wendel <me@stephanwe.de>
* Added some formatting
Signed-off-by: Stephan Wendel <me@stephanwe.de>
* add home and temp check
* add missing lines
* update description property
* get VELOCITY parameter if specified
* remove gcode state
save and restore of the gcode state is already part of the base macros
* 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
* language from js to json and new de language
* added translation to controlpanel, added translations
* de translation
fixed typo "rename"
* updated de translation
* fixes
* removed de.old
* updated de translation
* updated de local + deleted empty keys
* Update hu.json
Adding missing components, fixing doubled names (english+hungarian leftovers).
This is ready for release. Other changes after 0.16 release and live test will be requested.
* 2021 04 11 after todays changes up to date
also deleted previous problems, corrected the langage marks place, deleted not needed lines
* language from js to json and new de language
* added translation to controlpanel, added translations
* de translation
fixed typo "rename"
* updated de translation
* fixes
* removed de.old
* updated de translation
new file: assets/img/preview/Clippy2k.gif
new file: assets/img/preview/Mainsail2k.png
new file: assets/img/preview/Merlin2k.png
new file: assets/img/preview/Wallpaper2k.png
new file: assets/img/preview/logo2k.png
new file: assets/img/preview/menu2k.gif
new file: preview.md
Mainsail is a lightweight & responsive web interface for the [Klipper](https://github.com/KevinOConnor/klipper)
3D printer firmware. It communicates with the [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
Mainsail a lightweight & responsive web interface for [Klipper](https://github.com/KevinOConnor/klipper), the 3D printer firmware. It communicates with [Moonraker (Klipper-API)](https://github.com/arksine/moonraker) from [Arksine](https://github.com/arksine).
Mainsail is also available in remote mode on [http://my.mainsail.xyz](http://my.mainsail.xyz). Find out [more](https://docs.mainsail.xyz/setup#mymainsailxyz).
To begin using Mainsail start by [installing](https://meteyou.github.io/mainsail/setup/) it or read the [pages](https://meteyou.github.io/mainsail/) for more informations.
## Features
- Optimized for desktops, tablets and mobile devices
- Supports multiple 3D printers (Printer Farm)
- Localization (i18n)
- File Manager (gcode and config files)
- File Editor (gcode and config files)
- Print History / Stats
- Temperature Presets (with custom gcode)
- Bed Mesh Leveling
- Multi-Webcam support
- Control power devices (relays, TPLink, Tasmota, ..)
- Customizable UI (logos, backgrounds & even custom css)
For support join our discord server -> [https://discord.gg/skWTwTD](https://discord.gg/skWTwTD)
## Get support & assistance
Do you need help or just want to talk? Join us on [Discord](https://discord.gg/skWTwTD). We have a very active community.
Have you found a bug? Then we would like you to create an [issue](https://github.com/meteyou/mainsail/issues).
## Support this project
The project is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support the project.
description:Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
logo:"/assets/img/logo-mainsail.png"
description:A web interface for Klipper
# theme: just-the-docs
remote_theme:pmarsceill/just-the-docs
color_scheme:"mainsail"
search_enabled:true
aux_links:
"Mainsail on GitHub":
- "//github.com/meteyou/mainsail"
aux_links_new_tab:true
defaults:
-
scope:
path:""# an empty string here means all files in the project
Mainsail x Voron Toolhead,Various toolhead images inside the theme folder can be renamed to 'sidebar-background.png',eriroh,Mainsail-x-Voron-Toolhead-Theme
1
name
short_note
author
repo
2
Dracula
steadyjaw
dracula-mainsail-theme
3
Cyberpunk
Dario-Ciceri
cp2077-mainsail-theme
4
Mainsail x Voron Toolhead
Various toolhead images inside the theme folder can be renamed to 'sidebar-background.png'
- testers, who help find bugs in Mainsail, so they can be quickly fixed
- supporters via patreon/ko-fi
and of course the projects Mainsail is built on, especially [Klipper](https://github.com/KevinOConnor/klipper){:target="_blank"}, [Moonraker](https://github.com/Arksine/moonraker){:target="_blank"} and [MainsailOS](https://github.com/raymondh2/MainsailOS/){:target="_blank"}.
**THANK YOU for YOUR support. ❤️**
- TOC
{:toc}
# Contributors
| contributor | link |
|:--------|:-----|
{% for contributor in site.data.contributors %}{% if contributor.login != "meteyou" and contributor.login != "dependabot[bot]" %}|{: style="width: 20px; vertical-align: bottom;"} **{{ contributor.login }}**|[{{ contributor.html_url }}]({{ contributor.html_url }}){:target="_blank"}|
Restarting the api container will happen a lot, because simulavr WILL crash a lot! Timings within simulavr are not precise and klipper will bug alot about that.
## Todo
1. The current implementation of simulavr/moonraker/klipper is kinda naiv, because docker wont run with systemd.
I will fix that in later versions of the docker container, so you can restart specific containers and omit simulavr and bind a real connected printer for example.
Mainsail is a lightweight & responsive web interface for Klipper, the 3D printer firmware. It focuses especially on an intuitive and consistent interface.
{: .fs-5 }
Mainsail is a lightweight & responsive web interface for the Klipper 3D printer firmware. It communicates with Moonraker (Klipper-API) from Arksine.
[Setup Guide](/setup-guide/index.md){: .btn}
For support join our discord server -> [https://discord.gg/skWTwTD](https://discord.gg/skWTwTD)
The project is primarily developed and maintained by meteyou. To keep the project going he invests his free time, almost every day. To motivate him (☕🍺😜) there are several ways to support the project.
Mainsail requires a minimum configuration to function properly. It should give you a warning at startup if the required parts are not found in your configuration.
## Required configuration
### virtual_sdcard
# Required configuration
## virtual_sdcard
This allows gcode file uploads.
```yaml
[virtual_sdcard]
path:~/gcode_files
```
### display_status
## display_status
This is required for messages in your status panel, if you don't have a `[display]` in your configuration.
```yaml
[display_status]
```
### pause / resume / cancel
## pause / resume / cancel
This enables pause / resume in mainsail.
```yaml
[pause_resume]
```
## Macros
### for pause /resume / cancel functionality
# Macros
## for pause /resume / cancel functionality
These should be modified to your own needs.
{% raw %}
```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
description:Pause the actual running print
rename_existing:PAUSE_BASE
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
##### 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 #####
PAUSE_BASE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{e} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe}
G90
G1 X{x} Y{y} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
```
```yaml
[gcode_macro RESUME]
rename_existing:BASE_RESUME
default_parameter_E:1#edit to your retract length
description:Resume the actual running print
rename_existing:RESUME_BASE
gcode:
##### set defaults #####
{% set e = params.E|default(1) %}#edit to your retract length
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E{e} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
```
```yaml
[gcode_macro CANCEL_PRINT]
rename_existing:BASE_CANCEL_PRINT
description:Cancel the actual running print
rename_existing:CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
CANCEL_PRINT_BASE
```
{% endraw %}
## Optional
# Optional
### customize klipper default commands
## customize klipper default commands
for example, if you want to adjust the `BED_MESH_CALIBRATE` command, which you can run from "heightmap > calibrate".
We would like to give you a little sneak peak on the next big thing.
---
# Sneak Peak
Some users have asked which new features are planned for Mainsail 2.0. So we would like to give you a little sneak peak.
# Ground breaking changes
We have completely rethought the system of Mainsail and MainsailOS and will further bring the OS aspect to the focus. This will include a **complete design overhaul** to integrate **the all new help assistant**.
Due to the major changes we will probably jump directly to **Mainsail 2000** instead of 2.0.
Integrate additional sensors into the temperature graph. For example Raspberry Pi, MCU, BMExxx, HTU21D, LM75 and more..
---
# {{ page.title }}
{{ page.description }}
## Raspberry Pi temperature sensor
Append the following section to your printer.cfg:
```yaml
[temperature_sensor raspberry_pi]
sensor_type:temperature_host
min_temp:10
max_temp:100
```
## ATSAM, ATAMD, and STM32 temperature sensor
Append the following section to your printer.cfg:
```yaml
[temperature_sensor mcu_temp]
sensor_type:temperature_mcu
min_temp:0
max_temp:100
```
For more information on this topic and how to add additional sensors, please refer to [Klipper documentation](https://www.klipper3d.org/Config_Reference.html#builtin-micro-controller-temperature-sensor){:target="_blank"}.
Since Mainsail 1.5.0 it is possible to report and visualize print statistics. These contain various information such as print status, print duration, amount of filament used, etc.
Mainsail supports so-called presets. They are often used for preheat & cooldown, but also execute normal gcode.
---
# {{ page.title }}
{{ page.description }}
## Setup
In Mainsails interface settings you will find a section called "Preheat Presets". There you can set your presets via "ADD PRESET" and the following dialog.
### Preheat
Enter a name \(e.g. name, color and type of filament\) and the temperatures obtained. You can disable individual heaters and even specify a custom gcode for the preheat phase. The gcode will be executed after the selected temperatures are set.

### Further Examples
#### Z-Offset
To quickly switch between different Z-offsets \(flexplates with smooth and textured surfaces\), you can create presets and deactivate the heaters.
As G-Code you simply enter `SET_GCODE_OFFSET Z=0.2`, of course with your determined offset.
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.
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
<div class="alert">
What <b>not to do</b>:
<ul>
<li>Please do not open ports of Mainsail/Moonraker in your router to the rest of the world. There are plenty of reports of Octoprint installations being freely accessible on the Internet, with just as many reasons why this is not a good idea.</li>
<li>Use an external service provider (e.g. tailscale) to gain access to your home network.
<ul>
<li>Con: you give the control out of your hand</li>
</ul>
</li>
<li>Reverse Proxy</li>
</ul>
</div>
<div class="success">
<b>Recommendation</b> what you <b>should do</b>:
<ul>
<li>Set up your own secured VPN tunnel.
<ul>
<li>either in the router</li>
<li>or your Pi</li>
</ul>
</li>
</ul>
</div>
## 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) <br/><br/>
For example:
__192.168.1__.x _// devices on your regular LAN_
__192.168.50__.x _// devices connected through your VPN tunnel_
You can find further information on this topic by checking out the [Moonraker documentation](https://github.com/Arksine/moonraker/blob/master/docs/configuration.md#update_manager){:target="_blank"}.
- [Kiauh (Klipper Install And Update Helper)](kiauh.md)
- [Manual Setup](manual-setup/index.md)
To get started, you first have to decide which route you want to follow for the installation. There are several ways to install Mainsail on a Raspberry Pi.
A prebuilt image for your Raspberry Pi. Flash it and you are almost ready to go.
- [KIAUH](kiauh.md) - _Klipper Installation And Update Helper_
A script toolbox to install and keep Klipper, Moonraker and Mainsail up to date. It contains many additional features and is the way to go for multiprinter setups.
- [Manual Setup](manual-setup/index.md)
The rocky road. If you want to know how everything is set up by hand, you will get all the information here.
## my.mainsail.xyz
In addition to these guides, there is [my.mainsail.xyz](http://my.mainsail.xyz){: target="_blank"}. The latest Mainsail version is always hosted there. This obviates the need to set up a web server for Mainsail on your hardware.
To use [my.mainsail.xyz](http://my.mainsail.xyz){: target="_blank"}, the following requirements must be met:
- Klipper must be installed.
- Moonraker must be installed.
- my.mainsail.xyz must be configured as a CORS domain in moonraker.conf.
**MainsailOS & KIAUH already fulfill these requirements.**
_Note_, only the static .html, .js and .css files are loaded into your browser storage. No further information is transferred to the server. The communication to your printer is then done locally directly between your browser and your Moonraker installation.
If you have any concerns, you can of course still install Mainsail on your hardware locally. Parallel operation is also possible.
Kiauh is a tool that helps you install or upgrade Klipper, Moonraker, Mainsail and various
other extensions easily and comfortably.
[KIAUH](https://github.com/th33xitus/kiauh) is a handy tool that helps you install or upgrade Klipper, Moonraker, Mainsail and various other extensions easily and comfortably.
For more informations and get to the guide click [here](https://github.com/th33xitus/kiauh).

For more information and get to the guide click [here](https://github.com/th33xitus/kiauh).
The recommended way to install Mainsail on a Raspberry Pi is to use [MainsailOS](https://github.com/raymondh2/MainsailOS),
a pre-packaged disk image. If you are building a custom configuration, you may need to skip
Our recommended way to install Mainsail on a Raspberry Pi is to use [MainsailOS](https://github.com/raymondh2/MainsailOS),
as pre-packaged disk image. If you are building a custom configuration, you may need to skip
these instructions and install Mainsail [manually](manual-setup/index.md).
1. Download the latest mainsailOS [Release](https://github.com/raymondh2/MainsailOS/releases)
2. Unzip the .img file from your download.
3. Use [BalenaEtcher](https://www.balena.io/etcher/) to write the .img on to an 8GB, or larger SDcard. *THIS WILL DESTROY ALL DATA ON YOUR CARD*.
**Note: To avoid confusion, the described way is available for Windows, Linux and MacOS because RPI Imager is a Multiplatform Tool!**
{: .info}
_note: It is a good idea to use a premium SDcard from a reputable manufacturer such as Sandisk, Kingston or Samsung. Low end cards will often fail quickly when used in this application_
_Note: It is a good idea to use a premium SDcard from a reputable manufacturer such as Sandisk, Kingston or Samsung. Perfomancewise you should consider using a "A1" or better, marked SDCard. Low end cards will often fail quickly when used in this application
**PLEASE OBEY THAT THIS WILL DESTROY ALL DATA ON YOUR CARD**_
{: .alert}
4. If you will be using wifi, edit the file `mainsailos-wpa-supplicant.txt` with your Wifi information. If you are having troubleseeing this file on the sdcard, try removing it and re-inserting it into your card reader.
5. Make sure that your MCU(s) is connected to your pi, If you will be using wired networking, also make sure your ethernet cable is connected.
5. Insert the SDcard into your Pi, and power on the Pi.
6. Find your pi on the network, and ssh into it, (Using PuTTY on Windows or the terminal on MacOS)
* If your network supports bonjour, the pi should show up as `mainsailos.local`
* If your network automatically assigns DNS hostnames, it may simply show up as `mainsailos`
* Failing these two options, you may need to check your router's DHCP server, and find out what IP address as been assigned to the device.
1. Download the latest [mainsailOS Release](https://github.com/raymondh2/MainsailOS/releases).
2. Download the latest [Raspberry Pi Imager](https://www.raspberrypi.org/software/), henceforth rpi-imager.
3. Install and Open rpi-imager. Now you should see a Window like this.

_Window Appereance depends on OS, in this case Linux with XFCE was used._
{: .info}
4. Now click on "CHOOSE OS", this will open a popup as shown below.
Click on "Use Custom"

This will open a Popup Window to browse your local files. Please navigate to your recently downloaded MainsailOS Zip Archive
_**DO NOT UNPACK THE ZIP FILE!**_
{: .alert}
After you've done that, it should look like this

5. Click on "Storage" and select your desired SDCard.

_As an Example..._
6. Now it's time to setup things like Hostname, Wifi, Language and more.
It depends on your needs what you setup, but it has to be WIFI and SSH at least!
7. As the last Step click on "Write", rpi-imager will give you a Warning. Click "YES" to continue...

8. Watch the Progressbar and wait until you see:

Hit the "Continue" Button and safely remove your SDCard. ( eg. unmount on Linux )
9. Insert the SDcard into your Pi, and power on the Pi.
_Note: Please give the PI some time, during the first boot MainsailOS (like every PI Image) will expand your "root" filesystem accordingly to your SDCard Size! The greater your SDCard is, it will take longer time! Watch out for the little green LED if it turn off or blink from time to time it has finished the resizing._
{: .warning}
_**Make sure that your MCU(s) is connected to your pi, If you will be using wired networking, also make sure your ethernet cable is connected.**_
{: .alert}
10. Find your pi on the network, open up your preferred Browser and type either your IP or Hostname (Depends on your Network configuration)
- If your network supports bonjour, the pi should show up as `mainsailos.local` or the given Hostname in the Setup Section.
- If your network automatically assigns DNS hostnames, it may simply show up as `mainsailos` or accordingly given Hostname.
- Failing these two options, you may need to check your router's DHCP server, and find out what IP address has been assigned to the device.
_**After you're able to get to the Mainsail Webinterface you should consider updating the System to get the latest features. Mainsail, Klipper and Moonraker got a relatively fast Development Cycle. We can't provide MainsailOS Image with all the latest and greatest. So we encourage you to Update on first Login**_
{: .info}
_If you decide to update, you should update in following order:_
1. System Update (Bring latest RaspberryOS Updates to the System)
2. Klipper Update ( To get latest Firmware, often flashing the MCU can wear out his memory )
3. Moonraker ( Having latest Version, could lead to more Features in Frontend )
4. Update Mainsail ( The most important! :P )
5. **Important:** Include the mainsail.cfg into your printer.cfg
This is a guide to setting up Klipper, Moonraker & Mainsail on a Raspberry Pi with Raspberry Pi OS. Other SBCs and/or Linux distributions might work, but may require a customized installation script or configs.
The following commands will clone Klipper to an appropriate directory in HOME and run the setup script.
```bash
cd ~
@@ -17,7 +17,7 @@ cd ~/klipper
./scripts/install-octopi.sh
```
### Configuration
## Configuration
After Klipper is installed, you will need to change the default location of the printer.cfg and add the UDS (unix domain socket). This is defined in the file `/etc/default/klipper`
To edit this file type:
@@ -55,8 +55,9 @@ path: ~/gcode_files
# for pause/resume functionality.
# Mainsail needs gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT` to make the buttons work.
```
> ℹ️ **These entries are very important.**
**These entries are very important.**
For the full functionality of mainsail, you should also define gcode macros for `PAUSE`, `RESUME` and `CANCEL_PRINT`. You'll find further information in [this](../../necessary-cfg.md){: target="_blank"} document.
{: .info }
After your config is in place, restart klipper with `sudo service klipper restart`. Check the `/tmp/klippy.log` for errors, if Klipper starts correctly you can continue the guide.
Now it should be possible to open the interface: `http://<printer-ip>/`.
### Important macros
## Important macros
if you want to get the full experience with mainsail and klipper virtual_sdcard print, you should use these macros, or use them as templates for your own.
> ⚠️ **Please pay attention to the following steps!**
## Configuration
**Please pay attention to the following steps!**
Misconfigured trusted_clients are a very common source of failure.
{: .warning }
For Moonraker you'll need to create a separate config file.
@@ -33,8 +34,9 @@ For Moonraker you'll need to create a separate config file.
Insert the following part and modify `trusted_clients` according to arksines description below.
Also consider further IP ranges, e.g. when connecting via VPN. To determine your local ip `ip a` and `ifconfig -a` are common ways to do so on Linux and `ipconfig` on Windows.
> ℹ️ **This is a very basic config**
**This is a very basic config**
For more options and detailed explanations you should follow [arksines instructions](https://github.com/Arksine/moonraker/blob/master/docs/installation.md).
{: .info }
```
[server]
@@ -48,11 +50,14 @@ trusted_clients:
2a02:810d:9340:33f6::/64
[update_manager]
client_repo: meteyou/mainsail
client_path: ~/mainsail
[update_manager client mainsail]
type: web
repo: meteyou/mainsail
path: ~/mainsail
```
> 🔥 **trusted_clients - read carefully** 🔥
🔥 **trusted_clients - read carefully** 🔥
A list of newline separated ip addresses and/or ip ranges that are
trusted. Trusted clients are given full access to the API. Both IPv4
and IPv6 addresses and ranges are supported. Ranges must be expressed
@@ -61,6 +66,7 @@ For example, an entry of 192.168.1.0/24 will authorize IPs in the range of 192.1
192.168.1.254. Note that when specifying IPv4 ranges the last segment
of the ip address must be 0. The default is no clients or ranges are
trusted.
{: .alert }
Save the file with `CTRL+O` and close the editor with `CTRL+X`.
Manual Setup: tips and recommendations for the OS.
---
## Operation System
> ⚠️ **Please don't use an OctoPi image!**
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
# {{ page.title }}
{{ page.description }}
**Please don't use an OctoPi image!**
It can cause unforeseeable events, like rips in the space-time continuum. So be aware!
No seriously. Experiences have shown that it is advisable not to use an OctoPi image (especially for beginners).
{: .warning }
It is recommended to use a clean Raspberry Pi OS 32-bit Lite image (previously called Raspbian). You can download it [here](https://downloads.raspberrypi.org/raspios_lite_armhf_latest){:target="_blank"}.
For more information about installing Raspberry Pi OS click [here](https://www.raspberrypi.org/documentation/installation/installing-images/){:target="_blank"}. Don't forget to enable ssh.
Once you have finished the installation and are connected via ssh, you can continue.
### Requirements
## Requirements
```bash
sudo apt update && sudo apt upgrade
sudo apt install git dfu-util unzip
```
> ⚠️ **Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
**Moonraker requires Python 3.7 or greater,** verify that your distribution's Python 3 packages meet this requirement.
**Please note**: By default, the background image is stretched to the entire area.
For example, if you want a repeating pattern, you also need to use custom css.
{: .info}
Loaded 100 of 356 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.