From c631bff0c916e50f3d91d9a60345274744885db4 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Fri, 8 Oct 2021 12:36:20 -0400 Subject: [PATCH] docs: Document MQTT support for printer objects Signed-off-by: Eric Callahan --- docs/configuration.md | 17 +++++++++++++++++ docs/web_api.md | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index b9f6c5c..abe7f74 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -559,6 +559,23 @@ instance_name: # Responses will be published to the following topic: # my_printer/moonraker/api/response # The default is the machine's hostname. +status_objects: +# A newline separated list of Klipper objects whose state will be +# published in the payload of the following topic: +# {instance_name}/klipper/status +# For example, to track the "webhooks" and "toolhead" objects this +# option would be set as follows: +# status_objects: +# webhooks +# toolhead +# See the "Printer Objects" section of the documentation for an +# overview of the most common objects available. Note that Klipper +# will only push an update to an object/field if the field has changed. +# An object with no fields that have changed will not be part of the +# payload. Object state is checked and published roughly every +# 250 ms. +# If not configured then no objects will be tracked and published to +# the status topic. default_qos: 0 # The default QOS level used when publishing or subscribing to topics. # Must be an integer value from 0 to 2. The default is 0. diff --git a/docs/web_api.md b/docs/web_api.md index 537b111..8e708d2 100644 --- a/docs/web_api.md +++ b/docs/web_api.md @@ -321,8 +321,9 @@ POST /printer/objects/subscribe?connection_id=123456789&gcode_move&extruder` request that includes only the `connection_id` argument will cancel the subscription on the specified websocket. - This request is not available over MQTT, as it is not possible to - associate a connected websocket with an MQTT client. + This request is not available over MQTT as it can not be set per client. + Instead MQTT can publish printer status by setting the `status_objects` + option in the `[mqtt]` section. JSON-RPC request: ```json