greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers
962 stars 84 forks source link

[Bug] A1 Camera not available #661

Closed brauwers1981 closed 6 days ago

brauwers1981 commented 1 week ago

Describe the bug

I have a HA intergration with my A1 mini and now also with my new A1.

But for the A1 mini I can see the camera feed but at the 'Sensor list' for the A1 I can't see the camera.

To Reproduce

  1. open device info A1
  2. look at the sensor list
  3. can't find the camera

Picture of the sensor list for the A1 mini: Home Assistant - A1 mini V2

Picture of the sensor list of the A1: Home Assistant - A1 no camera

Expected Behaviour

I would expect that the camera feed of the A1 is also available.

What device are you using?

A1

Diagnostic Output

Diagnostic extract A1:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.10.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.6.54-haos",
    "supervisor": "2024.10.3",
    "host_os": "Home Assistant OS 13.2",
    "docker_version": "27.2.0",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "bambu_lab": {
      "documentation": "https://github.com/greghesp/ha-bambulab",
      "version": "2.0.26",
      "requirements": [
        "httpx>=0.27.0"
      ]
    },
    "enphase_envoy": {
      "documentation": "https://www.home-assistant.io/integrations/enphase_envoy",
      "version": "0.1.3",
      "requirements": [
        "envoy-utils"
      ]
    },
    "fontawesome": {
      "documentation": "https://github.com/thomasloven/hass-fontawesome",
      "version": "2.2.3",
      "requirements": []
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "2.0.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "tapo_control": {
      "documentation": "https://github.com/JurajNyiri/HomeAssistant-Tapo-Control",
      "version": "5.6.3",
      "requirements": [
        "pytapo==3.3.32"
      ]
    },
    "webrtc": {
      "documentation": "https://github.com/AlexxIT/WebRTC",
      "version": "v3.6.0",
      "requirements": []
    },
    "kia_uvo": {
      "documentation": "https://github.com/Hyundai-Kia-Connect/kia_uvo",
      "version": "2.27.2",
      "requirements": [
        "hyundai_kia_connect_api==3.23.8"
      ]
    }
  },
  "integration_manifest": {
    "domain": "bambu_lab",
    "name": "Bambu Lab",
    "codeowners": [
      "greghesp",
      "AdrianGarside"
    ],
    "config_flow": true,
    "dependencies": [
      "device_automation",
      "ffmpeg",
      "mqtt"
    ],
    "documentation": "https://github.com/greghesp/ha-bambulab",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/greghesp/ha-bambulab/issues",
    "requirements": [
      "httpx>=0.27.0"
    ],
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.0.26",
    "is_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 4.2617961298674345e-05
    },
    "01J8PVRT1Y50WWQ6V6KDJ0CJTC": {
      "wait_import_platforms": -1.127937434008345,
      "wait_base_component": -0.003952939005102962,
      "config_entry_setup": 1.1708204770111479
    },
    "01JB6V23XFTY2YKRZ1Y4PRYK3J": {
      "wait_import_platforms": -1.169932983990293,
      "config_entry_setup": 1.194037361012306
    }
  },
  "data": {
    "config_entry": {
      "created_at": "2024-10-27T11:16:26.159286+00:00",
      "data": {
        "device_type": "A1",
        "serial": "**REDACTED**"
      },
      "discovery_keys": {},
      "disabled_by": null,
      "domain": "bambu_lab",
      "entry_id": "01JB6V23XFTY2YKRZ1Y4PRYK3J",
      "minor_version": 1,
      "modified_at": "2024-10-27T16:20:25.497184+00:00",
      "options": {
        "region": "Europe",
        "email": "**REDACTED**",
        "username": "**REDACTED**",
        "name": "Bassie A1",
        "host": "",
        "local_mqtt": false,
        "auth_token": "**REDACTED**",
        "access_code": "**REDACTED**",
        "usage_hours": 1.96
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "title": "**REDACTED**",
      "unique_id": null,
      "version": 2
    },
    "push_all": {
      "ipcam": {
        "ipcam_dev": "1",
        "ipcam_record": "enable",
        "timelapse": "disable",
        "resolution": "1080p",
        "tutk_server": "disable",
        "mode_bits": 3
      },
      "upload": {
        "status": "idle",
        "progress": 0,
        "message": ""
      },
      "nozzle_temper": 18.0625,
      "nozzle_target_temper": 0,
      "bed_temper": 18.28125,
      "bed_target_temper": 0,
      "chamber_temper": 5,
      "mc_print_stage": "1",
      "heatbreak_fan_speed": "0",
      "cooling_fan_speed": "0",
      "big_fan1_speed": "0",
      "big_fan2_speed": "0",
      "mc_percent": 0,
      "mc_remaining_time": 0,
      "ams_status": 0,
      "ams_rfid_status": 0,
      "hw_switch_state": 0,
      "spd_mag": 100,
      "spd_lvl": 2,
      "print_error": 0,
      "lifecycle": "product",
      "wifi_signal": "-39dBm",
      "gcode_state": "IDLE",
      "gcode_file_prepare_percent": "0",
      "queue_number": 0,
      "queue_total": 0,
      "queue_est": 0,
      "queue_sts": 0,
      "project_id": "0",
      "profile_id": "0",
      "task_id": "0",
      "subtask_id": "0",
      "subtask_name": "",
      "gcode_file": "",
      "stg": [],
      "stg_cur": 0,
      "print_type": "idle",
      "home_flag": 847005080,
      "mc_print_line_number": "0",
      "mc_print_sub_stage": 0,
      "sdcard": true,
      "force_upgrade": false,
      "mess_production_state": "active",
      "layer_num": 0,
      "total_layer_num": 0,
      "s_obj": [],
      "filam_bak": [],
      "fan_gear": 0,
      "nozzle_diameter": "0.4",
      "nozzle_type": "hardened_steel",
      "cali_version": 0,
      "upgrade_state": {
        "sequence_id": 0,
        "progress": "",
        "status": "",
        "consistency_request": false,
        "dis_state": 0,
        "err_code": 0,
        "force_upgrade": false,
        "message": "0%, 0B/s",
        "module": "",
        "new_version_state": 2,
        "cur_state_code": 0,
        "new_ver_list": []
      },
      "hms": [],
      "online": {
        "ahb": false,
        "rfid": false,
        "version": 499963484
      },
      "ams": {
        "ams": [
          {
            "id": "0",
            "humidity": "5",
            "temp": "0.0",
            "tray": [
              {
                "id": "0",
                "remain": 100,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFL03",
                "tray_type": "PLA",
                "tray_sub_brands": "",
                "tray_color": "FFFFFFFF",
                "tray_weight": "0",
                "tray_diameter": "0.00",
                "tray_temp": "0",
                "tray_time": "0",
                "bed_temp_type": "0",
                "bed_temp": "0",
                "nozzle_temp_max": "240",
                "nozzle_temp_min": "190",
                "xcam_info": "000000000000000000000000",
                "tray_uuid": "00000000000000000000000000000000",
                "ctype": 0,
                "cols": [
                  "FFFFFFFF"
                ]
              },
              {
                "id": "1",
                "remain": 100,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "9A18CA3A00000100",
                "tray_id_name": "A01-K1",
                "tray_info_idx": "GFA01",
                "tray_type": "PLA",
                "tray_sub_brands": "PLA Matte",
                "tray_color": "000000FF",
                "tray_weight": "1000",
                "tray_diameter": "1.75",
                "tray_temp": "55",
                "tray_time": "8",
                "bed_temp_type": "0",
                "bed_temp": "0",
                "nozzle_temp_max": "230",
                "nozzle_temp_min": "190",
                "xcam_info": "A4388813E803E803CDCC4C3F",
                "tray_uuid": "D9F5136C2BDE48E0B89C7426A086332A",
                "ctype": 0,
                "cols": [
                  "000000FF"
                ]
              },
              {
                "id": "2",
                "remain": 100,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFG99",
                "tray_type": "PETG",
                "tray_sub_brands": "",
                "tray_color": "FFFFFFFF",
                "tray_weight": "0",
                "tray_diameter": "0.00",
                "tray_temp": "0",
                "tray_time": "0",
                "bed_temp_type": "0",
                "bed_temp": "0",
                "nozzle_temp_max": "270",
                "nozzle_temp_min": "220",
                "xcam_info": "000000000000000000000000",
                "tray_uuid": "00000000000000000000000000000000",
                "ctype": 0,
                "cols": [
                  "FFFFFFFF"
                ]
              },
              {
                "id": "3"
              }
            ]
          }
        ],
        "ams_exist_bits": "1",
        "tray_exist_bits": "7",
        "tray_is_bbl_bits": "7",
        "tray_tar": "255",
        "tray_now": "255",
        "tray_pre": "255",
        "tray_read_done_bits": "7",
        "tray_reading_bits": "0",
        "version": 13,
        "insert_flag": true,
        "power_on_flag": true
      },
      "xcam": {
        "buildplate_marker_detector": true
      },
      "vt_tray": {
        "id": "254",
        "tag_uid": "0000000000000000",
        "tray_id_name": "",
        "tray_info_idx": "GFG98",
        "tray_type": "PETG-CF",
        "tray_sub_brands": "",
        "tray_color": "898989FF",
        "tray_weight": "0",
        "tray_diameter": "0.00",
        "tray_temp": "0",
        "tray_time": "0",
        "bed_temp_type": "0",
        "bed_temp": "0",
        "nozzle_temp_max": "270",
        "nozzle_temp_min": "240",
        "xcam_info": "000000000000000000000000",
        "tray_uuid": "00000000000000000000000000000000",
        "remain": 0,
        "k": 0.019999999552965164,
        "n": 1,
        "cali_idx": -1
      },
      "lights_report": [
        {
          "node": "chamber_light",
          "mode": "on"
        }
      ],
      "command": "push_status",
      "msg": 0,
      "sequence_id": "116"
    },
    "get_version": {
      "command": "get_version",
      "sequence_id": "0",
      "module": [
        {
          "name": "ota",
          "project_name": "N2S",
          "sw_ver": "01.03.01.02",
          "hw_ver": "OTA",
          "sn": "**REDACTED**",
          "flag": 3
        },
        {
          "name": "esp32",
          "project_name": "N2S",
          "sw_ver": "01.09.28.31",
          "hw_ver": "AP05",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "mc",
          "project_name": "N2S",
          "sw_ver": "00.00.27.18",
          "loader_ver": "00.00.00.32",
          "hw_ver": "MC02",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "th",
          "project_name": "N2S",
          "sw_ver": "00.00.07.69",
          "loader_ver": "00.00.00.26",
          "hw_ver": "TH01",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "ams_f1/0",
          "project_name": "",
          "sw_ver": "00.00.07.94",
          "loader_ver": "00.00.00.00",
          "ota_ver": "00.00.00.00",
          "hw_ver": "AMS_F102",
          "sn": "**REDACTED**",
          "flag": 0
        }
      ],
      "result": "success",
      "reason": ""
    }
  }
}

Diagnostic extract A1 mini:
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.10.4",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Amsterdam",
    "os_name": "Linux",
    "os_version": "6.6.54-haos",
    "supervisor": "2024.10.3",
    "host_os": "Home Assistant OS 13.2",
    "docker_version": "27.2.0",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "bambu_lab": {
      "documentation": "https://github.com/greghesp/ha-bambulab",
      "version": "2.0.26",
      "requirements": [
        "httpx>=0.27.0"
      ]
    },
    "enphase_envoy": {
      "documentation": "https://www.home-assistant.io/integrations/enphase_envoy",
      "version": "0.1.3",
      "requirements": [
        "envoy-utils"
      ]
    },
    "fontawesome": {
      "documentation": "https://github.com/thomasloven/hass-fontawesome",
      "version": "2.2.3",
      "requirements": []
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "2.0.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "tapo_control": {
      "documentation": "https://github.com/JurajNyiri/HomeAssistant-Tapo-Control",
      "version": "5.6.3",
      "requirements": [
        "pytapo==3.3.32"
      ]
    },
    "webrtc": {
      "documentation": "https://github.com/AlexxIT/WebRTC",
      "version": "v3.6.0",
      "requirements": []
    },
    "kia_uvo": {
      "documentation": "https://github.com/Hyundai-Kia-Connect/kia_uvo",
      "version": "2.27.2",
      "requirements": [
        "hyundai_kia_connect_api==3.23.8"
      ]
    }
  },
  "integration_manifest": {
    "domain": "bambu_lab",
    "name": "Bambu Lab",
    "codeowners": [
      "greghesp",
      "AdrianGarside"
    ],
    "config_flow": true,
    "dependencies": [
      "device_automation",
      "ffmpeg",
      "mqtt"
    ],
    "documentation": "https://github.com/greghesp/ha-bambulab",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/greghesp/ha-bambulab/issues",
    "requirements": [
      "httpx>=0.27.0"
    ],
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.0.26",
    "is_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 4.2617961298674345e-05
    },
    "01J8PVRT1Y50WWQ6V6KDJ0CJTC": {
      "wait_import_platforms": -1.127937434008345,
      "wait_base_component": -0.003952939005102962,
      "config_entry_setup": 1.1708204770111479
    },
    "01JB6V23XFTY2YKRZ1Y4PRYK3J": {
      "wait_import_platforms": -1.169932983990293,
      "config_entry_setup": 1.194037361012306
    }
  },
  "data": {
    "config_entry": {
      "created_at": "2024-09-26T09:49:35.166306+00:00",
      "data": {
        "device_type": "A1mini",
        "serial": "**REDACTED**"
      },
      "discovery_keys": {},
      "disabled_by": null,
      "domain": "bambu_lab",
      "entry_id": "01J8PVRT1Y50WWQ6V6KDJ0CJTC",
      "minor_version": 1,
      "modified_at": "2024-10-25T09:45:50.592495+00:00",
      "options": {
        "region": "Europe",
        "email": "**REDACTED**",
        "username": "**REDACTED**",
        "name": "Mini Bassie",
        "host": "192.168.2.153",
        "local_mqtt": false,
        "auth_token": "**REDACTED**",
        "access_code": "**REDACTED**",
        "usage_hours": 94.46000000000002
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "title": "**REDACTED**",
      "unique_id": null,
      "version": 2
    },
    "push_all": {
      "upgrade_state": {
        "sequence_id": 0,
        "progress": "",
        "status": "",
        "consistency_request": false,
        "dis_state": 0,
        "err_code": 0,
        "force_upgrade": false,
        "message": "0%, 0B/s",
        "module": "",
        "new_version_state": 2,
        "cur_state_code": 0,
        "new_ver_list": []
      },
      "ipcam": {
        "ipcam_dev": "1",
        "ipcam_record": "enable",
        "timelapse": "disable",
        "resolution": "1080p",
        "tutk_server": "disable",
        "mode_bits": 3
      },
      "upload": {
        "status": "idle",
        "progress": 0,
        "message": ""
      },
      "nozzle_temper": 17.53125,
      "nozzle_target_temper": 0,
      "bed_temper": 17.1875,
      "bed_target_temper": 0,
      "chamber_temper": 5,
      "mc_print_stage": "1",
      "heatbreak_fan_speed": "0",
      "cooling_fan_speed": "0",
      "big_fan1_speed": "0",
      "big_fan2_speed": "0",
      "mc_percent": 0,
      "mc_remaining_time": 0,
      "ams_status": 0,
      "ams_rfid_status": 0,
      "hw_switch_state": 0,
      "spd_mag": 100,
      "spd_lvl": 2,
      "print_error": 0,
      "lifecycle": "product",
      "wifi_signal": "-33dBm",
      "gcode_state": "IDLE",
      "gcode_file_prepare_percent": "0",
      "queue_number": 0,
      "queue_total": 0,
      "queue_est": 0,
      "queue_sts": 0,
      "project_id": "0",
      "profile_id": "0",
      "task_id": "0",
      "subtask_id": "0",
      "subtask_name": "",
      "gcode_file": "",
      "stg": [],
      "stg_cur": 0,
      "print_type": "idle",
      "home_flag": 847005072,
      "mc_print_line_number": "0",
      "mc_print_sub_stage": 0,
      "sdcard": true,
      "force_upgrade": false,
      "mess_production_state": "active",
      "layer_num": 0,
      "total_layer_num": 0,
      "s_obj": [],
      "filam_bak": [],
      "fan_gear": 0,
      "nozzle_diameter": "0.4",
      "nozzle_type": "hardened_steel",
      "cali_version": 0,
      "hms": [],
      "online": {
        "ahb": false,
        "rfid": false,
        "version": 258738006
      },
      "ams": {
        "ams": [],
        "ams_exist_bits": "0",
        "tray_exist_bits": "0",
        "tray_is_bbl_bits": "0",
        "tray_tar": "255",
        "tray_now": "255",
        "tray_pre": "255",
        "tray_read_done_bits": "0",
        "tray_reading_bits": "0",
        "version": 1,
        "insert_flag": true,
        "power_on_flag": false
      },
      "xcam": {
        "buildplate_marker_detector": true
      },
      "vt_tray": {
        "id": "254",
        "tag_uid": "0000000000000000",
        "tray_id_name": "",
        "tray_info_idx": "GFA01",
        "tray_type": "PLA",
        "tray_sub_brands": "",
        "tray_color": "FFFFFFFF",
        "tray_weight": "0",
        "tray_diameter": "0.00",
        "tray_temp": "0",
        "tray_time": "0",
        "bed_temp_type": "0",
        "bed_temp": "0",
        "nozzle_temp_max": "240",
        "nozzle_temp_min": "190",
        "xcam_info": "000000000000000000000000",
        "tray_uuid": "00000000000000000000000000000000",
        "remain": 0,
        "k": 0.019999999552965164,
        "n": 1,
        "cali_idx": 672
      },
      "lights_report": [
        {
          "node": "chamber_light",
          "mode": "on"
        }
      ],
      "command": "push_status",
      "msg": 0,
      "sequence_id": "15"
    },
    "get_version": {
      "command": "get_version",
      "sequence_id": "0",
      "module": [
        {
          "name": "ota",
          "project_name": "N1",
          "sw_ver": "01.03.01.02",
          "hw_ver": "OTA",
          "sn": "**REDACTED**",
          "flag": 3
        },
        {
          "name": "esp32",
          "project_name": "N1",
          "sw_ver": "01.09.28.31",
          "hw_ver": "AP07",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "mc",
          "project_name": "N1",
          "sw_ver": "00.00.27.21",
          "loader_ver": "00.00.00.32",
          "hw_ver": "MC02",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "th",
          "project_name": "N1",
          "sw_ver": "00.00.07.72",
          "loader_ver": "00.00.00.26",
          "hw_ver": "TH03",
          "sn": "**REDACTED**",
          "flag": 0
        }
      ],
      "result": "success",
      "reason": ""
    }
  }
}

Log Extracts

No response

Other Information

After the last updates (the issue that the connection was broken) the camera feed of the 'A1 mini' also says 'inactive', before that issue/update I didn't had this issue.

Now with the 'A1' I don't see the camera as a sensor in the list.

If you need any other data please ask and I can see what I can do.

The diagnostic fies as a file: A1mini-config_entry-bambu_lab-01J8PVRT1Y50WWQ6V6KDJ0CJTC.json A1-config_entry-bambu_lab-01JB6V23XFTY2YKRZ1Y4PRYK3J.json

AdrianGarside commented 6 days ago

In the diagnostic output for your A1 it shows that you never provided the required local IP address during printer setup:

      "options": {
        "region": "Europe",
        "email": "**REDACTED**",
        "username": "**REDACTED**",
        "name": "Bassie A1",
        "host": "", // THIS NEEDS YOUR PRINTER IP ADDRESS
        "local_mqtt": false,
        "auth_token": "**REDACTED**",
        "access_code": "**REDACTED**",
        "usage_hours": 1.96
      },

So that case is by design. Reconfigure the printer and provide the IP address.

The A1 mini shows that you did. Recent builds replaced the image sensor with a real camera sensor.

So: image is expected. Click it, settings and delete it. That sensor is gone.

This is the camera now: image

brauwers1981 commented 6 days ago

Hi @AdrianGarside, Thx for your help. After adding the IP address and restart it works!