docs: prepare documentation for readthedocs

This commit adds mkdocs.yml and modifies the existing markdown documentation so that  "readthedocs" can build documentation using "mkdocs".

Included are many formatting changes and fixes to the existing documentation so that it shows up correctly when published.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-03-16 06:34:17 -04:00
parent 7e230c1c77
commit dc60143ef8
9 changed files with 2527 additions and 1717 deletions

View File

@ -1,3 +1,4 @@
##
This document keeps a record of all changes to Moonraker's web APIs.
### March 15th 2021

View File

@ -1,29 +1,17 @@
#
This document describes Moonraker's full configuration. As this file
references configuration for both Klipper (printer.cfg) and Moonraker
(moonraker.conf), each example contains a commment indicating which
configuration file is being refrenenced.
references configuration for both Klipper (`printer.cfg`) and Moonraker
(`moonraker.conf`), each example contains a commment indicating which
configuration file is being refrenenced. A basic
[sample configuration](./moonraker.conf) in the `docs` directory.
# Primary Configuration
The sections outlined here are required for Moonraker to function. A
minimal functional configuration might look like the following:
```
# moonraker.conf
## `[server]`
[server]
host: 0.0.0.0
port: 7125
enable_debug_logging: True
config_path: ~/.klippy_config
The `[server]` section provides essential configuration for Moonraker
and its core components. This section is requrired.
[authorization]
enabled: True
trusted_clients:
192.168.1.0/24
```
```ini
## server
```
# moonraker.conf
[server]
@ -61,9 +49,12 @@ temperature_store_size: 1200
gcode_store_size: 1000
# The maximum number "gcode lines" to store. The default is 1000.
```
## authorization
## `[authorization]`
```
The `[authorization]` section provides configuration for Moonraker's
authorization module. This section is required.
```ini
# moonraker.conf
[authorization]
@ -103,38 +94,33 @@ cors_domains:
# well. If this option is not specified then CORS is disabled.
```
# Plugin Configuration
The sections outlined here are optional and enable additional
functionality in moonraker.
## Octoprint compatibility
## `[octoprint_compat]`
Enables partial support of Octoprint API is implemented with the purpose of
allowing uploading of sliced prints to a moonraker instance.
Currently we support Slic3r derivatives and Cura with Cura-Octoprint.
```
```ini
# moonraker.conf
[octoprint_compat]
```
## History
Enables moonraker to track and store print history. To enable this plugin, add
the configuration below.
## `[history]`
Enables print history tracking.
```
```ini
# moonraker.conf
[history]
```
## paneldue
## `[paneldue]`
Enables PanelDue display support. The PanelDue should be connected to the
host machine, either via the machine's UART GPIOs or through a USB-TTL
converter. Currently PanelDue Firmware Version 1.24 is supported. Other
releases may not behave correctly.
```
```ini
# moonraker.conf
[paneldue]
@ -168,7 +154,7 @@ to specify commands (either built in or gcode_macros) that will show up
in the PanelDue's "macro" menu.
Note that buzzing the piezo requires the following gcode_macro in `printer.cfg`:
```
```ini
# printer.cfg
[gcode_macro PANELDUE_BEEP]
@ -182,11 +168,11 @@ gcode:
duration=DURATION|float)}
```
## power
## `[power]`
Enables device power control. Currently GPIO (relays), TPLink Smartplug,
and Tasmota (via http) devices are supported.
```
```ini
# moonraker.conf
[power device_name]
@ -265,7 +251,7 @@ password:
```
Below are some potential examples:
```
```ini
# moonraker.conf
[power printer]
@ -302,7 +288,7 @@ password: password2
It is possible to toggle device power from the Klippy host, this can be done
with a gcode_macro, such as:
```
```ini
# printer.cfg
[gcode_macro POWER_OFF_PRINTER]
@ -314,7 +300,7 @@ gcode:
The `POWER_OFF_PRINTER` gcode can be run to turn off the "printer" device.
This could be used in conjunction with Klipper's idle timeout to turn the
printer off when idle with a configuration similar to that of below:
```
```ini
# printer.cfg
[delayed_gcode delayed_printer_off]
@ -331,12 +317,12 @@ gcode:
UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60
```
## update_manager
## `[update_manager]`
This enables moonraker's update manager. Note that updates can only be
performed on pristine git repos. Repos that have been modified on
disk or cloned from unofficial sources are not supported.
```
```ini
# moonraker.conf
[update_manager]
@ -367,7 +353,7 @@ There are two types of update manager clients and each will be detailed
separately. The first one is targeted towards releases that do not need a
service restart such as Fluidd/Mainsail.
```
```ini
# moonraker.conf
[update_manager client client_name]
@ -387,7 +373,7 @@ persistent_files:
This second example is for git repositories that have a service that need
updating.
```
```ini
# moonraker.conf
# service_name must be the name of the systemd service

View File

@ -8,24 +8,64 @@ are near those of Klipper:
- All source files should begin with a copyright notice in the following
format:
```
# Module name and brief description of module
#
# Copyright (C) 2020 YOUR NAME <YOUR EMAIL ADDRESS>
#
# This file may be distributed under the terms of the GNU GPLv3 license
```
# Module name and brief description of module
#
# Copyright (C) 2021 YOUR NAME <YOUR EMAIL ADDRESS>
#
# This file may be distributed under the terms of the GNU GPLv3 license
- No line in the source code or documentation should exceed 80 characters.
Be sure there is no trailing whitespace.
- Each Commit message should be in the following format:
```
module name: brief description of commit
More detailed explanation if necessary.
module name: brief description of commit
More detailed explanation if necessary.
Signed-off-by: Your Name <your email address>
Signed-off-by: Your Name <your email address>
```
- By signing off on commits, you acknowledge that you agree to the
[developer certificate of origin](developer-certificate-of-origin).
As with Klipper, this must contain your real name and a current
[developer certificate of origin](../developer-certificate-of-origin)
shown below. Your signature must contain your real name and a current
email address.
```text
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

13
docs/index.md Normal file
View File

@ -0,0 +1,13 @@
# Welcome to Moonraker Documentation
Users should refer to the [Installation](installation.md) and
[Configuration](configuration.md) sections for documentation on how
to install and configure Moonraker.
Client developers may refer to the [Client API](web_api.md)
documentation.
Internal API documentation for back-end contributors is forthcoming.
In the meantime developers should refer to the
[contibuting](contributing.md) section for basic contribution
guidelines prior to creating a pull request.

View File

@ -6,14 +6,39 @@ may work, however they may need a custom install script. Moonraker
requires Python 3.7 or greater, verify that your distribution's
Python 3 packages meet this requirement.
Klipper should be installed prior to installing Moonraker. Please see
[Klipper's Documention](https://github.com/KevinOConnor/klipper/blob/master/docs/Installation.md)
for instructions on how to do this. After installation you should make
sure that the [prerequistes](#prerequisites-klipper-configuration) are configured.
### Installing Klipper
After Klipper is installed, you need to modify its "default" file. This file
contains klipper's command line arguments, and you must add an argument that
instructs Klippy to create a Unix Domain socket:
Klipper should be installed prior to installing Moonraker. Please see
[Klipper's Documention](https://klipper3d.com/Overview.html) for details.
After installing Klipper you should make sure to add Moonraker's
[configuration requirements](#klipper-configuration-requirements).
### Klipper Configuration Requirements
Moonraker depends on the following Klippy extras for full functionality:
- `[virtual_sdcard]`
- `[pause_resume]`
- `[display_status]`
If you have a `[filament_switch_sensor]` configured then `[pause_resume]` will
automatically be loaded. Likewise, if you have a `[display]` configured then
`[display_status]` will be automatically loaded. If your configuration is
missing one or both, you can simply add the bare sections to `printer.cfg`:
```ini
[pause_resume]
[display_status]
[virtual_sdcard]
path: ~/gcode_files
```
### Enabling the Unix Socket
After Klipper is installed it may be necessary to modify its `defaults` file in
order to enable the Unix Domain Socket. Begin by opening the file in your
editor of choice, for example:
```
sudo nano /etc/default/klipper
```
@ -28,7 +53,7 @@ KLIPPY_EXEC=/home/pi/klippy-env/bin/python
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log"
```
You need to add `-a /tmp/klippy_uds` to KLIPPY_ARGS:
Add `-a /tmp/klippy_uds` to KLIPPY_ARGS:
```
# Configuration for /etc/init.d/klipper
@ -38,11 +63,16 @@ KLIPPY_EXEC=/home/pi/klippy-env/bin/python
KLIPPY_ARGS="/home/pi/klipper/klippy/klippy.py /home/pi/printer.cfg -l /tmp/klippy.log -a /tmp/klippy_uds"
```
**Note: Your installation of Klipper may use systemd instead of
the default LSB script. In this case, you need to modify the
klipper.service file.**
You may also want to take this opportunity to change the location of
printer.cfg to match Moonraker's "config_path" option (see the
printer.cfg to match Moonraker's `config_path` option (see the
[configuration document](configuration.md#primary-configuration)
for more information on the config_path). For example, if the `config_path`
option is set to `~/printer_config`, your klipper defaults file might look
is set to `~/printer_config`, your klipper defaults file might look
like the following:
```
# Configuration for /etc/init.d/klipper
@ -61,17 +91,19 @@ mkdir printer_config
mv printer.cfg printer_config
```
You can now install the Moonraker application:
### Installing Moonraker
Begin by cloning the git respository:
```
cd ~
git clone https://github.com/Arksine/moonraker.git
```
Prior to installation it is a good idea to create
[moonraker.conf](configuration.md). If you are using the `config_path`,
create it in the specified directory otherwise create it in the HOME
directory. A sample `moonraker.conf` may be found in the `docs` folder
of this repo.
Now is a good time to create [moonraker.conf](configuration.md). If you are
using the `config_path`, create it in the specified directory otherwise create
it in the HOME directory. The [sample moonraker.conf](./moonraker.conf) in
the `docs` directory may be used as a starting point.
For a default installation run the following commands:
```
@ -87,28 +119,32 @@ cd ~/moonraker/scripts
The install script has a few command line options that may be useful,
particularly for those upgrading:
- -r\
This will rebuild the virtual environment for existing installations.
- `-r`:
Rebuilds the virtual environment for existing installations.
Sometimes this is necessary when a dependency has been added.
- -f\
This will tell the script to overwrite Moonraker's "defaults" file.
By default the script will not modify the "defaults" file if it is
detected as present.
- -c /path/to/moonraker.conf\
This allows the user to specify the path to Moonraker's config file.
The default location is `/home/<user>/moonraker.conf`.
- `-f`:
Force an overwrite of Moonraker's systemd script. By default the
the systemd script will not be modified if it exists.
- `-c /home/pi/moonraker.conf`:
Specifies the path to Moonraker's config file. The default location
is `/home/<user>/moonraker.conf`. When using this option to modify
an existing installation it is necessary to add `-f` as well.
When the script completes it should start both Moonraker and Klipper. In
`klippy.log` you should find the following entry:\
`webhooks client <uid>: Client info {'program': 'Moonraker', 'version': '<version>'}`\
`/tmp/klippy.log` you should find the following entry:
`webhooks client <uid>: Client info {'program': 'Moonraker', 'version': '<version>'}`
Now you may install a client, such as
[Mainsail](https://github.com/meteyou/mainsail) or
[Fluidd](https://github.com/cadriel/fluidd)
## Command line Usage
The configuration and log file paths may be specified via the command
line.
### Command line usage
This section is intended for users that need to write their own
installation script. Detailed are the command line arguments
available to Moonraker:
```
usage: moonraker.py [-h] [-c <configfile>] [-l <logfile>] [-n]
@ -129,7 +165,7 @@ The default configuration is:
- logging to a file is enabled
If one needs to start moonraker without generating a log file, the
'-n' option may be used, for example:
`-n` option may be used, for example:
```
~/moonraker-env/bin/python ~/moonraker/moonraker/moonraker.py -n -c /path/to/moonraker.conf
```
@ -141,28 +177,11 @@ These options may be changed by editing
`/etc/systemd/system/moonraker.service`. The `install-moonraker.sh` script
may also be used to modify the config file location.
## Prerequisites (Klipper Configuration)
### Additional Notes
Moonraker depends on the following Klippy extras for full functionality:
- [virtual_sdcard]
- [pause_resume]
- [display_status]
If you have a `filament_switch_sensor` configured then `pause_resume` will
automatically be loaded. Likewise, if you have a `display` configured then
`display_status` will be automatically loaded. If your configuration is
missing one or both, you can simply add the bare sections to printer.cfg:
```
[pause_resume]
[display_status]
[virtual_sdcard]
path: ~/gcode_files
```
NOTES:
- Make sure that Moonraker (and Klipper) has read and write access to the
directory set in the `path` option for the `virtual_sdcard`.
- Make sure that Moonraker and Klipper both have read and write access to the
directory set in the `path` option for the `[virtual_sdcard]` in
`printer.cfg`.
- Upon first starting Moonraker is not aware of the gcode file path, thus
it cannot serve gcode files, add directories, etc. After Klippy enters
the "ready" state it sends Moonraker the gcode file path.

View File

@ -1,3 +1,4 @@
#
As mentioned in the API documentation, it is possible to
[query](web_api.md#query-printer-object-status) or
[subscribe](web_api.md#subscribe-to-printer-object-status)
@ -17,31 +18,32 @@ that reports state which can be queried.
## webhooks
```json
{
state: "startup",
state_message: "message"
"state": "startup",
"state_message": "message"
}
```
The `webhooks` object contains the current printer state and the current
state message. These fields match those returned via the `/printer/info`
endpoint. This is provided as a convience, clients may subscribe to `webhooks`
so they are asynchonously notified of a change to printer state. The `state`
may be "startup", "ready", "shutdown", or "error". The `state_message`
may be `startup`, `ready`, `shutdown`, or `error`. The `state_message`
contains a message specific to the current printers state.
## gcode_move
```json
{
speed_factor: 1.0,
speed: 100.0,
extrude_factor: 1.0,
absolute_coordinates: true,
absolute_extrude: false,
homing_origin: [0.0, 0.0, 0.0, 0.0],
position: [0.0, 0.0, 0.0, 0.0],
gcode_position: [0.0, 0.0, 0.0, 0.0]
"speed_factor": 1.0,
"speed": 100.0,
"extrude_factor": 1.0,
"absolute_coordinates": true,
"absolute_extrude": false,
"homing_origin": [0.0, 0.0, 0.0, 0.0],
"position": [0.0, 0.0, 0.0, 0.0],
"gcode_position": [0.0, 0.0, 0.0, 0.0]
}
```
The `gcode_move` object reports the current gcode state:
- `speed_factor`: AKA "feedrate", this is the current speed multiplier
- `speed`: The current gcode speed in mm/s.
- `extrude_factor`: AKA "extrusion multiplier".
@ -59,24 +61,25 @@ The `gcode_move` object reports the current gcode state:
the most recent "G1" or "G0" processed assuming the machine is
using absolute coordinates.
Note: The printer's actual movement may lag behind the reported positional
Note: The printer's actual movement will lag behind the reported positional
coordinates due to lookahead.
## toolhead
```json
{
homed_axes: "xyz",
print_time: 0.0,
estimated_print_time: 0.0,
extruder: "extruder",
position: [0.0, 0.0, 0.0, 0.0],
max_velocity: 500.0,
max_accel: 3000.0,
max_accel_to_decel: 1500.0,
square_corner_velocity: 5.0
"homed_axes": "xyz",
"print_time": 0.0,
"estimated_print_time": 0.0,
"extruder": "extruder",
"position": [0.0, 0.0, 0.0, 0.0],
"max_velocity": 500.0,
"max_accel": 3000.0,
"max_accel_to_decel": 1500.0,
"square_corner_velocity": 5.0
}
```
The `toolhead` object reports state of the current tool:
- `homed_axes`: a string containing the axes that are homed. If no axes
are homed, returns a null string.
- `print_time`: internal value, not generally useful for clients
@ -102,16 +105,21 @@ Note: `max_velocity`, `max_accel`, `max_accel_to_decel`, and
## configfile
```json
{
config: {},
save_config_pending: false
"config": {},
"settings": {},
"save_config_pending": false
}
```
The `configfile` object reports printer configuration state:
- `config`: This is an object containing the configuration as read from
printer.cfg. Each config section will be an object containing the
configured options. Option values will ALWAYS be reported as
configured options. Values will ALWAYS be reported as
strings. Note that default values are not reported, only options
configured in printer.cfg are present.
- `settings`: Similar to `config`, however this object includes default
values that may not have been included in `printer.cfg`. It is possible
for a value to be a string, integer, boolean, or float.
- `save_config_pending`: True if the printer has taken an action which
has updated the internal configuration (ie: PID calibration, probe
calibration, bed mesh calibration). This allows clients to present
@ -119,75 +127,90 @@ The `configfile` object reports printer configuration state:
save the configuration to printer.cfg and restart the Klippy Host.
## extruder
*Enabled when [extruder] is included in printer.cfg*
*Enabled when `[extruder]` is included in printer.cfg*
Note: If multiple extruders are configured, extruder 0 is available as
`extruder`, extruder 1 as `extruder1` and so on.
```json
{
temperature: 0.0,
target: 0.0
pressure_advance: 0.0,
smooth_time: 0.0
"temperature": 0.0,
"target": 0.0,
"power": 0.0,
"pressure_advance": 0.0,
"smooth_time": 0.0
}
```
The `extruder` object reports state of an extruder:
- `temperature`: The extruder's current temperature (in C).
- `target`: The extruder's target temperature (in C).
- `power`: The current pwm value applied to the heater. This value is
expressed as a percentage from 0.0 to 1.0.
- `pressure_advance`: The extruder's current pressure advance value.
- `smooth_time`: The currently set time range to use when calculating the
average extruder velocity for pressure advance.
## heater_bed
*Enabled when [heater_bed] is included in printer.cfg*
*Enabled when `[heater_bed]` is included in printer.cfg*
```json
{
temperature: 0.0,
target: 0.0
"temperature": 0.0,
"target": 0.0,
"power": 0.0,
}
```
The `heater_bed` object reports state of the heated bed:
- `temperature`: The bed's current temperature
- `target`: The bed's target temperature
- `power`: The current pwm value applied to the heater. This value is
expressed as a percentage from 0.0 to 1.0.
## fan
*Enabled when [fan] is included in printer.cfg*
*Enabled when `[fan]` is included in printer.cfg*
```json
{
speed: 0.0
"speed": 0.0,
"rpm": 4000
}
```
The `fan` object returns state of the part cooling fan:
- `speed`: The current fan speed. This is reported as a
percentage of maximum speed in the range of 0.0 - 1.0.
- `rpm`: The fan's revolutions per minute if the tachometer
pin has been configured. Will report `null` if no tach
has been configured.
## idle_timeout
```json
{
state: "Idle",
printing_time: 0.0
"state": "Idle",
"printing_time": 0.0
}
```
The `idle_timeout` object reports the idle state of the printer:
- `state`: Can be "Idle", "Ready", or "Printing". The printer will
transition to the "Printing" state whenever a gcode is issued that
- `state`: Can be `Idle`, `Ready`, or `Printing`. The printer will
transition to the `Printing` state whenever a gcode is issued that
commands the tool, this includes manual commands. Thus this should
not be used to determine if a gcode file print is in progress. It can
however be used to determine if the printer is busy.
- `printing_time`: The amount of time the printer has been in the
"Printing" state. This is reset to 0 whenever the printer transitions
from "Printing" to "Ready".
`Printing` state. This is reset to 0 whenever the printer transitions
from `Printing` to `Ready`.
## virtual_sdcard
*Enabled when [virtual_sdcard] is included in printer.cfg*
*Enabled when `[virtual_sdcard]` is included in printer.cfg*
```json
{
progress: 0.0,
is_active: false,
file_position: 0
"progress": 0.0,
"is_active": false,
"file_position": 0
}
```
The `virtual_sdcard` object reports the state of the virtual sdcard:
- `progress`: The print progress reported as a percentage of the file
read, in the range of 0.0 - 1.0.
- `is_active`: Returns true if the virtual sdcard is currently processing
@ -196,23 +219,24 @@ The `virtual_sdcard` object reports the state of the virtual sdcard:
- `file_position`: The current file position in bytes. This will always
be an integer value
Note: `progress` and `file_position` will persist after a print has
**Note: `progress` and `file_position` will persist after a print has
paused, completed, or errored. They are cleared when the user issues
a SDCARD_RESET_FILE gcode or when a new print has started.
a SDCARD_RESET_FILE gcode or when a new print has started.**
## print_stats
*Enabled when [virtual_sdcard] is included in printer.cfg*
*Enabled when `[virtual_sdcard]` is included in printer.cfg*
```json
{
filename: "",
total_duration: 0.0,
print_duration: 0.0,
filament_used: 0.0,
state: "standby",
message: ""
"filename": "",
"total_duration": 0.0,
"print_duration": 0.0,
"filament_used": 0.0,
"state": "standby",
"message": ""
}
```
The `print_stats` object reports "virtual_sdcard" print state:
The `print_stats` object reports `virtual_sdcard` print state:
- `filename`: The name of the current file loaded. This will be a null
string if no file is loaded. Note that name is a path relative to the
gcode folder, thus if the file is located in a subdirectory it would
@ -228,52 +252,55 @@ The `print_stats` object reports "virtual_sdcard" print state:
- `message`: If an error is detected, this field contains the error
message generated. Otherwise it will be a null string.
Note: After a print has started all of the values above will persist until
the user issues a SDCARD_RESET_FILE gcode or when a new print has started.
**Note: After a print has started all of the values above will persist until
the user issues a SDCARD_RESET_FILE gcode or when a new print has started.**
## display_status
*Enabled when [display] or [display_status] is included in printer.cfg*
*Enabled when `[display]` or `[display_status]` is included in printer.cfg*
```json
{
message: "",
progress: 0.0
"message": "",
"progress": 0.0
}
```
The `display_status` object contains state typically used to update displays:
- `message`: The message set by a M117 gcode. If no message is set this will
be a null string.
- `progress`: The percentage of print progress, as reported by M73. This
will be in the range of 0.0 - 1.0. If no M73 has been issued this value
will fallback to the eqivalent of `virtual_sdcard.progess`. Note that
will fallback to the eqivalent of `virtual_sdcard.progress`. Note that
progress updated via M73 has a timeout. If no M73 is received after 5
seconds, `progress` will be set to the fallback value.
## temperature_sensor sensor_name
*Enabled when [temperature_sensor sensor_name] is included in printer.cfg. It is*
*possible for multiple temperature sensors to be configured.*
*Enabled when `[temperature_sensor sensor_name]` is included in printer.cfg.
It is possible for multiple temperature sensors to be configured.*
```json
{
temperature: 0.0,
measured_min_temp: 0.0,
measured_max_temp: 0.0
"temperature": 0.0,
"measured_min_temp": 0.0,
"measured_max_temp": 0.0
}
```
A `temperature_sensor` reports the following state:
- `temperature`: Sensor's current reported temperature
- `measured_min_temp`: The mimimum temperature read from the sensor
- `measured_max_temp`: The maximum temperature read from the sensor
## temperature_fan fan_name
*Enabled when [temperature_fan fan_name] is included in printer.cfg. It is*
*possible for multiple temperature fans to be configured.*
*Enabled when `[temperature_fan fan_name]` is included in printer.cfg. It is
possible for multiple temperature fans to be configured.*
```json
{
speed: 0.0,
temperature: 0.0,
target: 0.0
"speed": 0.0,
"temperature": 0.0,
"target": 0.0
}
```
A `temperature_fan` reports the following state:
- `speed`: Current fan speed as a percentage of maximum speed, reported
in the range of 0.0 - 1.0
- `temperature`: Currently reported temperature of the sensor associated
@ -281,48 +308,51 @@ A `temperature_fan` reports the following state:
- `target`: The current target temperature for the `temperature_fan`.
## filament_switch_sensor sensor_name
*Enabled when [filament_switch_sensor sensor_name] is included in printer.cfg.*
*It is possible for multiple filament sensors to be configured.*
*Enabled when `[filament_switch_sensor sensor_name]` is included in
printer.cfg. It is possible for multiple filament sensors to be configured.*
```json
{
filament_detected: false,
enabled: true
"filament_detected": false,
"enabled": true
}
```
A `filament_switch_sensor` reports the following state:
- `filament_detected`: Set to true if the switch detects filament, otherwise
false
- `enabled`: Set to true if the sensor is currently enabled, otherwise false
## output_pin pin_name
*Enabled when [output_pin pin_name] is included in printer.cfg.*
*It is possible for multiple output pins to be configured.*
*Enabled when `[output_pin pin_name]` is included in printer.cfg.
It is possible for multiple output pins to be configured.*
```json
{
value: 0.0
"value": 0.0
}
```
An `output_pin` reports the following state:
- `value`: The currently set value of the pin, in the range of 0.0 - 1.0.
A digital pin will always be 0 or 1, whereas a pwm pin may report a value
across the entire range.
## bed_mesh
*Enabled when [bed_mesh] is included in printer.cfg.*
*Enabled when `[bed_mesh]` is included in printer.cfg.*
```json
{
profile_name: "",
mesh_min: [0.0, 0.0],
mesh_max: [0.0, 0.0],
probed_matrix: [[]],
mesh_matrix: [[]]
"profile_name": "",
"mesh_min": [0.0, 0.0],
"mesh_max": [0.0, 0.0],
"probed_matrix": [[]],
"mesh_matrix": [[]]
}
```
The `bed_mesh` printer object reports the following state:
- `profile_name`: The name of the currently loaded profile. If no profile is
loaded then this will report a null string. If the user is not using bed_mesh
profile management then this will report "default" after mesh calibration
completes.
loaded then this will report a null string. If the user is not using
bed_mesh profile management then this will report `default` after mesh
calibration completes.
- `mesh_min`: [X, Y] - The minimum x and y coordinates of the mesh.
- `mesh_max`: [X, Y] - The maximum x and y coordinates of the mesh.
- `probed_matrix`: A 2 dimensional array representing the matrix of probed
@ -330,15 +360,15 @@ The `bed_mesh` printer object reports the following state:
- `mesh_matrix`: A 2 dimension array representing the interpolated mesh. If
no matrix has been generated the result is `[[]]`.
Note: See [web_api.md](web_api.md##bed-mesh-coordinates) for an example
of how to use this information to generate (X,Y,Z) coordinates.
**Note: See [web_api.md](web_api.md##bed-mesh-coordinates) for an example
of how to use this information to generate (X,Y,Z) coordinates.**
## gcode_macro macro_name
*Enabled when [gcode_macro macro_name] is included in printer.cfg.*
*It is possible for multiple gcode macros to be configured.*
*Enabled when `[gcode_macro macro_name]` is included in printer.cfg.
It is possible for multiple gcode macros to be configured.*
Gcode macros will report the state of configured "variables".
Gcode macros will report the state of configured `variables`.
While user defined macros likely won't report state that is useful
for a client, it is possible for client developers to recommend or
request a specific gcode_macro configuration, then have the client
take action based on the variables reported by the macro.
take action based on the variables reported by the macro.

View File

@ -1,3 +1,4 @@
##
This file will track changes that require user intervention,
such as a configuration change or a reinstallation.
@ -33,10 +34,10 @@ such as a configuration change or a reinstallation.
This changes requires the user to rerun the install script. If
`moonraker.conf` is not located in the home directory, the command
will looks something like the following:
```
cd ~/moonraker
./scripts/install-moonraker.sh -f -c /home/pi/klipper_config/moonraker.conf
```
cd ~/moonraker
./scripts/install-moonraker.sh -f -c /home/pi/klipper_config/moonraker.conf
Otherwise you can run the install script with no arguments.
### November 19th 2020
@ -49,24 +50,24 @@ such as a configuration change or a reinstallation.
will update the defaults file wih the new path.
- New dependencies have been added to Moonraker which require reinstallation.
Run the following command to reinstall and rebuild the virtualenv:
```
~/moonraker/scripts/install-moonraker.sh -r
```
~/moonraker/scripts/install-moonraker.sh -r
- The power plugin configuration has changed. See the
[install guide](installation.md#power-control-plugin) for
details on the new configuration.
- Users transitioning from the previous version of the power plugin will need
to unexport any curently used pins. For example, the following command
may be used to unexport pin 19:
```
echo 19 > /sys/class/gpio/unexport
```
echo 19 > /sys/class/gpio/unexport
Alternatively one may reboot the machine after upgrading:
```
cd ~/moonraker/
git pull
~/moonraker/scripts/install-moonraker.sh -r
sudo reboot
```
cd ~/moonraker/
git pull
~/moonraker/scripts/install-moonraker.sh -r
sudo reboot
Make sure that the power plugin configuration has been updated prior
to rebooting the machine.

File diff suppressed because it is too large Load Diff

19
mkdocs.yml Normal file
View File

@ -0,0 +1,19 @@
site_name: Moonraker
repo_url: https://github.com/Arksine/moonraker
nav:
- 'User Documentation':
- Installation: installation.md
- Configuration : configuration.md
- User Changes: user_changes.md
- 'Client Developers':
- Client API: web_api.md
- Printer Objects: printer_objects.md
- API Changes: api_changes.md
- 'Backend Developers':
- Contributing: contributing.md
theme:
name: readthedocs
plugins:
- search
markdown_extensions:
- codehilite