In order to solve the initial handshake problem with apps, OctoPrint now supports so called app session keys which are basically API keys with a limited validity. Obtaining those keys is based on a handshake procedure backed by RSA signatures. OctoPrint needs to be aware of apps and their associated public keys (with the AppPlugin there exists a mechanism to add additional recognized apps by installing a plugin). Apps perform the handshake by first requesting a temporary key with very limited validity, then sending a message back to OctoPrint containing their id, version, the temporary key and a signature created with their private key over these three pieces of data. OctoPrint then tries to verify the signature and if successful unlocks the key to be used as a fully recognized API key.
This way it will also be possible to easily add another qrcode to the user api key later. Refused to work for now (value binding doesn't update), so commented out right now, but works in theory.
- be able to handle slicers which can't report progress
- distinguish between registered and configured slicers (e.g. to allow uploading of profiles via the settings before having saved the path to the executable)
Also allow for definition of access validation and serving as attachment though.
Hopefully also fixes#606, since that was possibly called by our own implementation of content streaming, which now has been removed completely.
So far when logging in from two different browsers, then logging out in one of them the user was logged out across all browsers. This should now be changed in so far as that each individual browser session is tracked and only that session is ended by a logout that belongs to the browser where the logout button was clicked.
Should fix#556
This way there won't be two concurrent jobs trying to slice to the same file, which would practically render the cpu cycles from any slicing jobs than the final one wasted. Also adds a new event "SlicingCancelled" that will be sent in these cases.
Since config.yaml gets now saved on server startup before settings basedir gets initialized by other means (e.g. first access of base folder for uploads), it was not created yet when the config.yaml was tried to be saved upon first start up, causing an error at server startup.
Closes#604
-added a new field in the control-section, for controlling the movement of
the printer by keypresses.
To control you printer by keypress, you have to connect to printer first.
Then click into the textfield to activate it. Now you can press the arrow
keys, to move the printhead in the X- and Y-directions, press the W or S
key for Z-direction or the number keys 1, 2, 3 or 4 for choose the
distance (0.1mm, 1mm....)
Due to a missing switch to a refactored version of an internal data structure, that file stayed being selected but wasn't actually there anymore, leading to an error upon hitting Print.
- File management is prepared to support folders (UI still lacking support)
- STL files are now first class citizens
- can be managed via the file list (and filtered from it)
- can be sliced on demand
- Slicing now happens via plugins
- Added Cura plugin
- uses CuraEngine directly instead of full Cura installation
- Cura profile importer for importing profiles from regular Cura installs via settings dialog
- TODO: UI for editing profiles
- API for slicing and slicing profile management
Plugins may be able to use this method for final setups before the implementations and hooks are evaluated, e.g. for adjusting their offered functionality based on what other plugins are available.
netconnectd now regularly pings hostname it got from backend (defaults to <systemname>.local) while switching to wifi from ap mode and reloads page to that if host comes up.
This requires the browser the client is currently running in to be able to resolve local domains as broadcasted via avahi. Windows systems will need to install the Bonjour for Windows client for this to work.
- Additional zeroconf services may now be added via config
- Exposed zeroconf_register method as helper for plugins
- Vendor specifics may be added to service registrations via config
* now also correctly displays current state
* detects current wifi network
* spinner while configuring wifi
* quality display only if quality available
Changed version output accordingly to now display "{version} ({branch} branch)" if branch information is available (which should be the case if installation was performed from git).
(cherry picked from commit a48b5de)
You can now define a lookup file explicitely mapping virtual version tags to branches via regular expressions and a reference commit from which the commit distance will be calculated.
Format of the file is
<branch-regex> <tag> <reference commit>
The file is processed from top to bottom, the first matching line wins. If <tag> or <reference commit> are left out, the lookup table does not apply to the matched branches and the regular versioneer resolution (via git describe) takes place.
Current configuration makes "master", "staging" and any branch starting with "fix/" make use the default behaviour, all other branches (so basically all development branches) are defined as "1.2.0-dev"
(cherry picked from commit 212f40c)
Changed version output accordingly to now display "{version} ({branch} branch)" if branch information is available (which should be the case if installation was performed from git).
You can now define a lookup file explicitely mapping virtual version tags to branches via regular expressions and a reference commit from which the commit distance will be calculated.
Format of the file is
<branch-regex> <tag> <reference commit>
The file is processed from top to bottom, the first matching line wins. If <tag> or <reference commit> are left out, the lookup table does not apply to the matched branches and the regular versioneer resolution (via git describe) takes place.
Current configuration makes "master", "staging" and any branch starting with "fix/" make use the default behaviour, all other branches (so basically all development branches) are defined as "1.2.0-dev"
setup.py tried to use babel imports before the necessary requirements
were fetched. Now only tries to import that stuff if
babel_{refresh|compile|new} is called instead of importing it
in the file header.
Also included is a translation for (informal) german.
New languages can be added with "python setup.py babel_new --locale=<language code>" which will create the corresponding .po file from the existing .pot file under "src/octoprint/translations/<language code>". Translations can be refreshed from strings in source with "python setup.py babel_refresh". Existing translations can be compiled into usable translation files (.mo for python and .js for Javascript) via "python setup.py babel_compile".
You'll need to install the development dependencies for all of this to work, just issue "pip install -r requirements-dev.txt"
Note: numbers are not yet correctly formatted for their respective locale (e.g. "2.5mm" instead of "2,5mm" in german).
If there's a query already present, just append the timestamp to it with a & in between instead of creating a new query.
(cherry picked from commit 51c77be)
Adds a new config key printerParameters.defaultExtrusionLength which can be configured via the settings dialog in the Printer section and then gets used to set the placeholder value on the extrusion/retraction control and as fallback if the user entered no value when clicking the Extrude/Retract button.
Closes#513
Any T command targeting a number higher than the value specified in the settings for gcodeAnalysis.maxExtruders (defaults to 10) will be ignored and trigger a warning in the log file.
Fix for #539
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.
Closes#257 for now.
(cherry picked from commit 02212bd)
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.
Closes#257 for now.
(cherry picked from commit 02212bd)
Depending on what was happening in the monitoring thread this could lead to an attempt to write to the already closed port, logging an error and killing the interface in the process. Also fixed a timing issue in the state reporting towards the frontend, state updates and readings for clients are now wrapped in a mutex
Closes#492
(cherry picked from commit 11fb18f)
Should enable people to set their axes origin so that the viewer matches what they see on their printer.
Should close#431
(cherry picked from commit 030ffe6)
Most notably the interfering options tracked in #398, but also made "Center viewport on model" and "Zoom in on model" automatically deselect and de-apply if viewport gets manipulated by user, therefore properly allowing the re-select by the user to work to.
Closes#398
(cherry picked from commit f195af0)
Most notably the interfering options tracked in #398, but also made "Center viewport on model" and "Zoom in on model" automatically deselect and de-apply if viewport gets manipulated by user, therefore properly allowing the re-select by the user to work to.
Closes#398
Now only takes a look at the last contained item in a split for whitespace of the filename. If that's parseable as an integer, it's probably the size of the file and everything before that the filename. If not, the whole line is the filename, regardless of how many whitespace in contains in between.
See #534
Depending on what was happening in the monitoring thread this could lead to an attempt to write to the already closed port, logging an error and killing the interface in the process. Also fixed a timing issue in the state reporting towards the frontend, state updates and readings for clients are now wrapped in a mutex
Closes#492
Introduced two new configuration settings, server.reverseProxy.prefixHeader and server.reverseProxy.schemeHeader to define the headers to evaluate for prefix and scheme to use respectively, also moved server.baseUrl and server.scheme to server.reverseProxy.fallbackPrefix and server.reverseProxy.fallbackScheme.
Also fixed SockJS URI as generated in index.jinja to include BASE_URL.
Should do what PR #507 intended, but with less code duplication.
This is just a hack really, the proper approach would be to finally move to a real responsive design, but this should prove as a valid workaround until that is realized.
Closes#257 for now.
This was causing the GET request for the list of files following directly after a successful response from an upload to get associated with the second empty response sent directly after the upload and such lead to a funny timing issue causing the file list not to update correctly since the response to THAT request -- while received by the client -- could then not be processed.
See #455
Major refactoring of octoprint.server.util (divided into smaller submodules), extended Tornado to allow for request-specific max content lengths, introduced settings parameters to configure maximum upload size, maximum request body size and file suffixes
See #455
'headers' was a way too generic name, and the code structure implied
it was used in place of 'resp.headers' or 'request.headers', which is not the case.
Also add comment about the purpose of this code.
When a REST API is called from within a browser page from a different domain,
the server needs to explicitly allow this. This makes the OctoPrint
API available also to other webapps, for instance those hosted on same network in hackerspace.
Use this to define a folder on your system from which to automatically import/move added files into OctoPrint.
Also now monitoring the uploads folder so that if files are removed externally during runtime, the metadata.yaml will be cleaned up.
Negative durations, especially for print time left, might arise if estimation is estimating less than current print time. So we just erase that margin of error in the UI.
Closes#435
Should keep rendering of timelapse from breaking if only a couple of images couldn't be captured due to whatever reason. Suggested by @midopple in #344
- Refactored drawGrid into two functions drawRectangularGrid and drawCircularGrid
- Made sure grid for circular beds always "starts" at (0,0) so that e.g. for a radius of 105mm the center of the bed will be on the grid lines
- Made center on circular bed be better visible by making origin lines thicker
- Made initial focus on bed center properly
According to the RepRap protocol we should actually not ever get anything other than those anyways, as the protocol is defined as ASCII-only. In the future there might be a way to somehow handle such files too, for the time being this fixes issues though where non-ascii files on the SD made the whole SD file handling not work.
Closes#381
(cherry picked from commit b115b6f)
You can now define an amount of seconds that should be added to the rendered timelapse (so, since the current fps setting is 25 frames per seconds, 25 * the configured amount of post roll seconds images will need to be captured).
Timed timelapses add this to the actual run time of the timelapse capturing process (so if you configure 1s post roll, a timed timelapse will run 25s longer than the print)
Z-triggered timelapses just create one last capture from the webcam and use this image again and again (so 25 times for a post roll of 1s).
Implements #384
Will now be left unset if not detected (instead of dying a horrible death), modified frontend to not display bed settings in such cases. While at it also (hopefully) fixed "Target: off" for bed issue.
TODO: Support repetier's "TargetBed:", "TargetExtr%n" syntax
Fixes#399, partially solves #360
Changed the bed dimension PR slightly to use a computed property instead of two separate values and only a computed reader, added options for extruder offsets.
Corrected indentation, removed jumpy cursor, fixed off-by-one errors on history limits, limited history to a maximum of 300 entries ("300 items of command history should really be enough for anybody!")
According to the RepRap protocol we should actually not ever get anything other than those anyways, as the protocol is defined as ASCII-only. In the future there might be a way to somehow handle such files too, for the time being this fixes issues though where non-ascii files on the SD made the whole SD file handling not work.
Closes#381
Evaluate active flag on gcode analyzer AFTER fetching an item from the work queue, otherwise it will always start working once it finds something if the active flag was true once but then switched to false while the queue was still empty.
Thanks to @Salandora for spotting this.
Fixes#357
- also recognize such temperature reports that do not contain a "T:" but a "T0:" (should help with parts of #345)
- properly parse temperature commands to track target temp during slow heatup
- for the former point, also keep track of the currently selected tool
- simulate heatup and replies without "T:" in virtual printer (to test all this)
- also auto-caps T commands in terminal
- confirmation dialog when trying to visualize large files (different threshold for mobile and "regular" devices, configurable of course, although only via config file right now) - should also help a bit with issues leading to #215
- proper clearing of the viewer area when reconnecting to the backend (e.g. after server restart)
Also all of this plus previous commits closes#35
- GCODE viewer now supports multiple extruders and configurable bed sizes
- GCODE viewer also now based on callbacks and config injection instead of dependence on elements in the embedding website
- Switched GCODE viewer to bootstrap-slider for the layer/command sliders, patched bootstrap-slider a bit up (TODO: PR to upstream)
- GCODE interpreter in backend also calculates filament usage for all extruders
- More consequent use of LESS, switched bootstrap to LESS source to have access to variables and mixins, introduced config setting to switch between usage of compiled CSS (checked in as well) or LESS, defaults to CSS
I'm still not happy with that circular import stuff I'm currently doing... there must be a better way to better split stuff built with flask? To investigate...
Changed some endpoints again (removed "/control" path element) and made API spit out only raw data (e.g. seconds, millimeters, unix timestamps etc) instead of formatted versions. Modified frontend to take care of formatting this data itself.
This WILL break existing API clients and probably some event handlers too. I'm sorry for the disruptive changes, but I needed to rectify some decisions before they went too far utilized elsewhere to still be corrected.
Basically this change completely removes the old API and switches it (same endpoint) with the new one, that's basically the existing AJAX API that the client uses, but way more RESTful and based on JSON (exception being the file upload).
The event system has been revamped to carry more payload data (and in an extensible form as dictionary, to allow for later addition of attributes to single events), with the existing event listeners adjusted to also allow users to make use of this data in their consumers.
Documentation has been greatly enhanced for the REST API (and is still being added to), the events will be documented here as well.
Payload data can now be properly injected into event handlers such as command triggers. Added a couple of new events to use for update triggers to the frontend instead of custom code, further decoupling the application. Movie rendering now also causes a frontend notification.
directory to everybody.
This was probably considered appropriate for the case of octoprint
running on a single-user device, but given that Unix has groups
support, it is not necessary, and can be very harmful.