mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[GH-ISSUE #549] [Bug]: Printer Status unknown #357
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RealMerlin on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/549
Originally assigned to: @maziggy on GitHub.
Bug Description
A1 Mini Status is suddenly showing "unknown", temperatures are 0°C and no AMS is showing.
Expected Behavior
Showing Status Idle, real temperatures and AMS.
Steps to Reproduce
Click on "reconnect" at A1 Mini
Printer Model
A1 Mini
Bambuddy Version
v0.2.1
Printer Firmware Version
01.07.02.00
Installation Method
Manual (git clone)
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
Screenshots
Additional Context
Printer was already added and worked the last weeks normal.
I tried to re add the Printer and Downgraded to 0.2.1b2/0.2.1b (docker container)
Lastly I reinstalled native on Ubuntu from git (0.2.1).
I tried to investigate a little bit.
An Exception is Throwing at ./backend/app/services/bambu_mqtt.py", line 445
payload = json.loads(msg.payload.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbe in position 2368: invalid start byte
So I tried:
payload = json.loads(msg.payload.decode('utf-8', errors='ignore'))
The Printer is now showing normal, as expected. But i think this could not be the end solution 😄
Checklist
@RealMerlin commented on GitHub (Feb 28, 2026):
Support Package: bambuddy-support-20260228-074248.zip
@maziggy commented on GitHub (Feb 28, 2026):
Thanks for the detailed report and investigation — that UnicodeDecodeError was spot-on.
The MQTT message handler used strict UTF-8 decoding and only caught json.JSONDecodeError, not UnicodeDecodeError. When your A1 Mini sent a payload with a non-UTF-8 byte (0xBE at position 2368), the entire message was silently dropped — which is why status showed "unknown", temps were 0°C, and AMS disappeared.
This isn't a regression in 0.2.1 — the bug has been there since day one, but it only triggers when a printer sends non-standard bytes in its MQTT payload. That's why it's a one-off rather than affecting all A1 users. It was likely caused by something specific in your printer's state (a filament profile name, gcode filename, or print job metadata with unusual characters).
Fixed in branch 0.2.2b1 — we now catch the decode error and fall back to errors="replace", which keeps the JSON parseable while marking problem bytes. Your errors='ignore' workaround was the right instinct, though replace is safer since ignore can shift byte positions.