[GH-ISSUE #873] [Bug]: X1Plus - unable to connect with dev branch #592

Closed
opened 2026-05-06 12:31:13 +02:00 by BreizhHardware · 6 comments

Originally created by @lightmaster on GitHub (Apr 2, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/873

Originally assigned to: @maziggy on GitHub.

Bug Description

When I try to connect to the printer while on the dev branch, I am initially told the printer is offline. If I tell it to reconnect, it will connect, but is missing information like anything to do with the AMS and that the SD Card isn't inserted. I am also unable to see any K-Profiles.

When I switch back to the main branch, I am immediately connected to the printer and the AMS and SD Card information show up correctly.

Maybe an unexpected issue of X1Plus, though the dev branch was working when I tested it the other day before reporting my previous bug.

Expected Behavior

Why does this section always feel like just a way to reiterate the description of a bug?

Bambuddy should connect to the printer and AMS the same between the main and dev branches.

Steps to Reproduce

  1. Use the install script to switch from main to dev branch
  2. Immediately after a reboot of bambuddy (systemctl restart bambuddy) see that Bambuddy says it's not connected to the printer.
  3. Use the install script to switch back to main and see that everything is connected.

Printer Model

X1 Carbon

Bambuddy Version

dev branch as off 2026-04-02 3:30am EST

Printer Firmware Version

99.00.00.00

Installation Method

Manual (git clone)

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

Dev Branch support package:
bambuddy-support-20260402-033519.zip

Main Branch support package:
bambuddy-support-20260402-033738.zip

Screenshots

No response

Additional Context

No response

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am using the latest version of Bambuddy
  • My printer is set to LAN Only mode
  • My printer has Developer Mode enabled
Originally created by @lightmaster on GitHub (Apr 2, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/873 Originally assigned to: @maziggy on GitHub. ### Bug Description When I try to connect to the printer while on the dev branch, I am initially told the printer is offline. If I tell it to reconnect, it will connect, but is missing information like anything to do with the AMS and that the SD Card isn't inserted. I am also unable to see any K-Profiles. When I switch back to the main branch, I am immediately connected to the printer and the AMS and SD Card information show up correctly. Maybe an unexpected issue of X1Plus, though the dev branch was working when I tested it the other day before reporting my previous bug. ### Expected Behavior Why does this section always feel like just a way to reiterate the description of a bug? Bambuddy should connect to the printer and AMS the same between the main and dev branches. ### Steps to Reproduce 1. Use the install script to switch from main to dev branch 2. Immediately after a reboot of bambuddy (`systemctl restart bambuddy`) see that Bambuddy says it's not connected to the printer. 3. Use the install script to switch back to main and see that everything is connected. ### Printer Model X1 Carbon ### Bambuddy Version dev branch as off 2026-04-02 3:30am EST ### Printer Firmware Version 99.00.00.00 ### Installation Method Manual (git clone) ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package Dev Branch support package: [bambuddy-support-20260402-033519.zip](https://github.com/user-attachments/files/26430295/bambuddy-support-20260402-033519.zip) Main Branch support package: [bambuddy-support-20260402-033738.zip](https://github.com/user-attachments/files/26430329/bambuddy-support-20260402-033738.zip) ### Screenshots _No response_ ### Additional Context _No response_ ### Checklist - [x] I have searched existing issues to ensure this bug hasn't already been reported - [x] I am using the latest version of Bambuddy - [x] My printer is set to LAN Only mode - [x] My printer has Developer Mode enabled
BreizhHardware 2026-05-06 12:31:13 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@maziggy commented on GitHub (Apr 2, 2026):

Thanks for the detailed report and both support packages — comparing the two was very helpful.

What we found:

The crash is in the WebSocket handler — every time the frontend connects, it fails with 'str' object has no attribute 'get' when trying to read the external spool (vt_tray) data from your printer's MQTT state. This is why the UI shows the printer as offline and can't display AMS/SD card info.

The error only appears in restarts after ae2a2625 (developer mode probe) was added — your 03-30 restart was clean, but every restart from 04-01 onward crashes. The main branch doesn't have this commit, which is why switching back fixes it.

What we need from you:

We can't see the actual vt_tray value your X1Plus firmware sends — the debug logs only show key names. Could you help us capture it?

  1. Enable debug logging (Settings → Support → Debug)
  2. SSH into your server and run:
    mosquitto_sub -h <PRINTER_IP> -p 8883 -u bblp -P <ACCESS_CODE> -t "device//report" --cafile /dev/null --insecure -C 1 | python3 -c "import sys,json;
    d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).name); print('vt_tray value:', d.get('vt_tray'))"
  3. (Replace <PRINTER_IP>, <ACCESS_CODE>, and with your values)

This will tell us exactly what format X1Plus uses for the external spool field, so we can fix it properly without breaking standard firmware.

<!-- gh-comment-id:4175785264 --> @maziggy commented on GitHub (Apr 2, 2026): Thanks for the detailed report and both support packages — comparing the two was very helpful. What we found: The crash is in the WebSocket handler — every time the frontend connects, it fails with 'str' object has no attribute 'get' when trying to read the external spool (vt_tray) data from your printer's MQTT state. This is why the UI shows the printer as offline and can't display AMS/SD card info. The error only appears in restarts after ae2a2625 (developer mode probe) was added — your 03-30 restart was clean, but every restart from 04-01 onward crashes. The main branch doesn't have this commit, which is why switching back fixes it. What we need from you: We can't see the actual vt_tray value your X1Plus firmware sends — the debug logs only show key names. Could you help us capture it? 1. Enable debug logging (Settings → Support → Debug) 2. SSH into your server and run: mosquitto_sub -h <PRINTER_IP> -p 8883 -u bblp -P <ACCESS_CODE> -t "device/<SERIAL>/report" --cafile /dev/null --insecure -C 1 | python3 -c "import sys,json; d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).__name__); print('vt_tray value:', d.get('vt_tray'))" 2. (Replace <PRINTER_IP>, <ACCESS_CODE>, and <SERIAL> with your values) This will tell us exactly what format X1Plus uses for the external spool field, so we can fix it properly without breaking standard firmware.
Author
Owner

@lightmaster commented on GitHub (Apr 2, 2026):

What we need from you:

We can't see the actual vt_tray value your X1Plus firmware sends — the debug logs only show key names. Could you help us capture it?

1. Enable debug logging (Settings → Support → Debug)

2. SSH into your server and run:
   mosquitto_sub -h <PRINTER_IP> -p 8883 -u bblp -P <ACCESS_CODE> -t "device//report" --cafile /dev/null --insecure -C 1 | python3 -c "import sys,json;
   d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).**name**); print('vt_tray value:', d.get('vt_tray'))"

3. (Replace <PRINTER_IP>, <ACCESS_CODE>, and  with your values)

This will tell us exactly what format X1Plus uses for the external spool field, so we can fix it properly without breaking standard firmware.

Yup, I'll get that when I get home in an hour or so.

<!-- gh-comment-id:4175825919 --> @lightmaster commented on GitHub (Apr 2, 2026): > What we need from you: > > We can't see the actual vt_tray value your X1Plus firmware sends — the debug logs only show key names. Could you help us capture it? > > 1. Enable debug logging (Settings → Support → Debug) > > 2. SSH into your server and run: > mosquitto_sub -h <PRINTER_IP> -p 8883 -u bblp -P <ACCESS_CODE> -t "device//report" --cafile /dev/null --insecure -C 1 | python3 -c "import sys,json; > d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).**name**); print('vt_tray value:', d.get('vt_tray'))" > > 3. (Replace <PRINTER_IP>, <ACCESS_CODE>, and with your values) > > > This will tell us exactly what format X1Plus uses for the external spool field, so we can fix it properly without breaking standard firmware. Yup, I'll get that when I get home in an hour or so.
Author
Owner

@lightmaster commented on GitHub (Apr 2, 2026):

Apparently the the latest verion of mqtt client on debian requires a valid cert to connect, even with --insecure. Ended up having to download the cert from the printer and use the command mosquitto_sub -h <IP_ADDRES> -p 8883 -u bblp -P <ACCESS_CODE> -t "device/<SERIAL>/report" -V 311 --cafile ./bambu.crt --insecure -C 1 | python3 -c "import sys,json; d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).__name__); print('vt_tray value:', d.get('vt_tray'))" to get it to work. Also,.namedidn't work in that command, had to use.name`.

Got back this from the command:

vt_tray type: dict
vt_tray value: {'bed_temp': '0', 'bed_temp_type': '0', 'cali_idx': -1, 'cols': ['00000000'], 'ctype': 0, 'drying_temp': '0', 'drying_time': '0', 'id': '254', 'nozzle_temp_max': '0', 'nozzle_temp_min': '0', 'remain': 0, 'tag_uid': '0000000000000000', 'tray_color': '00000000', 'tray_diameter': '0.00', 'tray_id_name': '', 'tray_info_idx': '', 'tray_sub_brands': '', 'tray_type': '', 'tray_uuid': '00000000000000000000000000000000', 'tray_weight': '0', 'xcam_info': '000000000000000000000000'}

bambuddy-support-20260402-064811.zip

<!-- gh-comment-id:4176401871 --> @lightmaster commented on GitHub (Apr 2, 2026): Apparently the the latest verion of mqtt client on debian requires a valid cert to connect, even with `--insecure`. Ended up having to download the cert from the printer and use the command ` mosquitto_sub -h <IP_ADDRES> -p 8883 -u bblp -P <ACCESS_CODE> -t "device/<SERIAL>/report" -V 311 --cafile ./bambu.crt --insecure -C 1 | python3 -c "import sys,json; d=json.load(sys.stdin).get('print',{}); print('vt_tray type:', type(d.get('vt_tray')).__name__); print('vt_tray value:', d.get('vt_tray'))" to get it to work. Also, `.name` didn't work in that command, had to use `.__name__`. Got back this from the command: ```python vt_tray type: dict vt_tray value: {'bed_temp': '0', 'bed_temp_type': '0', 'cali_idx': -1, 'cols': ['00000000'], 'ctype': 0, 'drying_temp': '0', 'drying_time': '0', 'id': '254', 'nozzle_temp_max': '0', 'nozzle_temp_min': '0', 'remain': 0, 'tag_uid': '0000000000000000', 'tray_color': '00000000', 'tray_diameter': '0.00', 'tray_id_name': '', 'tray_info_idx': '', 'tray_sub_brands': '', 'tray_type': '', 'tray_uuid': '00000000000000000000000000000000', 'tray_weight': '0', 'xcam_info': '000000000000000000000000'} ``` [bambuddy-support-20260402-064811.zip](https://github.com/user-attachments/files/26435489/bambuddy-support-20260402-064811.zip)
Author
Owner

@maziggy commented on GitHub (Apr 2, 2026):

Oh yes, the cert. Sorry, forgot to mention that.

I think I've indentified a racing condition. Please use branch dev and let me know if ti works now.

<!-- gh-comment-id:4177337932 --> @maziggy commented on GitHub (Apr 2, 2026): Oh yes, the cert. Sorry, forgot to mention that. I think I've indentified a racing condition. Please use branch dev and let me know if ti works now.
Author
Owner

@lightmaster commented on GitHub (Apr 2, 2026):

Dev branch is showing the printer online and pulling AMS and Printer info as expected. Thank you.

<!-- gh-comment-id:4177584010 --> @lightmaster commented on GitHub (Apr 2, 2026): Dev branch is showing the printer online and pulling AMS and Printer info as expected. Thank you.
Author
Owner

@maziggy commented on GitHub (Apr 2, 2026):


If you find Bambuddy useful, please consider giving it a on GitHub — it helps others discover the project!

<!-- gh-comment-id:4177590199 --> @maziggy commented on GitHub (Apr 2, 2026): ----- If you find Bambuddy useful, please consider giving it a ⭐ on [GitHub](https://github.com/maziggy/bambuddy) — it helps others discover the project!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#592
No description provided.