1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[GH-ISSUE #167] [Bug]: Printer MQTT cant connect #106

Closed
opened 2026-05-07 00:06:15 +02:00 by BreizhHardware · 18 comments

Originally created by @LucHeart on GitHub (Jan 28, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/167

Originally assigned to: @maziggy on GitHub.

Bug Description

Trying to setup bambuddy, via docker, network mode host

Input the IP, my serial number, and access code.
I know these are correct since they work in both orca and via the home assistant integration. Lan mode is obviously enabled.

I think its important to note that im on an old firmware version, due to the authorization drama, and my printer has not access to WAN.

My printer is reachable from the host machine, and pingable.

bambuddy  | 2026-01-28 10:56:57,016 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)
bambuddy  | 2026-01-28 10:56:58,808 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)
bambuddy  | 2026-01-28 10:57:00,635 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)

Expected Behavior

It should work.

Steps to Reproduce

Honestly, not sure, i suspect it has todo with my firmware version if anything.

Printer Model

P1S

Bambuddy Version

v0.1.6b11

Printer Firmware Version

01.07.00.00

Installation Method

Docker

Operating System

Linux (Ubuntu/Debian)

Relevant Logs / Support Package

bambuddy  | 2026-01-28 10:56:57,016 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)
bambuddy  | 2026-01-28 10:56:58,808 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)
bambuddy  | 2026-01-28 10:57:00,635 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False)

Screenshots

No response

Additional Context

bambuddy-support-20260128-110721.zip

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
Originally created by @LucHeart on GitHub (Jan 28, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/167 Originally assigned to: @maziggy on GitHub. ### Bug Description Trying to setup bambuddy, via docker, network mode host Input the IP, my serial number, and access code. I know these are correct since they work in both orca and via the home assistant integration. Lan mode is obviously enabled. I think its important to note that im on an old firmware version, due to the authorization drama, and my printer has not access to WAN. My printer is reachable from the host machine, and pingable. ``` bambuddy | 2026-01-28 10:56:57,016 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) bambuddy | 2026-01-28 10:56:58,808 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) bambuddy | 2026-01-28 10:57:00,635 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) ``` ### Expected Behavior It should work. ### Steps to Reproduce Honestly, not sure, i suspect it has todo with my firmware version if anything. ### Printer Model P1S ### Bambuddy Version v0.1.6b11 ### Printer Firmware Version 01.07.00.00 ### Installation Method Docker ### Operating System Linux (Ubuntu/Debian) ### Relevant Logs / Support Package ```shell bambuddy | 2026-01-28 10:56:57,016 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) bambuddy | 2026-01-28 10:56:58,808 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) bambuddy | 2026-01-28 10:57:00,635 WARNING [backend.app.services.bambu_mqtt] [ MY_SERIAL_NUMBER ] MQTT disconnected: rc=Unspecified error, flags=DisconnectFlags(is_disconnect_packet_from_server=False) ``` ### Screenshots _No response_ ### Additional Context [bambuddy-support-20260128-110721.zip](https://github.com/user-attachments/files/24907631/bambuddy-support-20260128-110721.zip) ### 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
BreizhHardware 2026-05-07 00:06:15 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cadtoolbox commented on GitHub (Jan 28, 2026):

Based on my experience, the firmware not being more recent is definitely the cause of this issue. I'm not sure of your network situation but without updated firmware, connecting outside of the current subnet is impossible.

<!-- gh-comment-id:3810584252 --> @cadtoolbox commented on GitHub (Jan 28, 2026): Based on my experience, the firmware not being more recent is definitely the cause of this issue. I'm not sure of your network situation but without updated firmware, connecting outside of the current subnet is impossible.
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

its in the same subnet, and the printer is reachable, guess ill update afterall

<!-- gh-comment-id:3810591072 --> @LucHeart commented on GitHub (Jan 28, 2026): its in the same subnet, and the printer is reachable, guess ill update afterall
Author
Owner

@cadtoolbox commented on GitHub (Jan 28, 2026):

@LucHeart The more recent firmware allows for offline updates using the SD card. The trick is getting it updated to the version that allows this if you're not on WAN to start with. I just had to do this recently by turning off LAN mode only and Wi-Fi on temporarily using my phone as a hotspot. Now that it's updated through, it's much easier in LAN mode using the SD card method.

<!-- gh-comment-id:3810631432 --> @cadtoolbox commented on GitHub (Jan 28, 2026): @LucHeart The more recent firmware allows for offline updates using the SD card. The trick is getting it updated to the version that allows this if you're not on WAN to start with. I just had to do this recently by turning off LAN mode only and Wi-Fi on temporarily using my phone as a hotspot. Now that it's updated through, it's much easier in LAN mode using the SD card method.
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

To debug the issue please attach a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging

<!-- gh-comment-id:3810836292 --> @maziggy commented on GitHub (Jan 28, 2026): To debug the issue please attach a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

To debug the issue please attach a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging

there is already one attached with relevant logs inside...

<!-- gh-comment-id:3811012862 --> @LucHeart commented on GitHub (Jan 28, 2026): > To debug the issue please attach a support package -> https://wiki.bambuddy.cool/features/system-info/?h=debug#enable-debug-logging there is already one attached with relevant logs inside...
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

Oh...sorry. Shouldn't do that much things at the same time. Will check.

<!-- gh-comment-id:3811019869 --> @maziggy commented on GitHub (Jan 28, 2026): Oh...sorry. Shouldn't do that much things at the same time. Will check.
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

I also suspect the old firmware. MQTT connection is using SSL. Python's ssl.create_default_context() disables TLS 1.0 and TLS 1.1 by default for security reasons.

I'm sorry.

<!-- gh-comment-id:3811116665 --> @maziggy commented on GitHub (Jan 28, 2026): I also suspect the old firmware. MQTT connection is using SSL. Python's ssl.create_default_context() disables TLS 1.0 and TLS 1.1 by default for security reasons. I'm sorry.
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

I will update and report back if that worked.

<!-- gh-comment-id:3811146272 --> @LucHeart commented on GitHub (Jan 28, 2026): I will update and report back if that worked.
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

That did not fix it, same exact errors.

<!-- gh-comment-id:3813105451 --> @LucHeart commented on GitHub (Jan 28, 2026): That did not fix it, same exact errors.
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

There must be something wrong with your environment, there are already a lot of P1S users. Also the logs don't show any errors.

  • LAN mode is activated?
  • Developer mode is enabled?
  • Docker was started via Bambuddy's docker-compose.yml?
  • Can you ping the printer from the Docker container?
<!-- gh-comment-id:3813439543 --> @maziggy commented on GitHub (Jan 28, 2026): There must be something wrong with your environment, there are already a lot of P1S users. Also the logs don't show any errors. - LAN mode is activated? - Developer mode is enabled? - Docker was started via Bambuddy's docker-compose.yml? - Can you ping the printer from the Docker container?
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

Yes
Yes
Yes
Yes

I can even open a mqtt connection to the printer with a script...

<!-- gh-comment-id:3813446462 --> @LucHeart commented on GitHub (Jan 28, 2026): Yes Yes Yes Yes I can even open a mqtt connection to the printer with a script...
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

this is my current docker compose, printer is in the same network, all ports are open

services:
  bambuddy:
    image: ghcr.io/maziggy/bambuddy:latest
    container_name: bambuddy
    network_mode: host
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      #
      # Share virtual printer certs with native installation
      # This ensures the slicer only needs to trust one CA certificate.
      - ./virtual_printer:/app/data/virtual_printer
    environment:
      - TZ=Europe/Berlin
      - PORT=8000
    restart: unless-stopped

i got curious and checked via a program if its really reachable from this vm, and yes it is. This outputs a json with various info about the printer, so the connection works.

use bambulab_mqtt::BambulabClient;
use bambulab_mqtt::request_command::*;
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    let host = args
        .get(1)
        .expect("Please provide a host as the first argument.");
    let password = args
        .get(2)
        .expect("Please provide a password as the second argument.");
    let serial = args
        .get(3)
        .expect("Please provide a serial as the third argument.");
    println!("Host: {}", host);
    println!("Password: {}", password);
    println!("Serial: {}", serial);

    let mut client =
        BambulabClient::new(host.to_string(), password.to_string(), serial.to_string());

    let get_version = RequestCommand::Info(Info::GetVersion(GetVersion::new()));
    let res = client.request(&get_version);
    match res {
        Ok(payload) => {
            println!("Payload: {}", payload);
        }
        Err(e) => {
            println!("Error: {}", e);
        }
    }
}

<!-- gh-comment-id:3813473956 --> @LucHeart commented on GitHub (Jan 28, 2026): this is my current docker compose, printer is in the same network, all ports are open ``` services: bambuddy: image: ghcr.io/maziggy/bambuddy:latest container_name: bambuddy network_mode: host volumes: - ./data:/app/data - ./logs:/app/logs # # Share virtual printer certs with native installation # This ensures the slicer only needs to trust one CA certificate. - ./virtual_printer:/app/data/virtual_printer environment: - TZ=Europe/Berlin - PORT=8000 restart: unless-stopped ``` i got curious and checked via a program if its really reachable from this vm, and yes it is. This outputs a json with various info about the printer, so the connection works. ```rust use bambulab_mqtt::BambulabClient; use bambulab_mqtt::request_command::*; use std::env; fn main() { let args: Vec<String> = env::args().collect(); let host = args .get(1) .expect("Please provide a host as the first argument."); let password = args .get(2) .expect("Please provide a password as the second argument."); let serial = args .get(3) .expect("Please provide a serial as the third argument."); println!("Host: {}", host); println!("Password: {}", password); println!("Serial: {}", serial); let mut client = BambulabClient::new(host.to_string(), password.to_string(), serial.to_string()); let get_version = RequestCommand::Info(Info::GetVersion(GetVersion::new())); let res = client.request(&get_version); match res { Ok(payload) => { println!("Payload: {}", payload); } Err(e) => { println!("Error: {}", e); } } } ```
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

So you ran the script in Bambuddy's Docker container?

Very curious.

Can you run it without Docker for a short test?

<!-- gh-comment-id:3813488577 --> @maziggy commented on GitHub (Jan 28, 2026): So you ran the script in Bambuddy's Docker container? Very curious. Can you run it without Docker for a short test?
Author
Owner

@maziggy commented on GitHub (Jan 28, 2026):

And I would suggest to use branch 0.1.6-final.

<!-- gh-comment-id:3813498982 --> @maziggy commented on GitHub (Jan 28, 2026): And I would suggest to use branch 0.1.6-final.
Author
Owner

@LucHeart commented on GitHub (Jan 28, 2026):

i'll try that

<!-- gh-comment-id:3813640957 --> @LucHeart commented on GitHub (Jan 28, 2026): i'll try that
Author
Owner

@maziggy commented on GitHub (Jan 29, 2026):

Does it work?

<!-- gh-comment-id:3815843001 --> @maziggy commented on GitHub (Jan 29, 2026): Does it work?
Author
Owner

@LucHeart commented on GitHub (Jan 29, 2026):

Soo i cloned main, set it up locally, works.
Funny enough, I delete the printer on my docker hosted one, re-add it, and it works.
Not sure what is going on here, couldnt have been the access code since i reapplied that one anyways after firmware updating. Maybe that didnt save? Or it was broken in some other way, it works now. Thanks for you help regardless, even though its very unsatisfying for the issue to just vanish after readding the printer.

<!-- gh-comment-id:3816465456 --> @LucHeart commented on GitHub (Jan 29, 2026): Soo i cloned main, set it up locally, works. Funny enough, I delete the printer on my docker hosted one, re-add it, and it works. Not sure what is going on here, couldnt have been the access code since i reapplied that one anyways after firmware updating. Maybe that didnt save? Or it was broken in some other way, it works now. Thanks for you help regardless, even though its very unsatisfying for the issue to just vanish after readding the printer.
Author
Owner

@maziggy commented on GitHub (Jan 29, 2026):

Shit happens! ;)

<!-- gh-comment-id:3816476597 --> @maziggy commented on GitHub (Jan 29, 2026): Shit happens! ;)
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-maziggy-1#106
No description provided.