From fe84226908d6fc49aed049a42e6c01971552a869 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 18 Apr 2022 19:22:09 -0400 Subject: [PATCH] klippy_connection: log klippy version as received Signed-off-by: Eric Callahan --- moonraker/klippy_connection.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/moonraker/klippy_connection.py b/moonraker/klippy_connection.py index 774a680..c54da86 100644 --- a/moonraker/klippy_connection.py +++ b/moonraker/klippy_connection.py @@ -56,6 +56,7 @@ class KlippyConnection: self.closing: bool = False self._klippy_info: Dict[str, Any] = {} self.init_list: List[str] = [] + self._klipper_version: str = "" self._missing_reqs: Set[str] = set() self._peer_cred: Dict[str, int] = {} self.init_attempts: int = 0 @@ -319,6 +320,11 @@ class KlippyConnection: f"Klippy may have experienced an error during startup.\n" f"Please check klippy.log for more information") return + version = result.get("software_version", "") + if version != self._klipper_version: + self._klipper_version = version + msg = f"Klipper Version: {version}" + self.server.add_log_rollover_item("klipper_version", msg) self._klippy_info = dict(result) self._state = result.get('state', "unknown") if send_id: