Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X1C: Bambu Studio prints to cloud connected computer don't have working cover image, or skip objects. #1096

Open
Alex-DeIt opened this issue Feb 28, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Alex-DeIt
Copy link

Home Assistant Version

2025.2.5

Bambu Lab Integration Version

2.1.7

Describe the bug

The estimated material needed for the print in g (gramms) and m (meters) is not shown anymore (see images here below).

Image

Image

Even the image of the object which has to be printed is not shown anymore (see here below).

Image

To Reproduce

I have changed nothing in my system and before those sensors were working perfectly.

Expected Behaviour

I would like to see the estimated quantity of material which is necessary for the print and I would see the image of the object which has to be printed.

What device are you using?

X1C

Diagnostic Output

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2025.2.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.13.1",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.6.62-haos-raspi",
    "supervisor": "2025.02.4",
    "host_os": "Home Assistant OS 14.2",
    "docker_version": "27.2.0",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "samsungtv_tizen": {
      "documentation": "https://github.com/jaruba/ha-samsungtv-tizen",
      "version": "1.6.1",
      "requirements": [
        "websocket-client>=0.56.0",
        "wakeonlan>=2.0.0",
        "numpy>=1.19.2"
      ]
    },
    "ble_monitor": {
      "documentation": "https://github.com/custom-components/ble_monitor",
      "version": "13.0.0",
      "requirements": [
        "pycryptodomex>=3.21.0",
        "janus>=2.0.0",
        "aioblescan>=0.2.14",
        "btsocket>=0.3.0",
        "pyric>=0.1.6.3"
      ]
    },
    "bambu_lab": {
      "documentation": "https://github.com/greghesp/ha-bambulab",
      "version": "2.1.7",
      "requirements": [
        "beautifulsoup4",
        "cloudscraper"
      ]
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/use/",
      "version": "2.0.5",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "dwd": {
      "documentation": "https://github.com/hg1337/homeassistant-dwd#readme",
      "version": "2024.11.0",
      "requirements": [
        "defusedxml==0.7.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "bambu_lab",
    "name": "Bambu Lab",
    "codeowners": [
      "greghesp",
      "AdrianGarside"
    ],
    "config_flow": true,
    "dependencies": [
      "device_automation",
      "http",
      "websocket_api",
      "ffmpeg",
      "mqtt",
      "frontend",
      "lovelace"
    ],
    "documentation": "https://github.com/greghesp/ha-bambulab",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/greghesp/ha-bambulab/issues",
    "requirements": [
      "beautifulsoup4",
      "cloudscraper"
    ],
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.1.7",
    "is_built_in": false,
    "overwrites_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 6.231397856026888e-05
    },
    "01J232VX9A5TT0XSG08XXXE07P": {
      "wait_import_platforms": -4.166885847982485,
      "wait_base_component": -0.00840492598945275,
      "config_entry_setup": 4.93576317204861
    }
  },
  "data": {
    "config_entry": {
      "created_at": "1970-01-01T00:00:00+00:00",
      "data": {
        "device_type": "X1C",
        "serial": "**REDACTED**"
      },
      "discovery_keys": {},
      "disabled_by": null,
      "domain": "bambu_lab",
      "entry_id": "01J232VX9A5TT0XSG08XXXE07P",
      "minor_version": 1,
      "modified_at": "2025-02-28T18:07:03.645985+00:00",
      "options": {
        "access_code": "**REDACTED**",
        "auth_token": "**REDACTED**",
        "email": "**REDACTED**",
        "host": "192.168.178.95",
        "local_mqtt": true,
        "name": "3DP-00M-188",
        "region": "Europe",
        "usage_hours": 338.5400000000001,
        "username": "**REDACTED**"
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "title": "**REDACTED**",
      "unique_id": null,
      "version": 2
    },
    "push_all": {
      "ams": {
        "ams": [
          {
            "humidity": "5",
            "id": "0",
            "temp": "27.6",
            "tray": [
              {
                "bed_temp": "0",
                "bed_temp_type": "0",
                "cali_idx": -1,
                "cols": [
                  "161616FF"
                ],
                "ctype": 0,
                "drying_temp": "0",
                "drying_time": "0",
                "id": "0",
                "nozzle_temp_max": "240",
                "nozzle_temp_min": "190",
                "remain": 0,
                "tag_uid": "0000000000000000",
                "tray_color": "161616FF",
                "tray_diameter": "0.00",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_sub_brands": "",
                "tray_type": "PLA",
                "tray_uuid": "00000000000000000000000000000000",
                "tray_weight": "0",
                "xcam_info": "000000000000000000000000"
              },
              {
                "bed_temp": "0",
                "bed_temp_type": "0",
                "cali_idx": -1,
                "cols": [
                  "898989FF"
                ],
                "ctype": 0,
                "drying_temp": "0",
                "drying_time": "0",
                "id": "1",
                "nozzle_temp_max": "240",
                "nozzle_temp_min": "190",
                "remain": 0,
                "tag_uid": "0000000000000000",
                "tray_color": "898989FF",
                "tray_diameter": "0.00",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_sub_brands": "",
                "tray_type": "PLA",
                "tray_uuid": "00000000000000000000000000000000",
                "tray_weight": "0",
                "xcam_info": "000000000000000000000000"
              },
              {
                "bed_temp": "0",
                "bed_temp_type": "0",
                "cali_idx": -1,
                "cols": [
                  "FFFFFFFF"
                ],
                "ctype": 0,
                "drying_temp": "0",
                "drying_time": "0",
                "id": "2",
                "nozzle_temp_max": "240",
                "nozzle_temp_min": "190",
                "remain": 0,
                "tag_uid": "0000000000000000",
                "tray_color": "FFFFFFFF",
                "tray_diameter": "0.00",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_sub_brands": "",
                "tray_type": "PLA",
                "tray_uuid": "00000000000000000000000000000000",
                "tray_weight": "0",
                "xcam_info": "000000000000000000000000"
              },
              {
                "bed_temp": "0",
                "bed_temp_type": "0",
                "cali_idx": -1,
                "cols": [
                  "FFF144FF"
                ],
                "ctype": 0,
                "drying_temp": "0",
                "drying_time": "0",
                "id": "3",
                "nozzle_temp_max": "240",
                "nozzle_temp_min": "190",
                "remain": 0,
                "tag_uid": "0000000000000000",
                "tray_color": "FFF144FF",
                "tray_diameter": "0.00",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_sub_brands": "",
                "tray_type": "PLA",
                "tray_uuid": "00000000000000000000000000000000",
                "tray_weight": "0",
                "xcam_info": "000000000000000000000000"
              }
            ]
          }
        ],
        "ams_exist_bits": "1",
        "ams_exist_bits_raw": "1",
        "insert_flag": true,
        "power_on_flag": false,
        "tray_exist_bits": "f",
        "tray_is_bbl_bits": "f",
        "tray_now": "255",
        "tray_pre": "255",
        "tray_read_done_bits": "f",
        "tray_reading_bits": "0",
        "tray_tar": "255",
        "version": 54
      },
      "ams_rfid_status": 2,
      "ams_status": 0,
      "aux_part_fan": true,
      "bed_target_temper": 0.0,
      "bed_temper": 54.0,
      "big_fan1_speed": "0",
      "big_fan2_speed": "0",
      "cali_version": 0,
      "chamber_temper": 31.0,
      "command": "push_status",
      "cooling_fan_speed": "0",
      "ctt": 0,
      "device": {
        "fan": 53248,
        "nozzle": {
          "0": {
            "info": 8,
            "temp": 209
          },
          "info": 9
        }
      },
      "fail_reason": "0",
      "fan_gear": 0,
      "filam_bak": [],
      "force_upgrade": false,
      "gcode_file": "/data/Metadata/plate_1.gcode",
      "gcode_file_prepare_percent": "100",
      "gcode_state": "RUNNING",
      "heatbreak_fan_speed": "13",
      "hms": [],
      "home_flag": 14794847,
      "hw_switch_state": 0,
      "ipcam": {
        "agora_service": "disable",
        "ipcam_dev": "1",
        "ipcam_record": "enable",
        "mode_bits": 2,
        "resolution": "720p",
        "rtsp_url": "**REDACTED**",
        "timelapse": "disable",
        "tutk_server": "enable"
      },
      "job_id": "271590407",
      "layer_num": 15,
      "lights_report": [
        {
          "mode": "on",
          "node": "chamber_light"
        },
        {
          "mode": "flashing",
          "node": "work_light"
        }
      ],
      "maintain": 3,
      "mc_percent": 92,
      "mc_print_error_code": "0",
      "mc_print_stage": "2",
      "mc_print_sub_stage": 0,
      "mc_remaining_time": 0,
      "net": {
        "conf": 16,
        "info": [
          {
            "ip": 1605544128,
            "mask": 16777215
          },
          {
            "ip": 0,
            "mask": 0
          }
        ]
      },
      "nozzle_diameter": "0.4",
      "nozzle_target_temper": 0.0,
      "nozzle_temper": 209.0,
      "nozzle_type": "hardened_steel",
      "online": {
        "ahb": false,
        "ext": false,
        "version": 4
      },
      "print_error": 0,
      "print_gcode_action": 255,
      "print_real_action": 0,
      "print_type": "cloud",
      "profile_id": "239337132",
      "project_id": "257935827",
      "queue_est": 0,
      "queue_number": 0,
      "queue_sts": 0,
      "queue_total": 0,
      "s_obj": [],
      "sdcard": false,
      "sequence_id": "2021",
      "spd_lvl": 0,
      "spd_mag": 100,
      "stg": [
        2,
        14,
        13
      ],
      "stg_cur": -1,
      "subtask_id": "522176399",
      "subtask_name": "Cable Clip v7",
      "task_id": "522176398",
      "total_layer_num": 15,
      "upgrade_state": {
        "ahb_new_version_number": "",
        "ams_new_version_number": "",
        "consistency_request": false,
        "dis_state": 0,
        "err_code": 0,
        "ext_new_version_number": "",
        "force_upgrade": false,
        "idx": 4,
        "idx1": 0,
        "lower_limit": "00.00.00.00",
        "message": "",
        "module": "",
        "new_version_state": 2,
        "ota_new_version_number": "",
        "progress": "0",
        "sequence_id": 0,
        "sn": "**REDACTED**",
        "status": "IDLE"
      },
      "upload": {
        "file_size": 0,
        "finish_size": 0,
        "message": "Good",
        "oss_url": "",
        "progress": 0,
        "sequence_id": "0903",
        "speed": 0,
        "status": "idle",
        "task_id": "",
        "time_remaining": 0,
        "trouble_id": ""
      },
      "vt_tray": {
        "bed_temp": "0",
        "bed_temp_type": "0",
        "cali_idx": -1,
        "cols": [
          "161616FF"
        ],
        "ctype": 0,
        "drying_temp": "0",
        "drying_time": "0",
        "id": "254",
        "nozzle_temp_max": "270",
        "nozzle_temp_min": "220",
        "remain": 0,
        "tag_uid": "0000000000000000",
        "tray_color": "161616FF",
        "tray_diameter": "0.00",
        "tray_id_name": "",
        "tray_info_idx": "GFG99",
        "tray_sub_brands": "",
        "tray_type": "PETG",
        "tray_uuid": "00000000000000000000000000000000",
        "tray_weight": "0",
        "xcam_info": "000000000000000000000000"
      },
      "wifi_signal": "-55dBm",
      "xcam": {
        "allow_skip_parts": false,
        "buildplate_marker_detector": true,
        "first_layer_inspector": true,
        "halt_print_sensitivity": "medium",
        "print_halt": true,
        "printing_monitor": true,
        "spaghetti_detector": true
      },
      "xcam_status": "0"
    },
    "get_version": {
      "command": "get_version",
      "module": [
        {
          "flag": 3,
          "hw_ver": "N/A",
          "name": "ota",
          "sn": "**REDACTED**",
          "sw_ver": "01.08.02.00"
        },
        {
          "flag": 0,
          "hw_ver": "AMS08",
          "name": "ams/0",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.06.44"
        },
        {
          "flag": 0,
          "hw_ver": "MC07",
          "name": "mc",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.27.26"
        },
        {
          "flag": 0,
          "hw_ver": "SMC01",
          "name": "sm",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.27.26"
        },
        {
          "flag": 0,
          "hw_ver": "TH09",
          "name": "th",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.07.12"
        },
        {
          "flag": 0,
          "hw_ver": "AP05",
          "name": "ap",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.32.39"
        }
      ],
      "sequence_id": "20998"
    }
  }
}

Log Extracts

see attachment.

Other Information

home-assistant_bambu_lab_2025-02-28T18-25-41.083Z.log

@Alex-DeIt Alex-DeIt added the bug Something isn't working label Feb 28, 2025
@AdrianGarside
Copy link
Collaborator

Do you have ftp software that you can use to connect to your printer? The new model download support is not finding your model files. Local mqtt connection now defaults to getting the stuff you've lost from the printer but that only works if we can find the 3mf:

19:16:56.759 INFO Updating task data by FTP
19:16:56.891 DEBUG Attempting download of '/Cable Clip v7.3mf'
19:16:56.913 DEBUG Attempting download of '/cache/Cable Clip v7.3mf'
19:16:56.924 DEBUG Attempting download of '/Cable Clip v7.gcode.3mf'
19:16:56.944 DEBUG Attempting download of '/cache/Cable Clip v7.gcode.3mf'
19:16:56.963 DEBUG Attempting download of '/data/Metadata/plate_1.gcode.3mf'
19:16:56.978 DEBUG Attempting download of '/cache/data/Metadata/plate_1.gcode.3mf'
19:16:56.996 DEBUG Attempting download of '/data/Metadata/plate_1.gcode.gcode.3mf'
19:16:57.016 DEBUG Attempting download of '/cache/data/Metadata/plate_1.gcode.gcode.3mf'
19:16:57.031 DEBUG Falling back to searching for latest 3mf file.
19:16:57.031 DEBUG Looking for latest ['.3mf'] file in /
19:16:57.081 DEBUG Completed FTL list for /
19:16:57.081 DEBUG Looking for latest ['.3mf'] file in /cache/
19:16:57.140 DEBUG Completed FTL list for /cache/
19:16:57.146 DEBUG No model file found.

Given it's an X1C - the file we expect to find is a cloud driven print is either /cache/Cable Clip v7.3mf or /cache/Cable Clip v7.gcode.3mf but neither were found.

@AdrianGarside
Copy link
Collaborator

Never mind. I have a repro of this. The X1C appears to be saying it's 100% downloaded the model file before it even starts. Maybe I just need to delay until the print enters the running state and lose a few seconds some of the time.

15:54:20.632 (X1C-Mqtt-143) Device is X1C
15:54:49.636 (X1C-Mqtt-143) SUBTASK_NAME: Dragon Egg with Baby Dragon
15:54:50.385 (X1C-Mqtt-143) GCODE_STATE: IDLE -> PREPARE
15:54:50.386 (X1C-Mqtt-143) GCODE_FILE: /data/Metadata/plate_1.gcode
15:54:50.386 (X1C-Mqtt-143) Clearing model data
15:54:50.386 (X1C-Mqtt-143) Clearing pick data
15:54:50.386 (X1C-Mqtt-143) GENERATED START TIME: 15:54:00
15:54:50.386 (X1C-Mqtt-143) DOWNLOAD PERCENTAGE: 0 -> 100
15:54:50.386 (X1C-Mqtt-143) DOWNLOAD TO PRINTER IS COMPLETE
15:54:50.386 (X1C-FTP-165) Updating task data by FTP
15:54:50.526 (X1C-FTP-165) Attempting download of '/Dragon Egg with Baby Dragon.3mf'
15:54:50.536 (X1C-FTP-165) Attempting download of '/cache/Dragon Egg with Baby Dragon.3mf'
15:54:50.547 (X1C-FTP-165) Attempting download of '/Dragon Egg with Baby Dragon.gcode.3mf'
15:54:50.557 (X1C-FTP-165) Attempting download of '/cache/Dragon Egg with Baby Dragon.gcode.3mf'
15:54:50.579 (X1C-FTP-165) Attempting download of '/data/Metadata/plate_1.gcode.3mf'
15:54:50.594 (X1C-FTP-165) Attempting download of '/cache/data/Metadata/plate_1.gcode.3mf'
15:54:50.608 (X1C-FTP-165) Attempting download of '/data/Metadata/plate_1.gcode.gcode.3mf'
15:54:50.630 (X1C-FTP-165) Attempting download of '/cache/data/Metadata/plate_1.gcode.gcode.3mf'
15:54:50.644 (X1C-FTP-165) Falling back to searching for latest 3mf file.
15:54:50.644 (X1C-FTP-165) Looking for latest ['.3mf'] file in /
15:54:50.683 (X1C-FTP-165) Completed FTL list for /
15:54:50.683 (X1C-FTP-165) Looking for latest ['.3mf'] file in /cache/
15:54:50.726 (X1C-FTP-165) Completed FTL list for /cache/
15:54:50.726 (X1C-FTP-165) Found latest file /cache/Lovers Valentine Day Shadowbox.3mf
15:54:50.726 (X1C-FTP-165) Attempting download of '/cache/Lovers Valentine Day Shadowbox.3mf'
15:54:51.373 (X1C-Mqtt-143) DOWNLOAD PERCENTAGE: 100 -> 100
15:54:51.690 (X1C-FTP-165) Successfully downloaded '/cache/Lovers Valentine Day Shadowbox.3mf'.
15:54:51.695 (X1C-FTP-165) File size is 794770 bytes
15:54:51.695 (X1C-FTP-165) Plate: 9
15:54:51.697 (X1C-FTP-165) Cover image: Metadata/plate_9.png
15:54:51.697 (X1C-FTP-165) Print time: 2081s
15:54:51.697 (X1C-FTP-165) Weight: 22.66
15:54:51.697 (X1C-FTP-165) AMS Tray 0: 7.14m | 22.66g
15:54:51.697 (X1C-FTP-165) Unable to load 'Metadata/pick_9.png' from archive
15:54:51.697 (X1C-FTP-165) Done updating task data by FTP. Elapsed time = 1s
15:54:52.375 (X1C-Mqtt-143) DOWNLOAD PERCENTAGE: 100 -> 100
15:54:52.426 (X1C-Mqtt-143) DOWNLOAD PERCENTAGE: 100 -> 100
15:54:53.372 (X1C-Mqtt-143) GCODE_STATE: PREPARE -> RUNNING
15:54:54.391 (X1C-Mqtt-143) END TIME2: 22:20:00

@AdrianGarside
Copy link
Collaborator

AdrianGarside commented Mar 2, 2025

Ugh. This is even worse than I thought. When printing something from Bambu Studio the 3mf appears in the root directory seemingly simultaneously with the upload to bambu cloud. It's there for only 1-2 seconds before it disappears. The printer then goes through the rest of the PREPARE phase saying it's 100% download and enters the RUNNING phase. A short while later the file gets redownloaded (saw its size increasing) into the \cache directory. So even if I defer the download attempt until the RUNNING phase - it still fails because it's MIA at the start of that phase.

@AdrianGarside AdrianGarside changed the title Can not see the output of some sensors any more. X1C: Bambu Studio prints to cloud connected computer don't have working cover image, or skip objects. Mar 2, 2025
@avwuff
Copy link

avwuff commented Mar 3, 2025

That's really annoying. Perhaps this warrants filing a bug on Bambu directly?

One option is to just periodically check for the png file, every 5 seconds or so after a print starts, and then once it appears, grab it and stop checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants