diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f0e72cdc..10b6ee08c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,64 @@
# OctoPrint Changelog
+## 1.3.0rc2 (2016-11-24)
+
+### Features
+
+ * OctoPrint will now track the current print head position on pause and cancel and provide it as new template variables ``pause_position``/``cancel_position`` for the relevant GCODE scripts. This will allow more intelligent pause codes that park the print head at a rest position during pause and move it back to the exact position it was before the pause on resume ([Example](https://gist.github.com/foosel/1c09e269b1c0bb7a471c20eef50c8d3e)). Note that this is NOT enabled by default and for now will necessitate adjusting the pause and resume GCODE scripts yourself since position tracking with multiple extruders or when printing from SD is currently not fool proof thanks to firmware limitations regarding reliable tracking of the various ``E`` values and the currently selected tool ``T``. In order to fully implement this feature, the following improvements were also done:
+ * New ``PositionUpdated`` event when OctoPrint receives a response to an ``M114`` position query.
+ * Extended ``PrintPaused`` and ``PrintCancelled`` events with position data from ``M114`` position query on print interruption/end.
+ * Added (optional) firmware auto detection. If enabled (which it is by default), OctoPrint will now send an ``M115`` to the printer on initial connection in order to try to figure out what kind of firmware it is. For FIRMWARE_NAME values containing "repetier" (case insensitive), all Repetier-specific flags will be set on the comm layer. For FIRMWARE_NAME values containing "reprapfirmware" (also case insensitive), all RepRapFirmware-specific flags will be set on the comm layer. For now no other handling will be performed.
+ * Added safe mode flag ``--safe`` and config setting ``startOnceInSafeMode`` that disables all third party plugins when active. The config setting will automatically be removed from `config.yaml` after the server has started through successfully.
+ * Added ``octoprint config`` CLI that allows easier manipulation of config.yaml entries from the command line. Example: ``octoprint config set --bool server.startOnceInSafeMode true``
+
+### Improvements
+
+ * [#1422](https://github.com/foosel/OctoPrint/issues/1422) - Added option for post roll for timed timelapse to duplicate last frame instead of capturing new frames. That makes for a faster render at the cost of a still frame at the end of the rendered video. See also [#1553](https://github.com/foosel/OctoPrint/pull/1553).
+ * [#1551](https://github.com/foosel/OctoPrint/issues/1551) - Allow to define a custom bounding box for valid printer head movements in the printer profile, to make print dimension check more flexible.
+ * [#1583](https://github.com/foosel/OctoPrint/pull/1583) - Strip invalid `pip` arguments from `pip uninstall` commands, if provided by the user as additional pip arguments.
+ * [#1593](https://github.com/foosel/OctoPrint/issues/1593) - Automatically migrate old manual system commands for restarting OctoPrint and rebooting or shutting down the server to the new system wide configuration settings. Make a backup copy of the old `config.yaml` before doing so in case a manual rollback is required.
+ * Support ``M114`` responses without whitespace between coordinates (protocol consistency - who needs it?).
+ * Don't focus files in the file list after deleting a file - made the list too jumpy.
+ * Better error resilience against errors in UI components.
+ * `M600` is now marked as a long running command by default.
+ * Plugin Manager: Allow closing of all notifications and close them automatically on detected server disconnect. No need to keep a "Restart needed" message around if a restart is in progress.
+ * Software Update: "busy" spinner on check buttons while already checking for updates.
+ * Software Update: Prevent update notification when wizard is open.
+ * Plugin Manager / Software Update: The "There's a new version of pip" message during plugin installs and software updates is no longer displayed like an error.
+ * Plugin Manager / Software Update: The "busy" dialog can no longer be closed accidentally.
+
+### Bug fixes
+
+ * [#1148](https://github.com/foosel/OctoPrint/issues/1148) - Fixed retraction z hop setting for Z-triggered timelapses. Was not correctly propagated to the backend and hence not taking effect.
+ * [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Invalidate ``/api/settings`` cache on change of the user's login state (include user roles into ETag calculation).
+ * [#1586](https://github.com/foosel/OctoPrint/issues/1586) - Fixed incompatibility of update script and command line helper with non-ASCII output from called commands.
+ * [#1588](https://github.com/foosel/OctoPrint/issues/1588) - Fixed feedback controls again.
+ * Invalidate ``/api/settings`` cache on change of the currently enabled plugins (by including plugin names into ETag calculation) and/or on change of the current effective config.
+ * Invalidate ``/api/timelapse`` cache on change of the current timelapse configuration.
+ * Fixed an issue causing the version number not to be properly extracted from ``sdist`` tarballs generated under Windows.
+ * Get rid of double scroll bar in printer profile editor.
+ * Fixed tracking of current byte position in file being streamed from disk. Turns out that ``self._handle.tell`` lied to us thanks to line buffering.
+ * Fixed select & print not working anymore for SD files thanks to a timing issue.
+ * Fixed ``PrintFailed`` event payload (was still missing new folder relevant data).
+ * Fixed premature parse stop on ``M114`` and ``M115`` responses with ``ok``-prefix.
+ * Make sure `?l10n` request parameter gets also propagated to API calls as `X-Locale` header in case of locale sensitive API responses.
+ * Fix language mixture due to cached template configs including localized strings; cache per locale.
+ * Only insert divider in system menu after core commands if there are custom commands.
+ * Fix update of webcam stream URL not being applied due to caching.
+ * Fixed a rare race condition causing the new "The settings changed, reload?" popup to show up even when the settings change originated in the same client instance.
+ * Fixed a bunch of missing translations.
+ * Pinned Tornado version to 4.0.2. Former version requirement was able to pull in a beta version causing issues with websockets due to a bug in `permessage-deflate` handling. The Tornado requirement needs an update, but we'll leave it at 4.0.2 for 1.3.0 since we'll need to do some migration work for compatibility with anything newer. Potentially related to [#1523](https://github.com/foosel/OctoPrint/issues/1523).
+
+### Changes from `maintenance` not yet released as part of a stable release
+
+#### Bug fixes
+
+ * [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Fix issue with restricted settings getting parsed to the wrong data structure in the frontend if loaded anonymously first.
+ * [#1571](https://github.com/foosel/OctoPrint/issues/1571) - Fix parsing of port number from HTTP Host header for IPv6 addresses
+ * Fix issue with settings restriction causing internal settings defaults to be changed.
+
+([Commits](https://github.com/foosel/OctoPrint/compare/1.3.0rc1...1.3.0rc2))
+
## 1.3.0rc1 (2016-10-19)
### New Features
@@ -104,6 +163,24 @@
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.16...1.3.0rc1))
+## 1.2.18rc1 (2016-11-22)
+
+### Improvements
+
+ * Allow arbitrary frame rates for creating timelapses. Before, the entered fps value was also directly used as frame rate for the actual video, which could cause problems with any frame rates not specified in the MPEG2 standard. Now OctoPrint will use a standard frame rate for the rendered video and render the timelapse stills into the finished movie with the configured frame rate.
+ * Limited Cura profile importer to `.ini` files and clarified the supported versions
+ * Add support for the `R` parameter for `M109` and `M190`
+
+### Bug fixes
+
+ * [#1541](https://github.com/foosel/OctoPrint/issues/1541) - Fix selecting the printer profile to use by default
+ * [#1543](https://github.com/foosel/OctoPrint/issues/1543) - Fix target temperature propagation from communication layer
+ * [#1567](https://github.com/foosel/OctoPrint/issues/1567) - Fix issue with restricted settings getting parsed to the wrong data structure in the frontend if loaded anonymously first.
+ * [#1571](https://github.com/foosel/OctoPrint/issues/1571) - Fix parsing of port number from HTTP Host header for IPv6 addresses
+ * Fix issue with settings restriction causing internal settings defaults to be changed.
+
+([Commits](https://github.com/foosel/OctoPrint/compare/1.2.17...1.2.18))
+
## 1.2.17 (2016-11-08)
### Improvements
diff --git a/SUPPORTERS.md b/SUPPORTERS.md
index 7d85c2dd5..15b831e09 100644
--- a/SUPPORTERS.md
+++ b/SUPPORTERS.md
@@ -33,27 +33,22 @@ thanks to everyone who contributed!
* Gary Deen
* Gary N McKinney
* George Robles
- * Gregor Lütolf
* J. Eckert
* Jason Galarneau
- * Joe Korzeniewski
* Josh Daniels
* Joshua David Gregory
* Kaile Riser
* Kale Stedman
* Kazuhiro Ogura
- * Korneel Bullens
* Lamin Kivelä
* M Khorakiwala
* Makespace Madrid
- * Mark Lane
* Mark Qvist
* Mark Walker
* Masayoshi Mitsui
* Michael Aumock
* Michael McDargh Sr
* Miles Flavel
- * Nikolai Langer
* Noe Ruiz
* Patrick McGinnis
* Peter Grace
@@ -68,10 +63,11 @@ thanks to everyone who contributed!
* Shane Ekerbicer
* Simon Hallam
* Stefan Krister
+ * Stephane Schittly
* Steven Pearson
* Sven Mueller
* Terrance Shaw
* Thomas Hatley
* Trent Shumay
-and 968 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
+and 989 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
diff --git a/docs/events/index.rst b/docs/events/index.rst
index 0b0139c90..802ed3856 100644
--- a/docs/events/index.rst
+++ b/docs/events/index.rst
@@ -308,6 +308,17 @@ PrintCancelled
* ``name``: the file's name
* ``path``: the file's path within its storage location
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
+ * ``position``: the print head position at the time of cancelling, if available
+ * ``position.x``: x coordinate, as reported back from the firmware through `M114`
+ * ``position.y``: y coordinate, as reported back from the firmware through `M114`
+ * ``position.z``: z coordinate, as reported back from the firmware through `M114`
+ * ``position.e``: e coordinate (of currently selected extruder), as reported back from the firmware through `M114`
+ * ``position.t``: last tool selected *through OctoPrint* (note that if you did change the printer's selected
+ tool outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will NOT
+ be accurate)
+ * ``position.f``: last feedrate for move commands **sent through OctoPrint** (note that if you modified the
+ feedrate outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will
+ NOT be accurate)
.. deprecated:: 1.3.0
@@ -324,6 +335,17 @@ PrintPaused
* ``name``: the file's name
* ``path``: the file's path within its storage location
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
+ * ``position``: the print head position at the time of pausing, if available
+ * ``position.x``: x coordinate, as reported back from the firmware through `M114`
+ * ``position.y``: y coordinate, as reported back from the firmware through `M114`
+ * ``position.z``: z coordinate, as reported back from the firmware through `M114`
+ * ``position.e``: e coordinate (of currently selected extruder), as reported back from the firmware through `M114`
+ * ``position.t``: last tool selected *through OctoPrint* (note that if you did change the printer's selected
+ tool outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will NOT
+ be accurate)
+ * ``position.f``: last feedrate for move commands **sent through OctoPrint** (note that if you modified the
+ feedrate outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will
+ NOT be accurate)
.. deprecated:: 1.3.0
@@ -352,37 +374,53 @@ GCODE processing
----------------
PowerOn
- The GCode has turned on the printer power via M80
+ An ``M80`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
PowerOff
- The GCODE has turned on the printer power via M81
+ An ``M81`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
Home
- The head has gone home via G28
+ A ``G28`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
ZChange
- The printer's Z-Height has changed (new layer)
+ The printer's Z-Height has changed (new layer) through a ``G0`` or ``G1`` that was sent to the printer through OctoPrint
+ (not triggered when printing from SD!)
-Paused
- The print has been paused
+Dwell
+ A ``G4`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
Waiting
- The print is paused due to a gcode wait command
+ One of the following commands was sent to the printer through OctoPrint (not triggered when printing from SD!):
+ ``M0``, ``M1``, ``M226``
Cooling
- The GCODE has enabled the platform cooler via M245
+ An ``M245`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
Alert
- The GCODE has issued a user alert (beep) via M300
+ An ``M300`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
Conveyor
- The GCODE has enabled the conveyor belt via M240
+ An ``M240`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
Eject
- The GCODE has enabled the part ejector via M40
+ An ``M40`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
EStop
- The GCODE has issued a panic stop via M112
+ An ``M112`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
+
+PositionUpdate
+ The response to an ``M114`` was received by OctoPrint. The payload contains the current position information
+ parsed from the response and (in the case of the selected tool ``t`` and the current feedrate ``f``) tracked
+ by OctoPrint.
+
+ Payload:
+
+ * ``x``: x coordinate, parsed from response
+ * ``y``: y coordinate, parsed from response
+ * ``z``: z coordinate, parsed from response
+ * ``e``: e coordinate, parsed from response
+ * ``t``: last tool selected *through OctoPrint*
+ * ``f``: last feedrate for move commands ``G0``, ``G1`` or ``G28`` sent *through OctoPrint*
Timelapses
----------
diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst
index 86b7d8c22..579edbdfc 100644
--- a/docs/features/gcode_scripts.rst
+++ b/docs/features/gcode_scripts.rst
@@ -60,9 +60,36 @@ All GCODE scripts have access to the following template variables through the te
* ``printer_profile``: The currently selected Printer Profile, including
information such as the extruder count, the build volume size, the filament diameter etc.
+ * ``last_position``: Last position reported by the printer via `M114` (might be unset if no `M114` was sent so far!)
* ``script``: An object wrapping the script's type (``gcode``) and name (e.g. ``afterPrintCancelled``) as ``script.type``
and ``script.name`` respectively.
+There are a couple of additional template variables available for the following specific scripts:
+
+ * ``afterPrintPaused`` and ``beforePrintResumed``
+ * ``pause_position``: Position reported by the printer via ``M114`` immediately before the print was paused. Consists
+ of ``x``, ``y``, ``z`` and ``e`` coordinates as received by the printer and tracked values for ``f`` and current tool
+ ``t`` taken from commands sent through OctoPrint.
+ * ``afterPrintCancelled``
+ * ``cancel_position``: Position reported by the printer via ``M114`` immediately before the print was cancelled.
+ Consists of ``x``, ``y``, ``z`` and ``e`` coordinates as received by the printer and tracked values for ``f`` and
+ current tool ``t`` taken from commands sent through OctoPrint.
+
+.. warning::
+
+ Note that current firmware implementations only report back one ``E`` value, the current extrusion value for the current
+ extruder. Retrieving all ``E`` values by cycling through all extruders on pause and cancel is something OctoPrint
+ currently does NOT do since it would simply take too long. That means that if you want to write a ``beforePrintResumed``
+ script that basically resets everything back to the point when the printer was paused *and* you are running with
+ multiple extruders, you'll have to find some other way to have your ``E`` values set correctly for all your available
+ extruders - the data available in ``pause_position`` will *not* suffice. Additionally, most firmwares don't report
+ the currently selected tool in the ``M114`` response, meaning that the only way OctoPrint can keep track of that is
+ by tracking it itself. Same goes for the current feed rate ``F``. So if you are printing from SD, this data will be
+ *wrong*. This is also the reason why OctoPrint currently doesn't bundle a more sophisticated pause and resume script
+ that would actually move the print head out of the way and pause and back to the original position on resume - it
+ might cause issues for the multitude of users out there with multi-extruder setups or for people printing from the
+ printer's SD, thanks to the lack of information the firmware provides.
+
The :ref:`predefined GCODE scripts {{ _('OctoPrint related commands') }}
{{ _('System related commands') }}
diff --git a/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2 b/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2
index aa5a8cf71..b1fc6f3aa 100644
--- a/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2
+++ b/src/octoprint/plugins/corewizard/templates/corewizard_webcam_wizard.jinja2
@@ -26,8 +26,8 @@
{% trans %}You haven't imported a slicing profile to use for slicing with CuraEngine - yet. You should do this now.{% endtrans %}
+ yet. If you plan on slicing from within OctoPrint then you should do this now. + Otherwise just skip this step.{% endtrans %}