diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 97a7e30ccb..00bd36a44c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -62,7 +62,7 @@ to also include a link to a file with which to reproduce the problem.] [Try to reproduce your problem in safe mode. You can find information on how to enable safe mode in the Contribution Guidelines.] -#### Branch & Commit or Version of OctoPrint +#### Version of OctoPrint [Can be found in the lower left corner of the web interface. ALWAYS INCLUDE.] diff --git a/.versioneer-lookup b/.versioneer-lookup index 5e308dfb11..06d670f005 100644 --- a/.versioneer-lookup +++ b/.versioneer-lookup @@ -18,16 +18,16 @@ prerelease HEAD \(detached.* -# maintenance is currently the branch for preparation of maintenance release 1.3.5 +# maintenance is currently the branch for preparation of maintenance release 1.3.6 # so are any fix/... and improve/... branches maintenance 1.3.6 1a6dbb3f4a5bef857cdeb13c031b9deca2cf30a2 pep440-dev fix/.* 1.3.6 1a6dbb3f4a5bef857cdeb13c031b9deca2cf30a2 pep440-dev improve/.* 1.3.6 1a6dbb3f4a5bef857cdeb13c031b9deca2cf30a2 pep440-dev -# staging/maintenance is currently the branch for preparation of 1.3.5rc4 +# staging/maintenance is currently the branch for preparation of 1.3.6rc4 # so is regressionfix/... -staging/maintenance 1.3.5rc4 679674df2282af0c4500367fa93864c6defa3802 pep440-dev -regressionfix/.* 1.3.5rc4 679674df2282af0c4500367fa93864c6defa3802 pep440-dev +staging/maintenance 1.3.6rc4 a8747f7e36a03ff2449b62cdf68b8a26a6fa61b3 pep440-dev +regressionfix/.* 1.3.6rc4 a8747f7e36a03ff2449b62cdf68b8a26a6fa61b3 pep440-dev # every other branch is a development branch and thus gets resolved to 1.4.0-dev for now .* 1.4.0 7f5d03d0549bcbd26f40e7e4a3297ea5204fb1cc pep440-dev diff --git a/AUTHORS.md b/AUTHORS.md index a56725a755..a086022968 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,6 +1,6 @@ # Authors -The following people have contributed to OctoPrint's code base (ordered by +The following people have contributed to OctoPrint's code base (ordered roughly by date of first contribution): * [Gina Häußge](https://github.com/foosel) @@ -61,10 +61,11 @@ date of first contribution): * [Siim Raud](https://github.com/2ndalpha) * ["geoporalis"](https://github.com/geoporalis) * [Andrew Malota](https://github.com/2bitoperations) - * [Alexander Leisentritt](https://github.com/Alex9779) - * [therealbstern](https://github.com/therealbstern) * [Ishwar Agarwal](https://github.com/agarwali) * [Kye Hoover](https://github.com/eykrevooh) + * [Joseph Carrick](https://github.com/carricktel) + * [Alexander Leisentritt](https://github.com/Alex9779) + * [therealbstern](https://github.com/therealbstern) * [Philipp Baum](https://github.com/philphilphil) * [Kyle Evans](https://github.com/kevans91) * [Javier Martínez Arrieta](https://github.com/Javierma) @@ -79,8 +80,12 @@ date of first contribution): * [Greg Hulands](https://github.com/ghulands) * [Andreas Werner](https://github.com/gallore) * [Shawn Bruce](https://github.com/kantlivelong) - * [Claudiu Ceia] (https://github.com/ClaudiuCeia) + * [Claudiu Ceia](https://github.com/ClaudiuCeia) * [Goswin von Brederlow](https://github.com/mrvn) + * [Luke McKechnie](https://github.com/galamdring) + * [Peter Backx](https://github.com/pbackx) + * [Josh Major](https://github.com/astateofblank) + * ["alex-gh"](https://github.com/alex-gh) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by [Daid Braam](https://github.com/daid). Parts of its communication layer and diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e1c800034..951e08c67e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,128 @@ # OctoPrint Changelog +## 1.3.6 (2017-12-12) + +### Note for upgraders and plugin authors: Change in the bundling of JS assets can lead to issues in plugins + +A change to solve issues with plugins bundling JS assets that cause interference with other plugins (e.g. through the declaration of `"use strict"`) and in general to add better isolation and error handling might cause errors for some plugins that go beyond your run-off-the-mill view model and also implicitly declare new globals. + +If you happen to run into any such issues, you can switch back to the old way of bundling JS assets via the newly introduced "Settings > Feature > Enable legacy plugin asset bundling" toggle (check it, save the settings, restart the server). This is provided to allow for a minimally invasive adjustment period until affected plugins have been updated. + +You can find out more about the change, how to know if a plugin is even affected and what do about it [on the OctoBlog](https://octoprint.org/blog/2017/12/01/heads-up-plugin-authors/). + +### Improvements + + * [#203](https://github.com/foosel/OctoPrint/issues/203) - Allow selecting the current tab via URL hashs. Also update URL hash when switching tabs, thus adding this to the browser history and allowing quicker back and forth navigation through the browser's back and forward buttons. + * [#1026](https://github.com/foosel/OctoPrint/issues/1026) - Automatically upper case parameters in GCODE commands sent from the Terminal tab. A black list is in place that prevent upper casing of parameters for GCODE commands where it doesn't make sense (default: `M117`). See also [#2177](https://github.com/foosel/OctoPrint/pull/2177). + * [#2050](https://github.com/foosel/OctoPrint/issues/2050) - New hook [`octoprint.comm.protocol.temperatures.received`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-comm-protocol-temperatures-received) that allows plugins to further preprocess/sanitize temperature data received from the printer. + * [#2055](https://github.com/foosel/OctoPrint/issues/2055) - Increased the size of the API key field in the settings. + * [#2056](https://github.com/foosel/OctoPrint/issues/2056) - Added a Copy button to the API key field in the settings and user settings. + * [#2094](https://github.com/foosel/OctoPrint/issues/2094) - Allow UTF-8 display names for uploaded files. The files will still get an ASCII only name on disk, but the UTF-8 name used during upload will also be persisted and shown in the file list. This also allows using emojis in your file and folder names now. + * [#2104](https://github.com/foosel/OctoPrint/issues/2104) - Allow more URL schemes for installing plugins from. Supported schemes should now mirror what `pip` itself supports: `http`, `https`, `git`, `git+http`, `git+https`, `git+ssh`, `git+git`, `hg+http`, `hg+https`, `hg+static-http`, `hg+ssh`, `svn`, `svn+svn`, `svn+http`, `svn+https`, `svn+ssh`, `bzr+http`, `bzr+https`, `bzr+ssh`, `bzr+sftp`, `bzr+ftp`, `bzr+lp`. + * [#2109](https://github.com/foosel/OctoPrint/pull/2109) - New decorator `@firstrun_only_access` for API endpoints that should only be available before first setup has been completed. + * [#2111](https://github.com/foosel/OctoPrint/issues/2111) - Made the file list's scroll bar wider. + * [#2131](https://github.com/foosel/OctoPrint/issues/2131) - Added warning to restart, shutdown, reboot and update confirmations that that may disrupt ongoing prints, even those run from the printer's internal storage/SD. See also [#2146](https://github.com/foosel/OctoPrint/pull/2146) and [#2152](https://github.com/foosel/OctoPrint/pull/2152). + * [#2138](https://github.com/foosel/OctoPrint/issues/2138) - Slightly longer timeout when attempting to read from serial during auto detection via programming mode. Might help with detection of some slower printer controllers under certain circumstances. + * [#2200](https://github.com/foosel/OctoPrint/issues/2200) - Wrap all JS assets of plugins into one anonymous function per plugin. That way plugins using `"use strict";` won't cause hard to debug and weird issues with other plugins bundled after them. The down side is that plugins currently relying on implicit declaration of global helper functions or variables (`function convert(value) { ... }`) to be available outside of their own plugin's JS assets will now run into errors. To compensate for that while affected plugins are adjusted to declare globals explicitly (`window.convert = function(value) { ... }`), a temporary feature flag was added as "Settings > Features > Enable legacy plugin asset bundling" that switches back to the old form of bundling until plugins you rely on are updated. This flag will be removed again in a later version (currently planned for 1.3.8). See also the note above and [#2246](https://github.com/foosel/OctoPrint/issues/2246). + * [#2229](https://github.com/foosel/OctoPrint/issues/2229) - Added note to printer profile dialog that the nozzle offsets for multi extruder setups are only to be configured if they are not already set in the printer's firmware. + * [#2232](https://github.com/foosel/OctoPrint/issues/2232) - Disable movement distance buttons when not connected to the printer or when printing, since they don't have any use then. + * [#2239](https://github.com/foosel/OctoPrint/pull/2239) - Improved the check summing speed, thus improving the general achievable throughput on the comm layer. + * Allow cancelling of file transfers + * Made check of how old an unrendered timelapse is more lenient buy looking at both the creation and last modification date and using the younger one. + * Made notifications in general auto-close faster. + * Make the first profile saved for a slicer the default profile for that slicer. + * New command `server` for testing server connections on the [JS test API](http://docs.octoprint.org/en/maintenance/api/util.html#post--api-util-test). + * New hook [`octoprint.accesscontrol.keyvalidator`](http://docs.octoprint.org/en/maintenance/plugins/hooks.html#octoprint-accesscontrol-keyvalidator) that allows plugins to validate their own customized API keys to be used to access OctoPrint. + * Updated `cookiecutter`, `requests` and `psutil` dependencies. + * Added safety warning to first run wizard. + * More error resilience against broken view models. + * New sub command `octoprint safemode`. Will set the `server.startOnceInSafeMode` setting in the config so that the next (re)start of the server after issuing this command will happen in safe mode. + * New sub command `octoprint config effective`. Will report the effective config. + * New centralized plugin blacklist (opt-in). Allows to prevent plugins/certain versions of plugins known to cause crippling issues with the normal operation of OctoPrint to be disabled from loading, if the user has opted to do so in the settings/wizard. + * Log how to enable `serial.log` to `serial.log` if it's disabled. That will hopefully put at least a small dent in the amount of "It's empty!" responses in tickets ;) + * Force new Pypi index URL in `requirements.txt` as an additional work around against old tooling. + * Prefer plain `pip` over `git` for updating OctoPrint. + * Added environment detection and logging on startup. That should give us more information about the environment to produce a reported bug in. + * Added OctoPi support plugin that provides information about the detected OctoPi version. Will only load if OctoPi is detected. + * More dynamic plugin mixin detection. Now using a base class instead of having to list all types manually. Should greatly reduce overhead of adding new mixin types. + * Support leaf merging for file extension tree, allowing to add new file extensions to types registered by default. + * Allow non GCODE SD file transfers if registered as `machinecode` through e.g. a plugin's file extension hook. Caution: This doesn't make streaming arbitrary files to the printer via serial work magically. It merely allows that, it's up to the firmware to actually be able to handle that. Also, the regular GCODE streaming protocol is used, so if the streamed file contains control characters from that (e.g. `M29` to signal the end of the streaming process), stuff will break! + * Added a test button for the online connectivity check. + * Announcements plugin: Added UTM Tags. + * Cura plugin: Less `not configured yet` logging. + * GCODE viewer: Added advanced options that allow configuring display of bounding boxes, sorting by layers and hiding of empty layers. + * GCODE viewer: Persist all options to local storage so they will be automatically set again the next time the GCODE viewer is used in the same browser. + * Software update: Auto-hide "Everything is up-to-date" notification. + * Easier copying of terminal contents thanks to dedicated copy button. + * Timelapse: [#2067](https://github.com/foosel/OctoPrint/issues/2067) - Added rate limiting to z-based timelapse capturing to prevent issues when accidentally leaving this mode on with vase mode prints. + * Timelapse: Refactored configuration form & added reset button to switch back to currently active settings. + * Timelapse: Sort timelapses by modification instead of creation time (creation time can be newer if a backup restore was done). + * Virtual printer: Support configurable ambient temperature for testing. + * Virtual printer: Support configurable reset lines. + * Virtual printer: Added new debug trigger `trigger_missing_lineno`. + * Virtual printer: Allow empty/`None` prepared oks, allowing to simulate lost acknowledgements right on start. + * Docs: [#2142](https://github.com/foosel/OctoPrint/pull/2142) - Added documentation for the bundled virtual printer plugin. + * Docs: [#2234](https://github.com/foosel/OctoPrint/pull/2234) - Added info on how to install under Suse Linux. + * Docs: Added example PyCharm run configuration that includes automatic dependency updates on start. + * Docs: Added information on how to run the test suite. + * Various refactorings + * Various documentation updates + * Fetch plugin blacklist (and also announcements, plugin notices and plugin repository) via https instead of http. + +### Bug fixes + + * [#2044](https://github.com/foosel/OctoPrint/pull/2044) - Fix various typos in strings and comments + * [#2048](https://github.com/foosel/OctoPrint/pull/2048) & [#2176](https://github.com/foosel/OctoPrint/pull/2176) - Fixed various warnings during documentation generation. + * [#2077](https://github.com/foosel/OctoPrint/issues/2077) - Fix an issue with shared nozzles and the temperature graph, causing temperature to not be reported properly when another tool but the first one is selected. See also [#2077](https://github.com/foosel/OctoPrint/pull/2123) + * [#2108](https://github.com/foosel/OctoPrint/issues/2108) - Added no-op default action to login form so that username + password aren't sent as GET parameters if for some reason the user tries to log in before the view models are properly bound and thus the AJAX POST submission method is attached. + * [#2111](https://github.com/foosel/OctoPrint/issues/2111) - Prevent file list's scroll bar from fading out. + * [#2146](https://github.com/foosel/OctoPrint/issues/2147) - Fix initialization of temperature graph if it's not on the first tab due to tab reordering. + * [#2166](https://github.com/foosel/OctoPrint/issues/2166) - Workaround for a Firefox bug that causes the Drag-n-Drop overlay to never go away if the file is dragged outside of the browser window. + * [#2167](https://github.com/foosel/OctoPrint/issues/2167) - Fixed grammar of print time estimation tooltip + * [#2175](https://github.com/foosel/OctoPrint/issues/2175) - Cancel printing when an external reset of the printer is detected on the serial connection. + * [#2181](https://github.com/foosel/OctoPrint/issues/2181) - More resilience against non-standard `M115` responses. + * [#2182](https://github.com/foosel/OctoPrint/pull/2182) - Don't start tracking non existing or nonfunctional tools if encountering a temperature command referencing said tool. See also [kantlivelong/OctoPrint-PSUControl#68](https://github.com/kantlivelong/OctoPrint-PSUControl/issues/68). + * [#2196](https://github.com/foosel/OctoPrint/issues/2196) - Marked API key fields as `readonly` instead of `disabled` to allow their contents to be copied in Firefox (which wasn't possible before). + * [#2203](https://github.com/foosel/OctoPrint/issues/2203) - Reset temperature offsets to 0 when disconnected from the printer. + * [#2206](https://github.com/foosel/OctoPrint/issues/2206) - Disable pre-configured timelapse if snapshot URL of ffmpeg path are unset. + * [#2214](https://github.com/foosel/OctoPrint/issues/2214) - Fixed temperature fields not selecting in MS Edge on focus. + * [#2217](https://github.com/foosel/OctoPrint/pull/2217) - Fix an issue in `octoprint.util` causing a crash when running under PyPy instead of CPython. + * [#2226](https://github.com/foosel/OctoPrint/issues/2226) - Handle `No Line Number with checksum, Last Line: ...` errors from the firmware. + * [#2233](https://github.com/foosel/OctoPrint/pull/2233) - Respond with `411 Length Required` when content length is missing on file uploads. + * [#2242](https://github.com/foosel/OctoPrint/issues/2242) - Fixed an issue where print time left could show "1 days" instead of "1 day". + * [#2262](https://github.com/foosel/OctoPrint/issues/2262) (regression) - Fixed a bug causing `Error:checksum mismatch, Last Line: ...` errors from the firmware to be handled incorrectly. + * [#2267](https://github.com/foosel/OctoPrint/issues/2267) (regression) - Fixed a bug causing the GCODE viewer to not get properly initialized due to a JS error on load if "Also show next layer" was selected. + * [#2268](https://github.com/foosel/OctoPrint/issues/2268) (regression) - Fixed a bug causing a display error with the temperature offsets. If one offset was changed, all others seemed to revert back to 0. + * Fixed cleanup of unrendered timelapses with certain names. + * Fixed a caching issue with the file list API and the slicing API. + * Fixed initial sizing of the temperature graph. + * More resilience against corrupt `.metadata.yaml` files. + * More resilience against corrupt/invalid entries for system actions. + * More resilience against invalid JSON command requests. + * More resilience against broken packages in the python environment. + * Don't evaluate `onWebcamLoaded` more than once when switching to the webcam tab. + * Fixed `octoprint config` sub command. + * Fixed deactivated user accounts being able to login (albeit without a persistent session). Show fitting error instead. + * Fixed temperature auto report after an external reset. + * Don't log full request headers in Tornado on an error. + * Fix displayed notification message for synchronous system commands. Was accidentally swapped with the one for asynchronous system commands. + * GCODE viewer: Fix error on empty layers. + * Virtual printer: Fix resend simuation. + * Docs: Fixed CSS of line numbered listings. + * Docs: Updated mermaid to fix a deprecation warning. + * Fixed ordering of plugin assets, should be alphabetical based on the plugin identifier. (regression) + * Fixed an issue causing redundant software update configuration settings to be written to `config.yaml`, in turn causing issues when downgrading to <1.3.5. (regression) + * Fixed an issue detecting whether the installed version is a release version or a development version. (regression) + +### More Information + + * [Commits](https://github.com/foosel/OctoPrint/compare/1.3.5...1.3.6) + * Release Candidates: + * [1.3.6rc1](https://github.com/foosel/OctoPrint/releases/tag/1.3.6rc1) + * [1.3.6rc2](https://github.com/foosel/OctoPrint/releases/tag/1.3.6rc2) + * [1.3.6rc3](https://github.com/foosel/OctoPrint/releases/tag/1.3.6rc3) + * A special **Thank you!** to everyone who reported back on these release candidates this time: [andrivet](https://github.com/andrivet), [b-morgan](https://github.com/b-morgan), [bjarchi](https://github.com/bjarchi), [chippypilot](https://github.com/chippypilot), [ChrisHeerschap](https://github.com/ChrisHeerschap), [cosmith71](https://github.com/cosmith71), [Crowlord](https://github.com/Crowlord), [ctgreybeard](https://github.com/ctgreybeard), [fiveangle](https://github.com/fiveangle), [goeland86](https://github.com/goeland86), [jbjones27](https://github.com/jbjones27), [jneilliii](https://github.com/jneilliii), [JohnOCFII](https://github.com/JohnOCFII), [Kunsi](https://github.com/Kunsi), [Lordxv](https://github.com/Lordxv), [malnvenshorn](https://github.com/malnvenshorn), [mcp5500](https://github.com/mcp5500), [ntoff](https://github.com/ntoff), [ripp2003](https://github.com/ripp2003) and [schorsch3000](https://github.com/schorsch3000) + ## 1.3.5 (2017-10-16) ### Improvements diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8ba81c03f..74b8be4fb5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,7 +160,7 @@ only provided here as some additional information for you), **even if only addin [Try to reproduce your problem in safe mode. You can find information on how to enable safe mode in the Contribution Guidelines.] - #### Branch & Commit or Version of OctoPrint + #### Version of OctoPrint [Can be found in the lower left corner of the web interface. ALWAYS INCLUDE.] @@ -263,6 +263,8 @@ See [How to open the Javascript Console in different browsers](https://webmaster ## Setting up a development environment See [the corresponding chapter in the documentation](http://docs.octoprint.org/en/master/development/index.html#setting-up-a-development-environment). +This also includes information on how to run the test suite and how to build +the documentation. ## Pull requests @@ -303,7 +305,17 @@ See [the corresponding chapter in the documentation](http://docs.octoprint.org/e * Make sure you do not add dead code (e.g. commented out left-overs from experiments). 8. Ensure your changes **pass the existing unit tests**. PRs that break - those cannot be accepted. + those cannot be accepted. You can run the unit tests locally (after + [initial development environment setup with "develop" dependencies](http://docs.octoprint.org/en/master/development/index.html#setting-up-a-development-environment)) + by running + + ``` + nosetests --with-doctest + ``` + + in the OctoPrint checkout folder. A [travis build](https://travis-ci.org/foosel/OctoPrint) + is also setup so that if the tests should fail, your PR will be marked + accordingly. 9. **Test your changes thoroughly**. That also means testing with usage scenarios you don't normally use, e.g. if you only use access control, test without and vice versa. If you only test with your printer, test with the @@ -432,6 +444,7 @@ the local version identifier to allow for an exact determination of the active c * 2017-03-10: Reproduce bugs in safe mode to make sure they are really caused by OctoPrint itself and not a misbehaving plugin. * 2017-03-27: Added safe mode section to ticket template. + * 2017-11-22: Added note on how to run the unit tests ## Footnotes * [1] - If you are wondering why, the problem is that anything that you add diff --git a/README.md b/README.md index 817884a57d..1571a3308b 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software and released under the [GNU Affero General Public License V3](http://www.gnu.org/licenses/agpl.html). -Its website can be found at [octoprint.org](http://octoprint.org). +Its website can be found at [octoprint.org](https://octoprint.org/?utm_source=github&utm_medium=readme). The documentation is located at [docs.octoprint.org](http://docs.octoprint.org). -The official plugin repository can be reached at [plugins.octoprint.org](http://plugins.octoprint.org). +The official plugin repository can be reached at [plugins.octoprint.org](https://plugins.octoprint.org/?utm_source=github&utm_medium=readme). -OctoPrint's development wouldn't be possible without the [financial support by its community](http://octoprint.org/support-octoprint/). -If you enjoy OctoPrint, please consider becoming a regular supporter! +**OctoPrint's development wouldn't be possible without the [financial support by its community](https://octoprint.org/support-octoprint/?utm_source=github&utm_medium=readme). +If you enjoy OctoPrint, please consider becoming a regular supporter!** ![Screenshot](http://i.imgur.com/dF3noFp.png) @@ -29,7 +29,7 @@ Contributions of all kinds are welcome, not only in the form of code but also wi [official documentation](http://docs.octoprint.org/) or [the public wiki](https://github.com/foosel/OctoPrint/wiki), support of other users in the [bug tracker](https://github.com/foosel/OctoPrint/issues), [the Mailinglist](https://groups.google.com/group/octoprint) or -[the G+ Community](https://plus.google.com/communities/102771308349328485741) and also [financially](http://octoprint.org/support-octoprint/). +[the G+ Community](https://plus.google.com/communities/102771308349328485741) and also [financially](https://octoprint.org/support-octoprint/?utm_source=github&utm_medium=readme). If you think something is bad about OctoPrint or its documentation the way it is, please help in any way to make it better instead of just complaining about it -- this is an Open Source Project diff --git a/SUPPORTERS.md b/SUPPORTERS.md index 32b2466392..29c55a3e39 100644 --- a/SUPPORTERS.md +++ b/SUPPORTERS.md @@ -21,16 +21,13 @@ thanks to everyone who contributed! * DeltaMaker 3D Printers * E3D BigBox * Ernesto Martinez - * Exovite * F. Kunsmann - * Farren Young II * Frank Sander * Gary Deen * Gary N McKinney * George Robles * günter weber * James Seigel - * Jamie R McGuigan * Jason Lawrence * Jeff Moe * Josh Daniels @@ -39,19 +36,16 @@ thanks to everyone who contributed! * Kazuhiro Ogura * Makespace Madrid * Marcus Ackermann - * Mark Qvist * Mark Walker - * Masayoshi Mitsui * Michael Aumock * Miles Flavel * mitchell hirsch * Mohammed khorakiwala * Noe Ruiz * Patrick McGinnis - * Peter Grace * Peter Schmehl * PRINT3Dforum.com - * Robert Gusek + * Randy C. Will * Roger Strolz * Roy Cortes * Samer Najia @@ -64,4 +58,4 @@ thanks to everyone who contributed! * Timeshell.ca * Trent Shumay -and 1133 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! \ No newline at end of file +and 1062 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)! \ No newline at end of file diff --git a/THIRDPARTYLICENSES.md b/THIRDPARTYLICENSES.md index 30cc98a828..6f0dd0d3eb 100644 --- a/THIRDPARTYLICENSES.md +++ b/THIRDPARTYLICENSES.md @@ -6,7 +6,7 @@ * [Babel JavaScript Support](https://github.com/mitsuhiko/babel/blob/master/contrib/babel.js): BSD * [Bootstrap](http://getbootstrap.com/): Apache License 2.0 * [Bootstrap Modal](http://jschr.github.io/bootstrap-modal/): Apache License 2.0 - * [Bootstrap Slider Knockout Bindings](https://github.com/cosminstefanxp/bootstrap-slider-knockout-binding): MIT + * [Bootstrap Slider Knockout Binding](https://github.com/cosminstefanxp/bootstrap-slider-knockout-binding): MIT * [Bootstrap Slider](http://seiyria.com/bootstrap-slider/): Apache License 2.0 * [Bootstrap Tabdrop](http://www.eyecon.ro/bootstrap-tabdrop): Apache License 2.0 * [Detect Mobile Browser](http://detectmobilebrowsers.com/): Public Domain @@ -36,6 +36,8 @@ * [Awesome-Slugify](https://pypi.python.org/pypi/awesome-slugify): GPLv3 * [chainmap](https://bitbucket.org/jeunice/chainmap): Python * [Click](http://click.pocoo.org/): BSD + * [dateutil](https://dateutil.readthedocs.io/): BSD + * [emoji](https://github.com/carpedm20/emoji/): BSD * [feedparser](https://github.com/kurtmckee/feedparser): BSD * [Flask](http://flask.pocoo.org/): BSD * [Flask-Assets](http://github.com/miracle2k/flask-assets): BSD @@ -44,6 +46,8 @@ * [Flask-Markdown](http://github.com/dcolish/flask-markdown): BSD * [Flask-Principal](http://packages.python.org/Flask-Principal/): MIT * [future](https://python-future.org/): MIT + * [futures](https://github.com/agronholm/pythonfutures): Python + * [monotonic](https://github.com/atdt/monotonic): Apache License 2.0 * [netaddr](https://github.com/drkjam/netaddr/): BSD * [netifaces](https://bitbucket.org/al45tair/netifaces): MIT * [pkginfo](http://pypi.python.org/pypi/pkginfo/): Python @@ -60,6 +64,7 @@ * [Tornado](http://www.tornadoweb.org/): Apache License 2.0 * [watchdog](http://github.com/gorakhargosh/watchdog): Apache License 2.0 * [websocket-client](https://github.com/liris/websocket-client): LGPLv3 + * [wrapt](http://wrapt.readthedocs.org/): BSD ## Development (testing, documentation generation, etc) @@ -69,4 +74,5 @@ * [pypandoc](https://github.com/bebraw/pypandoc): MIT * [Sphinx](http://sphinx-doc.org/): BSD * [sphinxcontrib-httpdomain](https://bitbucket.org/birkenfeld/sphinx-contrib/src/default/httpdomain/): BSD + * [sphinxcontrib-mermad](https://github.com/mgaitan/sphinxcontrib-mermaid): BSD * [sphinx_rtd_theme](https://github.com/snide/sphinx_rtd_theme/): BSD diff --git a/docs/_static/theme_overrides.css b/docs/_static/theme_overrides.css index 864a027665..cce327b202 100644 --- a/docs/_static/theme_overrides.css +++ b/docs/_static/theme_overrides.css @@ -37,6 +37,11 @@ vertical-align: 10%; } +.rst-content .highlight>pre, +.rst-content .linenodiv>pre { + line-height: 1.5; +} + /* make code tags non-red again */ code, .rst-content tt { @@ -52,3 +57,4 @@ a:visited code, .rst-content a:visited tt { color: #9B59B6 !important; } + diff --git a/docs/api/connection.rst b/docs/api/connection.rst index c0bc753770..721e92cac5 100644 --- a/docs/api/connection.rst +++ b/docs/api/connection.rst @@ -39,7 +39,7 @@ Get connection settings "options": { "ports": ["/dev/ttyACM0", "VIRTUAL"], "baudrates": [250000, 230400, 115200, 57600, 38400, 19200, 9600], - "printerProfiles": [{"name": "Default", id: "_default"}], + "printerProfiles": [{"name": "Default", "id": "_default"}], "portPreference": "/dev/ttyACM0", "baudratePreference": 250000, "printerProfilePreference": "_default", diff --git a/docs/api/datamodel.rst b/docs/api/datamodel.rst index 768e420b03..92e32050f5 100644 --- a/docs/api/datamodel.rst +++ b/docs/api/datamodel.rst @@ -232,12 +232,18 @@ File information * - ``name`` - 1 - String - - The name of the file without path. E.g. "file.gco" for a file "file.gco" located anywhere in the file system. + - The name of the file without path. E.g. "file.gco" for a file "file.gco" located anywhere in the file system. Currently + this will always fit into ASCII. + * - ``display`` + - 1 + - String + - The name of the file without the path, this time potentially with non-ASCII unicode characters. + E.g. "a turtle 🐢.gco" for a file "a_turtle_turtle.gco" located anywhere in the file system. * - ``path`` - 1 - String - The path to the file within the location. E.g. "folder/subfolder/file.gco" for a file "file.gco" located within - "folder" and "subfolder" relative to the root of the location. + "folder" and "subfolder" relative to the root of the location. Currently this will always fit into ASCII. * - ``type`` - 1 - String @@ -329,11 +335,17 @@ Abridged file or folder information - 1 - String - The name of the file or folder without path. E.g. "file.gco" for a file "file.gco" located anywhere in the file system. + Currently this will always fit into ASCII. + * - ``display`` + - 1 + - String + - The name of the file without the path, this potentially with non-ASCII unicode characters. + E.g. "a turtle 🐢.gco" for a file "a_turtle_turtle.gco" located anywhere in the file system. * - ``path`` - 1 - String - The path to the file or folder within the location. E.g. "folder/subfolder/file.gco" for a file "file.gco" located within - "folder" and "subfolder" relative to the root of the location. + "folder" and "subfolder" relative to the root of the location. Currently this will always fit into ASCII. * - ``origin`` - 1 - String, either ``local`` or ``sdcard`` diff --git a/docs/api/files.rst b/docs/api/files.rst index 76b80132e8..188731a40b 100644 --- a/docs/api/files.rst +++ b/docs/api/files.rst @@ -192,6 +192,7 @@ Retrieve all files "refs": { "resource": "http://example.com/api/files/local/folderA/subfolder", } + } ], "size": 1334, "refs": { diff --git a/docs/api/job.rst b/docs/api/job.rst index 5d727228eb..338a10ea7b 100644 --- a/docs/api/job.rst +++ b/docs/api/job.rst @@ -4,6 +4,9 @@ Job operations ************** +Use these operations to query the currently selected file and start/cancel/restart/pause the +actual print job. + .. contents:: .. _sec-api-jobs-command: diff --git a/docs/api/languages.rst b/docs/api/languages.rst index ac7b988f20..ecb83102a2 100644 --- a/docs/api/languages.rst +++ b/docs/api/languages.rst @@ -39,9 +39,7 @@ Retrieve installed language packs "_core": { "identifier": "_core", "name": "Core", - "languages": [ - ... - ] + "languages": [] }, "some_plugin": { "identifier": "some_plugin", @@ -61,7 +59,6 @@ Retrieve installed language packs "last_update": 1470859680, "author": "The italian Transifex Team" } - ... ] } } @@ -124,9 +121,7 @@ Delete a language pack "_core": { "identifier": "_core", "name": "Core", - "languages": [ - ... - ] + "languages": [] }, "some_plugin": { "identifier": "some_plugin", @@ -138,8 +133,7 @@ Delete a language pack "locale_english": "German", "last_update": 1474574597, "author": "Gina Häußge" - }, - ... + } ] } } diff --git a/docs/api/settings.rst b/docs/api/settings.rst index acc797220e..b26b2d25d7 100644 --- a/docs/api/settings.rst +++ b/docs/api/settings.rst @@ -62,10 +62,11 @@ Save settings { "api": { - "enabled": true, - // ... + "enabled": true }, - // ... + "appearance": { + "color": "black" + } } .. _sec-api-settings-generateapikey: diff --git a/docs/api/slicing.rst b/docs/api/slicing.rst index 010f1af746..1296531712 100644 --- a/docs/api/slicing.rst +++ b/docs/api/slicing.rst @@ -58,11 +58,9 @@ List All Slicers and Slicing Profiles "displayName": "Medium Quality", "default": true, "resource": "http://example.com/api/slicing/cura/profiles/medium_quality" - }, - ... + } } - }, - ... + } } :statuscode 200: No error @@ -104,8 +102,7 @@ List Slicing Profiles of a Specific Slicer "displayName": "Medium Quality", "default": true, "resource": "http://example.com/api/slicing/cura/profiles/medium_quality" - }, - ... + } } :param slicer: The identifying key of the slicer for which to list the available profiles. @@ -147,8 +144,7 @@ Retrieve Specific Profile "brim_line_count": 20, "cool_head_lift": false, "cool_min_feedrate": 10.0, - "cool_min_layer_time": 5.0, - ... + "cool_min_layer_time": 5.0 } } diff --git a/docs/api/system.rst b/docs/api/system.rst index 78ea128ff6..9bf0907ff3 100644 --- a/docs/api/system.rst +++ b/docs/api/system.rst @@ -39,7 +39,7 @@ List all registered system commands "action": "shutdown", "name": "Shutdown", "command": "sudo shutdown -h now", - "confirm": "You are about to shutdown the system.", + "confirm": "You are about to shutdown the system.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -49,7 +49,7 @@ List all registered system commands "action": "reboot", "name": "Reboot", "command": "sudo reboot", - "confirm": "You are about to reboot the system.", + "confirm": "You are about to reboot the system.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -59,7 +59,7 @@ List all registered system commands "action": "restart", "name": "Restart OctoPrint", "command": "sudo service octoprint restart", - "confirm": "You are about to restart the OctoPrint server.", + "confirm": "You are about to restart the OctoPrint server.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -100,7 +100,7 @@ List all registered system commands for a source "action": "shutdown", "name": "Shutdown", "command": "sudo shutdown -h now", - "confirm": "You are about to shutdown the system.", + "confirm": "You are about to shutdown the system.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -110,7 +110,7 @@ List all registered system commands for a source "action": "reboot", "name": "Reboot", "command": "sudo reboot", - "confirm": "You are about to reboot the system.", + "confirm": "You are about to reboot the system.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -120,7 +120,7 @@ List all registered system commands for a source "action": "restart", "name": "Restart OctoPrint", "command": "sudo service octoprint restart", - "confirm": "You are about to restart the OctoPrint server.", + "confirm": "You are about to restart the OctoPrint server.

This action may disrupt any ongoing print jobs (depending on your printer's controller and general setup that might also apply to prints run directly from your printer's internal storage).", "async": true, "ignore": true, "source": "core", @@ -154,7 +154,7 @@ Execute a registered system command .. sourcecode:: http - 204 No Content + HTTP/1.1 204 No Content :param source: The source for which to list commands, currently either ``core`` or ``custom`` :param action: The identifier of the command, ``action`` from its definition diff --git a/docs/api/util.rst b/docs/api/util.rst index eb50df4b85..1ee12ff22c 100644 --- a/docs/api/util.rst +++ b/docs/api/util.rst @@ -68,6 +68,21 @@ Test paths or URLs when the test could be performed. The status code of the response does NOT reflect the test result! + .. _sec-api-util-test-server: + + server + Tests whether a provided server identified by host and port can be reached. Protocol can optionally be specified + as well. Supported parameters are: + + * ``host``: The host to test. IP or host name. Mandatory. + * ``port``: The port to test. Integer. Mandatory. + * ``protocol``: The protocol to test with. ``tcp`` or ``udp``. Optional, defaults to ``tcp``. + * ``timeout``: A timeout for the test, in seconds. If no successful connection to the server could be established + within this time frame, the check will be considered a failure. Optional, defaults to 3.05 seconds. + + The ``server`` command returns :http:statuscode:`200` with a :ref:`Server test result ` + when the test could be performed. The status code of the response does NOT reflect the test result! + Requires admin rights. **Example 1** @@ -226,6 +241,35 @@ Test paths or URLs } } + **Example 6** + + Test whether a server is reachable on a given port via TCP. + + .. sourcecode:: http + + POST /api/util/test HTTP/1.1 + Host: example.com + X-Api-Key: abcdef... + Content-Type: application/json + + { + "command": "server", + "host": "8.8.8.8", + "port": 53 + } + + .. sourcecode:: http + + HTTP/1.1 200 OK + Content-Type: application/json + + { + "host": "8.8.8.8", + "port": 53, + "protocol": "tcp", + "result": true + } + :json command: The command to execute, currently either ``path`` or ``url`` :json path: ``path`` command only: the path to test :json check_type: ``path`` command only: the type of path to test for, either ``file`` or ``dir`` @@ -233,8 +277,11 @@ Test paths or URLs :json url: ``url`` command only: the URL to test :json status: ``url`` command only: one or more expected status codes :json method: ``url`` command only: the HTTP method to use for the check - :json timeout: ``url`` command only: the timeout for the HTTP request + :json timeout: ``url`` and ``server`` commands only: the timeout for the test request :json response: ``url`` command only: whether to include response data and if so in what form + :json host: ``server`` command only: the server to test + :json port: ``server`` command only: the port to test + :json protocol: ``server`` command only: the protocol to test :statuscode 200: No error occurred .. _sec-api-util-datamodel: @@ -244,6 +291,9 @@ Data model .. _sec-api-util-datamodel-pathtestresult: +Path test result +---------------- + .. list-table:: :widths: 15 5 10 30 :header-rows: 1 @@ -275,6 +325,9 @@ Data model .. _sec-api-util-datamodel-urltestresult: +URL test result +--------------- + .. list-table:: :widths: 15 5 10 30 :header-rows: 1 @@ -306,3 +359,33 @@ Data model - object - A dictionary with all headers of the checked URL's response. Only present if ``response`` in the request was set. + +.. _sec-api-util-datamodel-servertestresult: + +Server test result +------------------ + +.. list-table:: + :widths: 15 5 10 30 + :header-rows: 1 + + * - Name + - Multiplicity + - Type + - Description + * - ``host`` + - 1 + - string + - The host that was tested. + * - ``port`` + - 1 + - int + - The port that was tested + * - ``protocol`` + - 1 + - string + - The protocol that was tested, ``tcp`` or ``udp`` + * - ``result`` + - 1 + - bool + - ``true`` if the check passed. diff --git a/docs/bundledplugins/cura.rst b/docs/bundledplugins/cura.rst index 30370e5bee..aac96397f2 100644 --- a/docs/bundledplugins/cura.rst +++ b/docs/bundledplugins/cura.rst @@ -45,7 +45,7 @@ Installing CuraEngine You'll need a build of ``legacy`` branch of `CuraEngine `_ in order to be able to use the Cura OctoPrint plugin. You can find the ``legacy`` branch -`here `_. +`here `__. If you previously used the `old variant of the Cura integration `_, you probably still have a fully functional binary lying around in the @@ -60,7 +60,7 @@ Compiling for Raspbian .. note:: A binary of CuraEngine 15.04.06 precompiled on Raspbian Jessie Lite 2016-03-18 is available - `here `_. Don't forget to make it + `here `__. Don't forget to make it executable after copying it to your preferred destination on your Pi (suggestion: ``/usr/local/bin``) with ``chmod +x cura_engine``. Use at your own risk. diff --git a/docs/bundledplugins/pluginmanager.rst b/docs/bundledplugins/pluginmanager.rst index d2a923e85e..dacb3f8ca9 100644 --- a/docs/bundledplugins/pluginmanager.rst +++ b/docs/bundledplugins/pluginmanager.rst @@ -104,13 +104,13 @@ octoprint.plugin.pluginmanager.reconnect_hooks .. code-block:: python - def reconnect_hooks_hook(*args, **kwargs): - return ["octoprint.plugin.exampleplugin.some_custom_hook", - "octoprint.plugin.exampleplugin.some_other_custom_hook"] + def reconnect_hooks_hook(*args, **kwargs): + return ["octoprint.plugin.exampleplugin.some_custom_hook", + "octoprint.plugin.exampleplugin.some_other_custom_hook"] - __plugin_hooks__ = { - "octoprint.plugin.pluginmanager.reconnect_hooks": reconnect_hooks_hook - } + __plugin_hooks__ = { + "octoprint.plugin.pluginmanager.reconnect_hooks": reconnect_hooks_hook + } .. _sec-bundledplugins-pluginmanager-sourcecode: diff --git a/docs/bundledplugins/softwareupdate.rst b/docs/bundledplugins/softwareupdate.rst index 763a0de5eb..b68a6751b4 100644 --- a/docs/bundledplugins/softwareupdate.rst +++ b/docs/bundledplugins/softwareupdate.rst @@ -14,14 +14,14 @@ First Steps Out of the box the Software Update Plugin will be able to notify you of any updates that might be available for your OctoPrint installation or any plugins -that registered themselves with it. In order to also be able to update -your OctoPrint installation, you'll need to configure -at least OctoPrint's checkout folder, and you also should -configure the restart commands for OctoPrint and the whole server. +that registered themselves with it. In order for automatic restarts after updates +to work, you should configure the restart commands for OctoPrint and the whole server. -For configuring the plugin you'll need to go into OctoPrint's Settings Dialog, navigate to the -Software Upda.. _section therein and once you are there click on the little wrench icon in the -upper right corner. +Out of the box the plugin should already be ready to update your OctoPrint installation to current +stable release versions, but you can also switch to one of the available release candidate channels +or outright git commit tracking via the plugin's configuration dialog. To open this dialog, fire up OctoPrint's +Settings Dialog, navigate to the Software Update section therein and once you are there click on the little +wrench icon in the upper right corner. .. _fig-bundledplugins-softwareupdate-plugin-configuration: .. figure:: ../images/bundledplugins-softwareupdate-plugin-configuration.png @@ -32,31 +32,16 @@ upper right corner. There you can adjust the following settings: - * **OctoPrint checkout folder**: This should be the path to OctoPrint's git checkout folder (``/home/pi/OctoPrint`` - for OctoPi or `manual installs following the Raspberry Pi setup guide `_). - This must be set to allow updating from within OctoPrint - - .. note:: - - OctoPi releases 0.12.0 and later ship with this already setup for you. - - .. note:: - - **OctoPi 0.11.0 users**: Please also take a look at - `the note at the very end of this FAQ entry `_. - Due to a little issue in that OctoPi release 0.11.0 you might have to fix - the URL your OctoPrint checkout is using for updating. This can easily be - done by SSHing into your OctoPi instance and doing this:: - - cd ~/OctoPrint - git remote set-url origin https://github.com/foosel/OctoPrint.git - * **OctoPrint version tracking**: Whether you want to track OctoPrint *releases* or every *commit*. Usually you want to select "Release" here which is also the default, unless you are a developer. - * **OctoPrint Release Channel**: The release channel of OctoPrint to track for updates. If you only want stable versions, + * **OctoPrint Release Channel** (if tracking releases): The release channel of OctoPrint to track for updates. If you only want stable versions, select "Stable" here which is also the default. "Maintenance RCs" will also allow you to update to maintenance release candidates, "Devel RCs" will also allow you to update to development release candidates. If in doubt, leave it at "Stable". `Read more about Release Channels here `_. + * **OctoPrint checkout folder** (if tracking git commits): This must be the path to OctoPrint's git checkout folder + (``/home/pi/OctoPrint`` for OctoPi or `manual installs following the Raspberry Pi setup guide `_). + Note that since OctoPrint 1.3.6 you will no longer need to set this to be able to update to releases, only if you + want to be able to update against some bleeding edge git branch. * **Version cache TTL**: The "time to live" of the cache OctoPrint will use to temporarily persist the version information for the various components registered with the plugin, so that they don't have to be queried from the internet every time you load the page. Defaults to 24h, you usually shouldn't need to change that value. @@ -132,30 +117,29 @@ Configuring the Plugin .. code-block:: yaml - plugins: - softwareupdate: - # the time-to-live of the version cache, in minutes - cache_ttl: 60 - - # configured version check and update methods - checks: - # "octoprint" is reserved for OctoPrint - octoprint: - # this defines an version check that will check against releases - # published on OctoPrint's Github repository and an update method - # utilizing an (included) update script that will be run on - # OctoPrint's checkout folder - type: github_release - user: foosel - repo: OctoPrint - update_script: '{python} "/path/to/octoprint-update.py" --python="{python}" "{folder}" "{target}"' - update_folder: /path/to/octoprint/checkout/folder - - # further checks may be define here - - # pip command, if another one than the automatically detected one should be - # used - should normally NOT be necessary and hence set - pip_command: /path/to/pip + plugins: + softwareupdate: + # the time-to-live of the version cache, in minutes + cache_ttl: 60 + + # configured version check and update methods + checks: + # "octoprint" is reserved for OctoPrint + octoprint: + # this defines an version check that will check against releases + # published on OctoPrint's Github repository and pip as update method + # against the release archives on Github - this is the default + type: github_release + user: foosel + repo: OctoPrint + method: pip + pip: 'https://github.com/foosel/OctoPrint/archive/{target_version}.zip' + + # further checks may be define here + + # pip command, if another one than the automatically detected one should be + # used - should normally NOT be necessary and hence set + pip_command: /path/to/pip .. _sec-bundledplugins-softwareupdate-configuration-versionchecks: @@ -249,6 +233,32 @@ Update methods :ref:`hook `. A python callable which performs the update, see below for details. +.. note:: + + To allow default configurations for multiple update methods, if more than one of + the above update method specific settings is set the one to use can be selected + by setting the property ``method`` to the method specific setting in question. + + **Example** + + The following example defines both ``pip`` and ``update_script``. By setting to + ``method`` to ``pip``, the Software Update plugin is instructed to use that as + update method. + + .. code-block:: yaml + + plugins: + softwareupdate: + checks: + octoprint: + type: github_release + user: foosel + repo: OctoPrint + method: pip + pip: 'https://github.com/foosel/OctoPrint/archive/{target_version}.zip' + update_script: '{python} "/path/to/octoprint-update.py" --python="{python}" "{folder}" "{target}"' + checkout_folder: /path/to/octoprint/checkout/folder + .. _sec-bundledplugins-softwareupdate-configuration-patterns: Common configuration patterns @@ -268,6 +278,7 @@ plugin itself): user: foosel repo: OctoPrint branch: devel + method: update_script update_folder: /home/pi/OctoPrint Plugin installed via pip and hosted on Github under diff --git a/docs/configuration/config_yaml.rst b/docs/configuration/config_yaml.rst index e934fb82fe..f469c20866 100644 --- a/docs/configuration/config_yaml.rst +++ b/docs/configuration/config_yaml.rst @@ -285,9 +285,13 @@ The following settings are only relevant to you if you want to do OctoPrint deve # to false. okWithLinenumber: false - # Number of extruders to simulate on the virtual printer. + # Number of extruders to simulate on the virtual printer. Map from tool id (0, 1, ...) to temperature + # in °C numExtruders: 1 + # Allows pinning certain hotends to a fixed temperature + pinnedExtruders: null + # Whether to include the current tool temperature in the M105 output as separate T segment or not. # # True: > M105 @@ -304,13 +308,6 @@ The following settings are only relevant to you if you want to do OctoPrint deve # > File opened includeFilenameInOpened: true - # The maximum movement speeds of the simulated printer's axes, in mm/s - movementSpeed: - x: 6000 - y: 6000 - z: 200 - e: 300 - # Whether the simulated printer should also simulate a heated bed or not hasBed: true @@ -331,6 +328,18 @@ The following settings are only relevant to you if you want to do OctoPrint deve # to make sure nothing gets lost on the line repetierStyleResends: false + # If enabled, ok will be sent before a commands output, otherwise after or inline (M105) + # + # True: > M20 + # < ok + # < Begin file list + # < End file list + # False: > M20 + # < Begin file list + # < End file list + # < ok + okBeforeCommandOutput: false + # If enabled, reports the first extruder in M105 responses as T instead of T0 # # True: > M105 @@ -358,7 +367,8 @@ The following settings are only relevant to you if you want to do OctoPrint deve # side will block rxBuffer: 64 - # Size of simulated command buffer + # Size of simulated command buffer, number of commands. If full, buffered commands will block + # until a slot frees up commandBuffer: 4 # Whether to support the M112 command with simulated kill @@ -370,6 +380,58 @@ The following settings are only relevant to you if you want to do OctoPrint deve # Whether to simulate broken M29 behaviour (missing ok after response) brokenM29: true + # Whether F is supported as individual command + supportF: false + + # Firmware name to report (useful for testing firmware detection) + firmwareName: Virtual Marlin 1.0 + + # Simulate a shared nozzle + sharedNozzle: false + + # Send "busy" messages if busy processing something + sendBusy: false + + # Simulate a reset on connect + simulateReset: true + + # Lines to send on simulated reset + resetLines: + - start + - Marlin: Virtual Marlin! + - "\x80" + - "SD card ok" + + # Initial set of prepared oks to use instead of regular ok (e.g. to simulate + # mis-sent oks). Can also be filled at runtime via the debug command prepare_ok + preparedOks: [] + + # Format string for ok response. + # + # Placeholders: + # - lastN: last acknowledged line number + # - buffer: empty slots in internal command buffer + # + # Example format string for "extended" ok format: + # ok N{lastN} P{buffer} + okFormatString: ok + + # Format string for M115 output. + # + # Placeholders: + # - firmare_name: The firmware name as defined in firmwareName + m115FormatString: "FIRMWARE_NAME: {firmware_name} PROTOCOL_VERSION:1.0" + + # Whether to include capability report in M115 output + m115ReportCapabilites: false + + # Capabilities to report if capability report is enabled + capabilities: + AUTOREPORT_TEMP: true + + # Simulated ambient temperature in °C + ambientTemperature: 21.3 + .. _sec-configuration-config_yaml-estimation: Estimation @@ -793,7 +855,12 @@ Use the following settings to configure the serial connection to the printer: # Command to send in order to initiate a handshake with the printer. # Defaults to "M110 N0" which simply resets the line numbers in the firmware and which # should be acknowledged with a simple "ok". - helloCommand: M110 N0 + helloCommand: + - M110 N0 + + # Commands that should never be auto-uppercased when sent to the printer. Defaults to only M117. + autoUppercaseBlacklist: + - M117 # Whether to disconnect on errors or not disconnectOnErrors: true @@ -923,6 +990,17 @@ Use the following settings to configure the server: # DNS port against which to check (default: 53 - the default DNS port) port: 53 + # Configuration of the plugin blacklist + pluginBlacklist: + # whether use of the blacklist is enabled, defaults to false + enabled: false + + # the URL from which to fetch the blacklist + url: http://plugins.octoprint.org/blacklist.json + + # time to live of the cached blacklist, in seconds (default: 15 minutes) + ttl: 15 * 60 + # Settings of when to display what disk space warning diskspace: diff --git a/docs/development/environment.rst b/docs/development/environment.rst new file mode 100644 index 0000000000..8308712b71 --- /dev/null +++ b/docs/development/environment.rst @@ -0,0 +1,218 @@ +.. _sec-development-environment: + +Setting up a Development environment +==================================== + +.. _sec-development-environment-source: + +Obtaining, building and running the source +------------------------------------------ + +This describes the general steps in obtaining, building and running. OS specific instructions can be found +below. + + * Prerequisites: + + * `Python 2.7 `_ including ``pip``, ``setuptools`` and ``virtualenv`` + * `Git `_ + + * Checkout the OctoPrint sources from their Git repository: ``git clone https://github.com/foosel/OctoPrint.git`` + * Enter the checked out source folder: ``cd OctoPrint`` + * Create a virtual environment in the checked out source folder to use for installing and running OctoPrint and its + dependencies (this avoids potential versioning issues for the dependencies with system wide installed + instances): ``virtualenv venv`` + * Activate the virtual environment: ``source venv/bin/activate`` (Linux, MacOS) or + ``source venv/Scripts/activate`` (Git Bash under Windows, see below) + * Update ``pip`` in the virtual environment: ``pip install --upgrade pip`` + * Install OctoPrint in `"editable" mode `_, + including its regular *and* development and plugin development dependencies: ``pip install -e .[develop,plugins]`` + +When the virtual environment is activated you can then: + + * run the OctoPrint server via ``octoprint serve`` + * run the test suite from the checked out source folder via ``nosetests --with-doctest`` + * build the documentation from the ``docs`` sub folder of the checked out sources via ``sphinx-build -b html . _build`` + +.. _sec-development-environment-source-linux: + +Linux +..... + +This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different +location, please substitute accordingly. + +First make sure you have python including its header files, pip, setuptools, virtualenv, git and some build requirements +installed: + + * On apt based distributions (e.g. Debian, Ubuntu, ...): + + .. code-block:: none + + sudo apt-get install python python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential + + * On zypper based distributions (example below for SLES 12 SP2): + + .. code-block:: none + + sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/SLE_12_SP2/ python_devel + sudo zypper ref + sudo zypper in python python-pip python-devel python-setuptools python-virtualenv git libyaml-devel + sudo zypper in -t pattern Basis-Devel + +.. todo:: + + Using a Linux distribution that doesn't use ``apt`` or ``zypper``? Please send a + `Pull Request `_ to get the necessary + steps into this guide! + +Then: + +.. code-block:: none + + cd ~/devel + git clone https://github.com/foosel/OctoPrint.git + cd OctoPrint + virtualenv venv + source ./venv/bin/activate + pip install --upgrade pip + pip install -e .[develop,plugins] + +You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual +environment. + +.. _sec-development-environment-windows: + +Windows +....... + +This assumes you'll host your OctoPrint development checkout at ``C:\Devel\OctoPrint``. If you want to use a different +location, please substitute accordingly. + +First download & install: + + * `Python 2.7.12 Windows x86 MSI installer `_ + + * make sure to have the installer add Python to the ``PATH`` and have it install ``pip`` too + + * `Microsoft Visual C++ Compiler for Python 2.7 `_ + * `Git for Windows `_ + +Open the Git Bash you just installed and in that: + +.. code-block:: none + + pip install virtualenv + cd /c/Devel + git clone https://github.com/foosel/OctoPrint.git + cd OctoPrint + virtualenv venv + source ./venv/Scripts/activate + pip install --upgrade pip + pip install -e .[develop,plugins] + +.. _sec-development-environment-mac: + +Mac OS X +........ + +.. note:: + + This guide is based on the `Setup Guide for Mac OS X on OctoPrint's wiki `_. + Please report back if it works for you, due to lack of access to a Mac I cannot test it myself. Thanks. + +This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different +location, please substitute accordingly. + +You'll need a user account with administrator privileges. + + * Install the latest version of Xcode suitable for your OS. For example, OS X 10.11 (El Capitan) requires Xcode 7. + * Install Xcode's command line tools: + + * ``xcode-select --install`` + * ``sudo xcodebuild`` (ensure the license was accepted) + * If you have more than one Xcode installed: ``sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`` + + * Install Homebrew and use that to install Python: + + * ``ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`` + * ``brew install python`` + + * Install `virtualenv `_ + + * ``pip install virtualenv`` + + * Install OctoPrint + + .. code-block:: none + + cd ~/devel + git clone https://github.com/foosel/OctoPrint.git + cd OctoPrint + virtualenv venv + source venv/bin/activate + pip install --upgrade pip + pip install -e .[develop,plugins] + +.. _sec-development-environment-ides: + +IDE Setup +--------- + +.. todo:: + + Using another IDE than the ones below? Please send a + `Pull Request `_ to get the necessary + steps into this guide! + +.. _sec-development-environment-ides-pycharm: + +PyCharm +....... + + - "File" > "Open ...", select OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``) + - "File" > "Settings ..." > "Project: OctoPrint" > "Project Interpreter" > "Add local ...", select OctoPrint venv + folder (e.g. ``~/devel/OctoPrint/venv`` or ``C:\Devel\OctoPrint\venv``) + - Right click "src" in project tree, mark as source folder + - Add Run/Debug Configuration, select "Python": + + * Name: OctoPrint server + * Script: path to ``run`` in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/run`` or ``C:\Devel\OctoPrint\run``) + * Script parameters: ``serve --debug`` + * Project: ``OctoPrint`` + * Python interpreter: the ``venv`` local virtual environment + * Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``) + * If you want dependencies to auto-update on run if necessary: "Before Launch" > "+" > "Run external tool" > "+" + + * Name: Update OctoPrint dependencies + * Program: ``$PyInterpreterDirectory$/pip`` (or ``$PyInterpreterDirectory$/pip.exe`` on Windows) + * Parameters: ``install -e .[develop,plugins]`` + * Working directory: ``$ProjectFileDir$`` + + - Add Run/Debug Configuration, select "Python tests" and therein "Nosetests": + + * Name: OctoPrint nosetests + * Target: Path, ``.`` + * Project: ``OctoPrint`` + * Python interpreter: the ``venv`` local virtual environment + * Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``) + * Just like with the run configuration for the server you can also have the dependencies auto-update on run of + the tests, see above on how to set this up. + + - Add Run/Debug Configuration, select "Python docs" and therein "Sphinx task" + + * Name: OctoPrint docs + * Command: ``html`` + * Input: the ``docs`` folder in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/docs`` or + ``C:\Devel\OctoPrint\docs``) + * Output: the ``docs/_build`` folder in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/docs/_build`` or + ``C:\Devel\OctoPrint\docs\_build``) + * Project: ``OctoPrint`` + * Python interpreter: the ``venv`` local virtual environment + * Just like with the run configuration for the server you can also have the dependencies auto-update when building + the documentation, see above on how to set this up. + +.. note:: + + Make sure you are running a PyCharm version of 2016.1 or later, or manually fix + `a debugger bug contained in earlier versions `_ or plugin management + will not work in your developer install when running OctoPrint from PyCharm in debug mode. diff --git a/docs/development/index.rst b/docs/development/index.rst index 7d24a843e2..8b30385920 100644 --- a/docs/development/index.rst +++ b/docs/development/index.rst @@ -4,183 +4,8 @@ Development ########### -.. contents:: - :local: +.. toctree:: + :maxdepth: 3 -.. _sec-development-environment: - -Setting up a Development environment -==================================== - -.. _sec-development-environment-source: - -Obtaining, building and running the source ------------------------------------------- - -This describes the general steps in obtaining, building and running. OS specific instructions can be found -below. - - * Prerequisites: - - * `Python 2.7 `_ including ``pip``, ``setuptools`` and ``virtualenv`` - * `Git `_ - - * Checkout the OctoPrint sources from their Git repository: ``git clone https://github.com/foosel/OctoPrint.git`` - * Create a virtual environment in the checkout folder to use for installing and running OctoPrint and its - dependencies (this avoids potential versioning issues for the dependencies with system wide installed - instances): ``virtualenv venv`` - * Activate the virtual environment: ``source venv/bin/activate`` (might differ per your platform/OS) - * Update ``pip`` in the virtual environment: ``pip install --upgrade pip`` - * Install OctoPrint in `"editable" mode `_, - including its regular *and* development dependencies: ``pip install -e .[develop]`` - -.. _sec-development-environment-source-linux: - -Linux -..... - -This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different -location, please substitute accordingly. - -First make sure you have python including its header files, pip, setuptools, virtualenv, git and some build requirements -installed: - - * On apt based distributions (e.g. Debian, Ubuntu, ...): - - .. code-block:: none - - sudo apt-get install python python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential - -.. todo:: - - Using a Linux distribution that doesn't use ``apt``? Please send a - `Pull Request `_ to get the necessary - steps into this guide! - -Then: - -.. code-block:: none - - cd ~/devel - git clone https://github.com/foosel/OctoPrint.git - cd OctoPrint - virtualenv venv - source ./venv/bin/activate - pip install --upgrade pip - pip install -e .[develop] - -You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual -environment. - -.. _sec-development-environment-windows: - -Windows -....... - -This assumes you'll host your OctoPrint development checkout at ``C:\Devel\OctoPrint``. If you want to use a different -location, please substitute accordingly. - -First download & install: - - * `Python 2.7.12 Windows x86 MSI installer `_ - - * make sure to have the installer add Python to the ``PATH`` and have it install ``pip`` too - - * `Microsoft Visual C++ Compiler for Python 2.7 `_ - * `Git for Windows `_ - -Open the Git Bash you just installed and in that: - -.. code-block:: none - - pip install virtualenv - cd /c/Devel - git clone https://github.com/foosel/OctoPrint.git - cd OctoPrint - virtualenv venv - source ./venv/bin/activate - pip install --upgrade pip - pip install -e .[develop] - -You can then start OctoPrint via ``/c/Devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual -environment. - -.. _sec-development-environment-mac: - -Mac OS X -........ - -.. note:: - - This guide is based on the `Setup Guide for Mac OS X on OctoPrint's wiki `_. - Please report back if it works for you, due to lack of access to a Mac I cannot test it myself. Thanks. - -This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different -location, please substitute accordingly. - -You'll need a user account with administrator privileges. - - * Install the latest version of Xcode suitable for your OS. For example, OS X 10.11 (El Capitan) requires Xcode 7. - * Install Xcode's command line tools: - - * ``xcode-select --install`` - * ``sudo xcodebuild`` (ensure the license was accepted) - * If you have more than one Xcode installed: ``sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`` - - * Install Homebrew and use that to install Python: - - * ``ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`` - * ``brew install python`` - - * Install `virtualenv `_ - - * ``pip install virtualenv`` - - * Install OctoPrint - - .. code-block:: none - - cd ~/devel - git clone https://github.com/foosel/OctoPrint.git - cd OctoPrint - virtualenv venv - source venv/bin/activate - pip install -e .[develop] - -You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual -environment. - -.. _sec-development-environment-ides: - -IDE Setup ---------- - -.. todo:: - - Using another IDE than the ones below? Please send a - `Pull Request `_ to get the necessary - steps into this guide! - -.. _sec-development-environment-ides-pycharm: - -PyCharm -....... - - - "File" > "Open ...", select OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``) - - "File" > "Settings ..." > "Project: OctoPrint" > "Project Interpreter" > "Add local ...", select OctoPrint venv - folder (e.g. ``~/devel/OctoPrint/venv`` or ``C:\Devel\OctoPrint\venv``) - - Right click "src" in project tree, mark as source folder - - Add Run/Debug Configuration, select "Python": - - * Name: OctoPrint server - * Script: path to ``run`` in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/run`` or ``C:\Devel\OctoPrint\run``) - * Script parameters: ``--debug`` - * Project: ``OctoPrint`` - * Python interpreter: the ``venv`` local virtual environment - * Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``) - -.. note:: - - Make sure you are running a PyCharm version of 2016.1 or later, or manually fix - `a debugger bug contained in earlier versions `_ or plugin management - will not work in your developer install when running OctoPrint from PyCharm in debug mode. + environment.rst + virtual_printer.rst diff --git a/docs/development/virtual_printer.rst b/docs/development/virtual_printer.rst new file mode 100644 index 0000000000..479cdc198a --- /dev/null +++ b/docs/development/virtual_printer.rst @@ -0,0 +1,116 @@ +.. _sec-development-virtual-printer: + +Setting up the virtual printer for debugging +============================================ + +OctoPrint includes, by default, a virtual printer plugin. This plugin allows you to debug OctoPrint's serial +communication without connecting to an actual printer. Furthermore, it is possible to create certain edge conditions +that may be hard to reproduce with a real printer. + +.. _sec-development-virtual-printer-enable: + +Enabling the virtual printer +---------------------------- + +The virtual printer is enabled by editing OctoPrint's config.yaml file. Details on the configuration file can +be found in the full :ref:`config.yaml documentation `. + +The steps to take are as follows: + +* Find config.yaml in the OctoPrint settings folder. Usually in ``~/.octoprint`` on Linux, in ``%APPDATA%/OctoPrint`` on Windows and in ``~/Library/Application Support/OctoPrint`` on MacOS. +* Add or extend the ``devel`` section with: + +.. code-block:: yaml + + devel: + virtualPrinter: + enabled: true + +* Restart OctoPrint. +* In the connection panel, a new option will appear in the Serial Port dropdown labeled ``VIRTUAL``. +* Select this option and click ``connect``. +* The virtual printer is now active. + +.. _sec-development-virtual-printer-config: + +Virtual printer configuration options +------------------------------------- + +The config.yaml file has many configuration options for the virtual printer that allow you to fine-tune its behavior. + +Please see the relevant :ref:`config.yaml section ` for the full details. + +.. _sec-development-virtual-printer-log: + +Log file +-------- + +Once activated, the virtual printer will log all serial communication in the ``plugin_virtual_printer_serial.log`` file +that can be found in the OctoPrint settings folder. + +.. _sec-development-virtual-printer-debug: + +Debug commands +-------------- + +You can simulate certain conditions and communications through the terminal tab in OctoPrint's interface. + +All commands start with ``!!DEBUG:`` and are followed by the command you want to execute. For instance, sending +``!!DEBUG:action_disconnect`` will disconnect the printer. Sending ``!!DEBUG`` without command will show a help +message with all the available commands. + +Action Triggers +............... + +``action_pause`` +Sends a "// action:pause" action trigger to the host. + +``action_resume`` +Sends a "// action:resume" action trigger to the host. + +``action_disconnect`` +Sends a "// action:disconnect" action trigger to the host. + +``action_custom [ ]`` +Sends a custom "// action: " action trigger to the host. + +Communication Errors +.................... + +``dont_answer`` +Will not acknowledge the next command. + +``go_awol`` +Will completely stop replying. + +``trigger_resend_lineno`` +Triggers a resend error with a line number mismatch + +``trigger_resend_checksum`` +Triggers a resend error with a checksum mismatch + +``drop_connection`` +Drops the serial connection + +``prepare_ok `` +Will cause to be enqueued for use, will be used instead of actual "ok" + +Reply Timing / Sleeping +....................... +``sleep `` +Sleep s + +``sleep_after `` +Sleeps s after each execution of + +``sleep_after_next `` +Sleeps s after execution of next + +Misc +.... + +``help`` +Show the available commands. + +``send `` +Sends back diff --git a/docs/events/index.rst b/docs/events/index.rst index 225331f5a8..4e675c8f8f 100644 --- a/docs/events/index.rst +++ b/docs/events/index.rst @@ -237,7 +237,7 @@ UpdatedFiles .. deprecated:: 1.2.0 - The ``gcode`` modification type has been superceeded by ``printables``. It is currently still available for + The ``gcode`` modification type has been superseded by ``printables``. It is currently still available for reasons of backwards compatibility and will also be sent on modification of ``printables``. It will however be removed with 1.4.0. diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst index 9c12a35c74..4be810ea11 100644 --- a/docs/features/gcode_scripts.rst +++ b/docs/features/gcode_scripts.rst @@ -146,7 +146,7 @@ Out of the box, OctoPrint defaults to the following script setup for ``afterPrin ;disable all heaters {% snippet 'disable_hotends' %} - [% snippet 'disable_bed' %} + {% snippet 'disable_bed' %} ;disable fan M106 S0 @@ -174,6 +174,75 @@ As you can see, the ``disable_hotends`` and ``disable_bed`` snippets utilize the extruders and set their temperature to 0, and to also set the bed temperature to 0 if a heated bed is configured. +.. _sec-features-gcode_scripts-examples: + +Examples +-------- + +.. _sec-features-gcode_scripts-examples-more_nifty_pause_and_resume: + +More nifty pause and resume +........................... + +If you do not have a multi-extruder setup, aren't printing from SD and have "Log position on pause" enabled under +Settings > Serial > Advanced options, the following ``afterPrintPaused`` and +``beforePrintResumed`` scripts might be interesting for you. With something like them in place, OctoPrint will move your print head +out of the way to a safe rest position (here ``G1 X0 Y0``, you might want to adjust that) on pause and move it back +to the persisted pause position on resume, making sure to also reset the extruder and feedrate. + +.. code-block:: jinja + :caption: ``afterPrintPaused`` script + + {% if pause_position.x is not none %} + ; relative XYZE + G91 + M83 + + ; retract filament, move Z slightly upwards + G1 Z+5 E-5 F4500 + + ; absolute XYZE + M82 + G90 + + ; move to a safe rest position, adjust as necessary + G1 X0 Y0 + {% endif %} + +.. code-block:: jinja + :caption: ``beforePrintResumed`` script + + {% if pause_position.x is not none %} + ; relative extruder + M83 + + ; prime nozzle + G1 E-5 F4500 + G1 E5 F4500 + G1 E5 F4500 + + ; absolute E + M82 + + ; absolute XYZ + G90 + + ; reset E + G92 E{{ pause_position.e }} + + ; move back to pause position XYZ + G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500 + + ; reset to feed rate before pause if available + {% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %} + {% endif %} + +.. warning:: + + As mentioned in the warning above and the description of the example itself, this will *only* work if you are + not printing from SD and not using multiple extruders since OctoPrint will only then be able to track the + necessary position data and print parameters due to firmware limitations. + .. seealso:: `Jinja Template Designer Documentation `_ diff --git a/docs/features/safemode.rst b/docs/features/safemode.rst index a99cbf973d..c90d30d60d 100644 --- a/docs/features/safemode.rst +++ b/docs/features/safemode.rst @@ -16,6 +16,9 @@ Additionally, OctoPrint allows uninstalling plugins in this mode, allowing recov a third party plugin causes the server to not start up or the web interface to not render or function correctly anymore. +Whenever reporting an issue with OctoPrint, please always attempt to reproduce it in safe mode as well to +ensure it really is an issue in OctoPrint itself and now caused by one of your installed third party plugins. + .. _sec-features-safemode-how: How to start OctoPrint in safe mode @@ -23,15 +26,37 @@ How to start OctoPrint in safe mode There exist three ways to start OctoPrint in safe mode: - * since OctoPrint 1.3.2: by selecting "Restart OctoPrint in safe mode" from the "System" menu, - if the "Restart OctoPrint" server command has been correctly configured (see :numref:`fig-features-safemode-systemmenu`). - * by starting OctoPrint with the command line parameter ``--safe``, e.g. ``octoprint serve --safe`` - * by setting the option ``server.startOnceInSafeMode`` in :ref:`config.yaml ` - to ``true`` and restarting + * by selecting "Restart OctoPrint in safe mode" from the "System" menu, + if the "Restart OctoPrint" server command has been correctly configured (since OctoPrint 1.3.2, + see :numref:`fig-features-safemode-systemmenu`) + * by setting the flag ``server.startOnceInSafeMode`` in :ref:`config.yaml ` + to ``true`` and restarting. To set this flag you have the following options: + + * from command line run ``octoprint safemode`` (since OctoPrint 1.3.6) + * from command line run ``octoprint config set --bool server.startOnceInSafeMode true`` (fixed in OctoPrint 1.3.6) + * use the `Yamlpatcher Plugin `_ and enter & apply the patch + ``[["set", "server.startOnceInSafeMode", true]]`` + * edit ``config.yaml`` manually with a text editor, locate the ``server`` block if it already exists or create it + if it doesn't and add ``startOnceInSafeMode: true`` to it: + + .. code-block:: yaml + + # ... + server: + startOnceInSafeMode: true + # ... + + Please also refer to the :ref:`YAML primer `. + * by starting OctoPrint with the command line parameter ``--safe``, e.g. ``octoprint serve --safe`` (don't forget to + shutdown OctoPrint first before doing this) The last two options will have OctoPrint enable safe mode only for the next server start - once you restart OctoPrint again, safe mode will be disabled again. +.. note:: + + **OctoPi users**: For you that's ``~/oprint/bin/octoprint`` wherever it says just ``octoprint``. + .. _fig-features-safemode-systemmenu: .. figure:: ../images/features-safemode-systemmenu.png :align: center diff --git a/docs/images/bundledplugins-softwareupdate-plugin-configuration.png b/docs/images/bundledplugins-softwareupdate-plugin-configuration.png index 7d5a672cb3..ba13a99738 100644 Binary files a/docs/images/bundledplugins-softwareupdate-plugin-configuration.png and b/docs/images/bundledplugins-softwareupdate-plugin-configuration.png differ diff --git a/docs/jsclientlib/base.rst b/docs/jsclientlib/base.rst index d393f27e2b..618299fd12 100644 --- a/docs/jsclientlib/base.rst +++ b/docs/jsclientlib/base.rst @@ -119,7 +119,7 @@ :param string method: The HTTP method to use for the request (optional) :param string url: The URL to perform the request against (optional) :param object data: The data to send in the request body (optional) - :param object opts: Additonal options to use for the request (optional) + :param object opts: Additional options to use for the request (optional) :returns Promise: A `jQuery Promise `_ for the request's response .. js:function:: OctoPrintClient.get(url, opts) diff --git a/docs/jsclientlib/index.rst b/docs/jsclientlib/index.rst index d97da3bf46..8fcc6ee181 100644 --- a/docs/jsclientlib/index.rst +++ b/docs/jsclientlib/index.rst @@ -14,7 +14,7 @@ If you are using it from a web page hosted on OctoPrint as a Jinja2 template, yo methods to embed it instead of manually entering the URL, in order to have OctoPrint take care of setting the correct URL prefix: -.. code-block:: html +.. code-block:: html+jinja +