mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
Some printer MQTT brokers (e.g. P1S) reject subscriptions to the request topic by killing the TCP connection, causing a disconnect loop. The request topic subscription for ams_mapping capture is now fail-safe with two detection paths: - SUBACK rejection: on_subscribe callback detects failure code 0x80 - Broker kills connection: on_disconnect detects disconnect within 10s of unconfirmed subscription attempt After detection, the request topic is disabled for that printer and reconnection succeeds with only the report topic. Printers that support the request topic (e.g. X1E, H2D) get ams_mapping capture; printers that don't (e.g. P1S) gracefully degrade to tray_now-based tracking.