2014-08-31 13:17:32 +00:00
|
|
|
.. _sec-events:
|
|
|
|
|
|
2015-01-16 16:11:31 +00:00
|
|
|
######
|
|
|
|
|
Events
|
|
|
|
|
######
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
|
|
2015-03-12 16:23:55 +00:00
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
With release of OctoPrint 1.1.0, the payload data has been harmonized, it is now a key-value-map for all events.
|
|
|
|
|
Additionally, the format of the placeholders in both system command and gcode command triggers has been changed to
|
|
|
|
|
accommodate for this new format. Last but not least, the way of specifying event hooks has changed, OctoPrint no longer
|
|
|
|
|
separates hooks into two sections (gcodeCommandTrigger and systemCommandTrigger) but instead event hooks are now typed
|
|
|
|
|
to indicate what to do with the command contained.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
.. _sec-events-configuration:
|
|
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
Event hooks are configured via OctoPrint's configuration file ``config.yaml``. There they are contained in a
|
|
|
|
|
``subscriptions`` list located directly under the ``events`` node. The ``command`` node accepts either a single string
|
|
|
|
|
or a list of strings so that multiple commands can be executed in one go. Each hook carries an additional node type that
|
|
|
|
|
must be either ``gcode`` (for GCODE commands to be sent to the printer based on the event) or ``system`` (for commands to be
|
|
|
|
|
executed on the system OctoPrint is running on).
|
|
|
|
|
|
|
|
|
|
All event hooks can be disabled completely by setting ``event > enabled`` to ``false``. You can also disable individual
|
|
|
|
|
hooks by setting the (optional) node ``enabled`` to false, see the example below.
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
.. sourcecode:: yaml
|
|
|
|
|
|
|
|
|
|
events:
|
|
|
|
|
enabled: True
|
|
|
|
|
subscriptions:
|
|
|
|
|
- event: Disconnected
|
|
|
|
|
command: python ~/growl.py -t mygrowlserver -d "Lost connection to printer" -a OctoPrint -i http://raspi/Octoprint_logo.png
|
|
|
|
|
type: system
|
|
|
|
|
enabled: false
|
|
|
|
|
- event: PrintStarted
|
|
|
|
|
command: python ~/growl.py -t mygrowlserver -d "Starting {file}" -a OctoPrint -i http://raspi/Octoprint_logo.png
|
|
|
|
|
type: system
|
|
|
|
|
- event: PrintDone
|
|
|
|
|
command: python ~/growl.py -t mygrowlserver -d "Completed {file}" -a OctoPrint -i http://raspi/Octoprint_logo.png
|
|
|
|
|
type: system
|
|
|
|
|
- event: Connected
|
|
|
|
|
command:
|
|
|
|
|
- M115
|
|
|
|
|
- M117 printer connected!
|
|
|
|
|
- G28
|
|
|
|
|
type: gcode
|
|
|
|
|
|
|
|
|
|
.. _sec-events-placeholders:
|
|
|
|
|
|
|
|
|
|
Placeholders
|
|
|
|
|
============
|
|
|
|
|
|
2015-02-10 15:24:28 +00:00
|
|
|
You can use the following generic placeholders in your event hooks:
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
* ``{__currentZ}``: the current Z position of the head if known, -1 if not available
|
2016-07-08 10:52:40 +00:00
|
|
|
* ``{__filename}`` : name of currently selected file, or ``NO FILE`` if no file is selected
|
|
|
|
|
* ``{__filepath}`` : path in origin location of currently selected file, or ``NO FILE`` if no file is selected
|
|
|
|
|
* ``{__fileorigin}`` : origin of currently selected file, or ``NO FILE`` if no file is selected
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``{__progress}``: the progress of the print in percent, 0 if not available
|
|
|
|
|
* ``{__data}``: a string representation of the payload
|
|
|
|
|
* ``{__now}``: the date and time of the event in ISO 8601
|
|
|
|
|
|
|
|
|
|
Additionally, all data from the payload can be accessed by its key. Example: If the payload happens to be defined
|
|
|
|
|
something like this:
|
|
|
|
|
|
2016-07-08 10:52:40 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path in its origin storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
2014-08-31 13:17:32 +00:00
|
|
|
|
2016-07-08 10:52:40 +00:00
|
|
|
then you'll be able to access the file's name via the placeholder ``{name}``, its path via the placeholder ``{path}``
|
|
|
|
|
and its origin via the placeholder ``{origin}``.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _sec-events-available_events:
|
|
|
|
|
|
|
|
|
|
Available Events
|
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
Server
|
|
|
|
|
------
|
|
|
|
|
|
|
|
|
|
Startup
|
2016-10-11 14:35:29 +00:00
|
|
|
The server has started.
|
|
|
|
|
|
|
|
|
|
Shutdown
|
|
|
|
|
The server is shutting down.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
ClientOpened
|
|
|
|
|
A client has connected to the web server.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``remoteAddress``: the remote address (IP) of the client that connected
|
|
|
|
|
|
|
|
|
|
**Note:** Name changed in version 1.1.0
|
|
|
|
|
|
|
|
|
|
ClientClosed
|
|
|
|
|
A client has disconnected from the webserver
|
|
|
|
|
|
2014-12-21 14:47:24 +00:00
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``remoteAddress``: the remote address (IP) of the client that disconnected
|
|
|
|
|
|
2017-07-19 11:23:31 +00:00
|
|
|
ConnectivityChanged
|
|
|
|
|
The server's internet connectivity changed
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``old``: Old connectivity value (true for online, false for offline)
|
|
|
|
|
* ``new``: New connectivity value (true for online, false for offline)
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
Printer communication
|
|
|
|
|
---------------------
|
|
|
|
|
|
2015-08-11 10:02:26 +00:00
|
|
|
Connecting
|
|
|
|
|
The server is attempting to connect to the printer.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
Connected
|
|
|
|
|
The server has connected to the printer.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``port``: the connected serial port
|
|
|
|
|
* ``baudrate``: the baud rate
|
|
|
|
|
|
2015-08-11 10:02:26 +00:00
|
|
|
Disconnecting
|
|
|
|
|
The server is going to disconnect from the printer. Note that this
|
|
|
|
|
event might not always be sent when the server and printer get disconnected
|
|
|
|
|
from each other. Do not depend on this for critical life cycle management.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
Disconnected
|
|
|
|
|
The server has disconnected from the printer
|
|
|
|
|
|
|
|
|
|
Error
|
|
|
|
|
An error has occurred in the printer communication.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``error``: the error string
|
|
|
|
|
|
2015-08-11 10:02:26 +00:00
|
|
|
PrinterStateChanged
|
|
|
|
|
The state of the printer changed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``state_id``: Id of the new state. See
|
|
|
|
|
:func:`~octoprint.printer.PrinterInterface.get_state_id` for possible values.
|
|
|
|
|
* ``state_string``: Text representation of the new state.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
File handling
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
Upload
|
2017-04-03 09:44:20 +00:00
|
|
|
A file has been uploaded through the web interface.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``target``: the target storage location to which the file was uploaded, either ``local`` or ``sdcard``
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's path within its storage location
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
2017-04-03 09:44:20 +00:00
|
|
|
FileAdded
|
|
|
|
|
A file has been added to a storage.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``storage``: the storage's identifier
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``type``: the file's type, a list of the path within the type hierarchy, e.g. ``["machinecode", "gcode"]`` or
|
|
|
|
|
``["model", "stl"]``
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
A copied file triggers this for its new path. A moved file first triggers ``FileRemoved`` for its original
|
|
|
|
|
path and then ``FileAdded`` for the new one.
|
|
|
|
|
|
|
|
|
|
FileRemoved
|
|
|
|
|
A file has been removed from a storage.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``storage``: the storage's identifier
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``type``: the file's type, a list of the path within the type hierarchy, e.g. ``["machinecode", "gcode"]`` or
|
|
|
|
|
``["model", "stl"]``
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
A moved file first triggers ``FileRemoved`` for its original path and then ``FileAdded`` for the new one.
|
|
|
|
|
|
|
|
|
|
FolderAdded
|
|
|
|
|
A folder has been added to a storage.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``storage``: the storage's identifier
|
|
|
|
|
* ``path``: the folders's path within its storage location
|
|
|
|
|
* ``name``: the folders's name
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
A copied folder triggers this for its new path. A moved folder first triggers ``FolderRemoved`` for its original
|
|
|
|
|
path and then ``FolderAdded`` for the new one.
|
|
|
|
|
|
|
|
|
|
FolderRemoved
|
|
|
|
|
A folder has been removed from a storage.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``storage``: the storage's identifier
|
|
|
|
|
* ``path``: the folders's path within its storage location
|
|
|
|
|
* ``name``: the folders's name
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
A moved folder first triggers ``FolderRemoved`` for its original path and then ``FolderAdded`` for the new one.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
UpdatedFiles
|
|
|
|
|
A file list was modified.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2017-04-03 09:44:20 +00:00
|
|
|
* ``type``: the type of file list that was modified. Only ``printables`` is supported here. See the deprecation
|
|
|
|
|
note below.
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.2.0
|
2014-10-06 15:34:07 +00:00
|
|
|
|
2017-04-03 09:44:20 +00:00
|
|
|
The ``gcode`` modification type has been superceeded 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.
|
2014-10-06 15:34:07 +00:00
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
MetadataAnalysisStarted
|
2016-07-08 08:48:04 +00:00
|
|
|
The metadata analysis of a file has started.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 08:48:04 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the file's origin storage location
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's path within its storage location
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
2016-07-08 08:48:04 +00:00
|
|
|
MetadataAnalysisFinished
|
|
|
|
|
The metadata analysis of a file has finished.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 08:48:04 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the file's origin storage location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``result``: the analysis result -- this is a python object currently only available for internal use
|
|
|
|
|
|
2016-07-08 08:48:04 +00:00
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's path within its storage location
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
FileSelected
|
2016-07-08 10:54:58 +00:00
|
|
|
A file has been selected for printing.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
FileDeselected
|
|
|
|
|
No file is selected any more for printing.
|
|
|
|
|
|
|
|
|
|
TransferStarted
|
2016-07-08 10:54:58 +00:00
|
|
|
A file transfer to the printer's SD has started.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``local``: the file's name as stored locally
|
|
|
|
|
* ``remote``: the file's name as stored on SD
|
|
|
|
|
|
|
|
|
|
**Note:** Name changed in version 1.1.0
|
|
|
|
|
|
|
|
|
|
TransferDone
|
2016-07-08 10:54:58 +00:00
|
|
|
A file transfer to the printer's SD has finished.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``time``: the time it took for the transfer to complete in seconds
|
|
|
|
|
* ``local``: the file's name as stored locally
|
|
|
|
|
* ``remote``: the file's name as stored on SD
|
|
|
|
|
|
|
|
|
|
Printing
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
PrintStarted
|
|
|
|
|
A print has started.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
PrintFailed
|
|
|
|
|
A print failed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
PrintDone
|
|
|
|
|
A print completed successfully.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``time``: the time needed for the print, in seconds (float)
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
PrintCancelled
|
|
|
|
|
The print has been cancelled via the cancel button.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
2016-11-15 10:56:30 +00:00
|
|
|
* ``position``: the print head position at the time of cancelling, if available
|
|
|
|
|
* ``position.x``: x coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.y``: y coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.z``: z coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.e``: e coordinate (of currently selected extruder), as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.t``: last tool selected *through OctoPrint* (note that if you did change the printer's selected
|
|
|
|
|
tool outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will NOT
|
|
|
|
|
be accurate)
|
|
|
|
|
* ``position.f``: last feedrate for move commands **sent through OctoPrint** (note that if you modified the
|
|
|
|
|
feedrate outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will
|
|
|
|
|
NOT be accurate)
|
2016-07-08 10:54:58 +00:00
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
PrintPaused
|
|
|
|
|
The print has been paused.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
2016-11-15 10:56:30 +00:00
|
|
|
* ``position``: the print head position at the time of pausing, if available
|
|
|
|
|
* ``position.x``: x coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.y``: y coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.z``: z coordinate, as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.e``: e coordinate (of currently selected extruder), as reported back from the firmware through `M114`
|
|
|
|
|
* ``position.t``: last tool selected *through OctoPrint* (note that if you did change the printer's selected
|
|
|
|
|
tool outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will NOT
|
|
|
|
|
be accurate)
|
|
|
|
|
* ``position.f``: last feedrate for move commands **sent through OctoPrint** (note that if you modified the
|
|
|
|
|
feedrate outside of OctoPrint, e.g. through the printer controller, or if you are printing from SD, this will
|
|
|
|
|
NOT be accurate)
|
2016-07-08 10:54:58 +00:00
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
PrintResumed
|
|
|
|
|
The print has been resumed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
2016-07-08 10:54:58 +00:00
|
|
|
* ``name``: the file's name
|
|
|
|
|
* ``path``: the file's path within its storage location
|
|
|
|
|
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
|
|
|
|
|
|
|
|
|
.. deprecated:: 1.3.0
|
|
|
|
|
|
|
|
|
|
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``)
|
|
|
|
|
* ``filename``: the file's name
|
|
|
|
|
|
|
|
|
|
Still available for reasons of backwards compatibility. Will be removed with 1.4.0.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
GCODE processing
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
PowerOn
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M80`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
PowerOff
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M81`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Home
|
2016-11-15 10:57:09 +00:00
|
|
|
A ``G28`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
ZChange
|
2016-11-15 10:57:09 +00:00
|
|
|
The printer's Z-Height has changed (new layer) through a ``G0`` or ``G1`` that was sent to the printer through OctoPrint
|
|
|
|
|
(not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
2016-11-15 10:57:09 +00:00
|
|
|
Dwell
|
|
|
|
|
A ``G4`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Waiting
|
2016-11-15 10:57:09 +00:00
|
|
|
One of the following commands was sent to the printer through OctoPrint (not triggered when printing from SD!):
|
|
|
|
|
``M0``, ``M1``, ``M226``
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Cooling
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M245`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Alert
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M300`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Conveyor
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M240`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Eject
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M40`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
EStop
|
2016-11-15 10:57:09 +00:00
|
|
|
An ``M112`` was sent to the printer through OctoPrint (not triggered when printing from SD!)
|
|
|
|
|
|
|
|
|
|
PositionUpdate
|
|
|
|
|
The response to an ``M114`` was received by OctoPrint. The payload contains the current position information
|
|
|
|
|
parsed from the response and (in the case of the selected tool ``t`` and the current feedrate ``f``) tracked
|
|
|
|
|
by OctoPrint.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``x``: x coordinate, parsed from response
|
|
|
|
|
* ``y``: y coordinate, parsed from response
|
|
|
|
|
* ``z``: z coordinate, parsed from response
|
|
|
|
|
* ``e``: e coordinate, parsed from response
|
|
|
|
|
* ``t``: last tool selected *through OctoPrint*
|
|
|
|
|
* ``f``: last feedrate for move commands ``G0``, ``G1`` or ``G28`` sent *through OctoPrint*
|
2014-08-31 13:17:32 +00:00
|
|
|
|
2017-01-23 12:56:00 +00:00
|
|
|
ToolChange
|
|
|
|
|
A tool change command was sent to the printer. The payload contains the former current tool index and the
|
|
|
|
|
new current tool index.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``old``: old tool index
|
|
|
|
|
* ``new``: new tool index
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
Timelapses
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
CaptureStart
|
2016-10-12 13:12:28 +00:00
|
|
|
A timelapse frame has started to be captured.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``file``: the name of the image file to be saved
|
|
|
|
|
|
|
|
|
|
CaptureDone
|
2016-10-12 13:12:28 +00:00
|
|
|
A timelapse frame has completed being captured.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``file``: the name of the image file that was saved
|
|
|
|
|
|
2016-10-12 13:12:28 +00:00
|
|
|
CaptureFailed
|
|
|
|
|
A timelapse frame could not be captured.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
* ``file``: the name of the image file that should have been saved
|
|
|
|
|
* ``error``: the error that was caught
|
|
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
MovieRendering
|
|
|
|
|
The timelapse movie has started rendering.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``gcode``: the GCODE file for which the timelapse would have been created (only the filename without the path)
|
|
|
|
|
* ``movie``: the movie file that is being created (full path)
|
|
|
|
|
* ``movie_basename``: the movie file that is being created (only the file name without the path)
|
|
|
|
|
|
|
|
|
|
MovieDone
|
|
|
|
|
The timelapse movie is completed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``gcode``: the GCODE file for which the timelapse would have been created (only the filename without the path)
|
|
|
|
|
* ``movie``: the movie file that has been created (full path)
|
|
|
|
|
* ``movie_basename``: the movie file that has been created (only the file name without the path)
|
|
|
|
|
|
|
|
|
|
MovieFailed
|
|
|
|
|
There was an error while rendering the timelapse movie.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``gcode``: the GCODE file for which the timelapse would have been created (only the filename without the path)
|
|
|
|
|
* ``movie``: the movie file that would have been created (full path)
|
|
|
|
|
* ``movie_basename``: the movie file that would have been created (only the file name without the path)
|
|
|
|
|
* ``returncode``: the return code of ``ffmpeg`` that indicates the error that occurred
|
2016-10-12 13:12:28 +00:00
|
|
|
* ``reason``: additional machine processable reason string - can be ``returncode`` if ffmpeg
|
|
|
|
|
returned a non-0 return code, ``no_frames`` if no frames were captured that could be rendered
|
|
|
|
|
to a timelapse, or ``unknown`` for any other reason of failure to render.
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
Slicing
|
|
|
|
|
-------
|
|
|
|
|
|
|
|
|
|
SlicingStarted
|
|
|
|
|
The slicing of a file has started.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``stl``: the STL's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``stl_location``: the STL's location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``gcode``: the sliced GCODE's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``gcode_location``: the sliced GCODE's location
|
2014-10-29 11:16:49 +00:00
|
|
|
* ``progressAvailable``: true if progress information via the ``slicingProgress`` push update will be available, false if not
|
2014-08-31 13:17:32 +00:00
|
|
|
|
|
|
|
|
SlicingDone
|
|
|
|
|
The slicing of a file has completed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``stl``: the STL's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``stl_location``: the STL's location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``gcode``: the sliced GCODE's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``gcode_location``: the sliced GCODE's location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``time``: the time needed for slicing, in seconds (float)
|
|
|
|
|
|
2014-10-20 11:40:04 +00:00
|
|
|
SlicingCancelled
|
|
|
|
|
The slicing of a file has been cancelled. This will happen if a second slicing job
|
|
|
|
|
targeting the same GCODE file has been started by the user.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``stl``: the STL's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``stl_location``: the STL's location
|
2014-10-20 11:40:04 +00:00
|
|
|
* ``gcode``: the sliced GCODE's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``gcode_location``: the sliced GCODE's location
|
2014-10-20 11:40:04 +00:00
|
|
|
|
2014-08-31 13:17:32 +00:00
|
|
|
SlicingFailed
|
|
|
|
|
The slicing of a file has failed.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``stl``: the STL's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``stl_location``: the STL's location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``gcode``: the sliced GCODE's filename
|
2016-06-28 10:58:31 +00:00
|
|
|
* ``gcode_location``: the sliced GCODE's location
|
2014-08-31 13:17:32 +00:00
|
|
|
* ``reason``: the reason for the slicing having failed
|
2014-11-17 10:06:54 +00:00
|
|
|
|
2016-06-06 16:12:32 +00:00
|
|
|
SlicingProfileAdded
|
|
|
|
|
A new slicing profile was added.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``slicer``: the slicer for which the profile was added
|
|
|
|
|
* ``profile``: the profile that was added
|
|
|
|
|
|
|
|
|
|
SlicingProfileModified
|
|
|
|
|
A new slicing profile was modified.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``slicer``: the slicer for which the profile was modified
|
|
|
|
|
* ``profile``: the profile that was modified
|
|
|
|
|
|
|
|
|
|
SlicingProfileDeleted
|
|
|
|
|
A slicing profile was deleted.
|
|
|
|
|
|
|
|
|
|
Payload:
|
|
|
|
|
|
|
|
|
|
* ``slicer``: the slicer for which the profile was deleted
|
|
|
|
|
* ``profile``: the profile that was deleted
|
|
|
|
|
|
2014-11-17 10:06:54 +00:00
|
|
|
Settings
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
SettingsUpdated
|
|
|
|
|
The internal settings were updated.
|