Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: what are the possibile values of printer state? #949 #950

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions docs/web_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,19 @@ The full JSON-RPC response.
}
```

##### State

State will be one of the following values:

- **"ready"**: Klippy is connected, and ready for action.
You may proceed to request status of printer objects make
subscriptions, get the file list, etc.
- **"error"**: Klippy has experienced an error.
- **"shutdown"**: Klippy is in a shutdown state.
- **"startup"**: Klippy is currently starting up. You can
re-request `/server/info` or `/printer/info` in 2 seconds.


!!! Note
This request will never return an HTTP error. When an error is
encountered a JSON-RPC error response will be returned.
Expand Down Expand Up @@ -8278,16 +8291,10 @@ the websocket:
is not authorized or Moonraker is not running. Direct the user to
SSH into the machine and check `/tmp/moonraker.log`.
- If the response returns success, check the result's `klippy_state`
field:
- `klippy_state == "ready"`: you may proceed to request status of
printer objects make subscriptions, get the file list, etc.
- `klippy_state == "error"`: Klippy has experienced an error
starting up
- `klippy_state == "shutdown"`: Klippy is in a shutdown state.
- `klippy_state == "startup"`: re-request `/server/info` in 2 seconds.
- If `error` or `shutdown` is detected it might be wise to prompt
the user. You can get a description from the `state_message`
field of a `/printer/info` request.
field.
- If `error` or `shutdown` is detected it might be wise to prompt
the user. You can get a description from the `state_message`
field of a `/printer/info` request.
3. Repeat step 2 until Klipper reports ready.
4. Clients should watch for the `notify_klippy_disconnected` event. If
received then Klippy has either been stopped or restarted. In this
Expand Down
Loading