|
@@ -918,6 +918,12 @@ class BambuMQTTClient:
|
|
|
logger.debug("[%s] Received command response: %s", self.serial_number, cmd)
|
|
logger.debug("[%s] Received command response: %s", self.serial_number, cmd)
|
|
|
if cmd in ("extrusion_cali_sel", "extrusion_cali_set", "extrusion_cali_del", "ams_filament_setting"):
|
|
if cmd in ("extrusion_cali_sel", "extrusion_cali_set", "extrusion_cali_del", "ams_filament_setting"):
|
|
|
logger.debug("[%s] %s response: %s", self.serial_number, cmd, print_data)
|
|
logger.debug("[%s] %s response: %s", self.serial_number, cmd, print_data)
|
|
|
|
|
+ # AMS drying responses are rare (user-initiated only) and the
|
|
|
|
|
+ # full payload — including `result` and any `reason` code —
|
|
|
|
|
+ # is the only way to diagnose silent rejections like #1447.
|
|
|
|
|
+ # INFO level so the body lands in support bundles by default.
|
|
|
|
|
+ elif cmd == "ams_filament_drying":
|
|
|
|
|
+ logger.info("[%s] ams_filament_drying response: %s", self.serial_number, print_data)
|
|
|
# Check for developer mode probe response
|
|
# Check for developer mode probe response
|
|
|
if (
|
|
if (
|
|
|
cmd == "ams_filament_setting"
|
|
cmd == "ams_filament_setting"
|
|
@@ -3703,14 +3709,17 @@ class BambuMQTTClient:
|
|
|
"close_power_conflict": False,
|
|
"close_power_conflict": False,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- self._client.publish(self.topic_publish, json.dumps(command), qos=1)
|
|
|
|
|
|
|
+ # Log the full wire JSON at INFO so support bundles capture exactly
|
|
|
|
|
+ # what we sent — needed to diagnose silent rejections (#1447) where
|
|
|
|
|
+ # the printer ACKs the command but never starts/stops drying.
|
|
|
|
|
+ # Paired with the ams_filament_drying response-payload INFO log so
|
|
|
|
|
+ # both halves of the conversation land in the bundle by default.
|
|
|
|
|
+ wire_json = json.dumps(command)
|
|
|
|
|
+ self._client.publish(self.topic_publish, wire_json, qos=1)
|
|
|
logger.info(
|
|
logger.info(
|
|
|
- "[%s] Sent drying command: ams_id=%d, temp=%d, duration=%d, mode=%d",
|
|
|
|
|
|
|
+ "[%s] Sent ams_filament_drying: %s",
|
|
|
self.serial_number,
|
|
self.serial_number,
|
|
|
- ams_id,
|
|
|
|
|
- temp,
|
|
|
|
|
- duration,
|
|
|
|
|
- mode,
|
|
|
|
|
|
|
+ wire_json,
|
|
|
)
|
|
)
|
|
|
return True
|
|
return True
|
|
|
|
|
|