Commit Graph

19 Commits

Author SHA1 Message Date
52baaa8f70 feat(debug): add MQTT_RAW_LOG env switch for unfiltered RX logging
Logs every incoming MQTT message on INFO regardless of topic, including
dedup'd duplicates and topics with no registered callback - useful for
capturing printer behavior the bridge doesn't normally surface without
needing to know the topic name in advance (the existing wildcard
subscribe already receives everything, this just makes it visible).
2026-08-02 15:59:41 +02:00
0a9bf6def6 fix(mqtt): resolve reconnect deadlock after printer disconnect (Issue #105)
The bridge could get permanently stuck after a printer went offline and
came back, even with the printer confirmed reachable via ping/nc - only
a full container restart recovered it. Two compounding bugs:

1. Two independent code paths could trigger _reconnect() concurrently
   with no coordination: the reader thread (on a failed keepalive ping)
   and publish()/publish_web() (on a failed sendall(), which happens
   constantly once the socket is dead, since the poll loop calls
   query_info() every poll_interval). Both would race into their own
   _do_connect(), each opening a competing TLS handshake against a
   printer that likely only accepts one mTLS session at a time - so
   neither converges, and the failure repeats every ~3s instead of
   backing off. Added a lock so a second _reconnect() call waits for
   the first to finish instead of starting a competing handshake.

2. publish() swallows send/reconnect failures internally and returns
   None instead of raising - so _poll_loop's `if info: ...` branch was
   silently skipped on failure, but the surrounding except-block (which
   would have triggered the existing, correct offline/reconnect
   transition) was never reached, since no exception was ever thrown.
   The poll loop had no way to tell "printer sent nothing this tick"
   apart from "the MQTT session is dead". Added client.is_connected()
   and check it explicitly when query_info() returns falsy, routing a
   dead session into the same clean offline branch already used for a
   TCP-unreachable printer.

Verified: bridge continued printing normally throughout (live print
in progress on the real printer during this fix), full test suite
green (111 tests), new tests cover the concurrent-reconnect lock and
the poll-loop offline transition on a swallowed send failure.
2026-08-02 13:15:23 +02:00
0322ade606 refactor: translate all logs, comments and API error strings to English
Logs are user-facing across all locales; comments and docstrings switch
to English for external contributors. No behavior change.
2026-07-06 22:33:25 +02:00
eea570052f build: sources for v0.9.25 2026-06-17 07:15:31 +02:00
1f300589d1 build: sources for v0.9.21 2026-06-14 11:00:32 +02:00
a40f14af8e build: sources for v0.9.19.1 2026-06-04 11:40:02 +02:00
ac695ecf36 build: sources for v0.9.18 2026-05-31 19:53:36 +02:00
d26b37b332 build: sources for v0.9.17 2026-05-30 19:29:10 +02:00
40a27a47fc build: sources for v0.9.16 2026-05-22 11:26:16 +02:00
fe1ed4b096 build: sources for v0.9.11 2026-05-20 11:12:53 +02:00
d040475a62 release: v0.9.10 2026-05-17 22:33:07 +02:00
618f1039c3 release: v0.9.7 2026-05-08 18:24:14 +02:00
1d3c5a7e1b release: v0.9.4 2026-05-01 11:24:08 +02:00
2a12ecca51 chore: sync v0.9.2 – README/CHANGELOG DE+EN, config_loader, aktuelle Bridge-Quelldateien
- README.md (EN), README.de.md (DE) – README.en.md entfernt
- CHANGELOG.md (EN), CHANGELOG.de.md (DE)
- config_loader.py neu (config.ini statt .env)
- kobrax_moonraker_bridge.py, kobrax_client.py, env_loader.py aktualisiert
- Dockerfile, docker-compose.yml, VERSION auf 0.9.2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 14:53:23 +02:00
fc681316fc release: v0.9.1-beta14 2026-04-26 14:58:20 +02:00
14400dd799 release: v0.9.1-beta7 2026-04-22 00:27:37 +02:00
a7469cce9a release: v0.9.1-beta5 2026-04-21 23:59:04 +02:00
0c07f70fee release: v0.9.1-beta2 2026-04-21 21:43:28 +02:00
9bfd455a7c feat: KX-Bridge 0.9.0-beta1 – initiales Release-Repo 2026-04-20 16:07:43 +02:00