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

[Bug] Camera feed not updating #767

Open
vaderag opened this issue Nov 19, 2024 · 8 comments
Open

[Bug] Camera feed not updating #767

vaderag opened this issue Nov 19, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@vaderag
Copy link

vaderag commented Nov 19, 2024

Home Assistant Version

2024.11.2

Bambu Lab Integration Version

2.0.36

Describe the bug

My camera feed is static - I'm uncertain when it pulled the camera from (looks like my last print, so has worked at some point this update it would seem, tho this is the first time I've actually tried to use it since it moved from the snapshot version) but it's not updating or representing when the camera is moving.
Stream works fine in official bambu app

To Reproduce

View camera entity

image

Expected Behaviour

Camera stream should work

What device are you using?

P1S

Diagnostic Output

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.11.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "6.6.54-haos",
    "supervisor": "2024.11.2",
    "host_os": "Home Assistant OS 13.2",
    "docker_version": "27.2.0",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "alexa_media": {
      "documentation": "https://github.com/alandtse/alexa_media_player/wiki",
      "version": "4.13.8",
      "requirements": [
        "alexapy==1.29.4",
        "packaging>=20.3",
        "wrapt>=1.14.0"
      ]
    },
    "govee_lan": {
      "documentation": "https://github.com/wez/govee-lan-hass",
      "version": "1.0.0",
      "requirements": [
        "govee-led-wez>=0.0.15"
      ]
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "2.0.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "hildebrandglow_dcc": {
      "documentation": "https://github.com/HandyHat/ha-hildebrandglow-dcc",
      "version": "1.0.3",
      "requirements": [
        "pyglowmarkt==0.5.5"
      ]
    },
    "govee": {
      "documentation": "https://github.com/LaggAt/hacs-govee/blob/master/README.md",
      "version": "2023.11.1",
      "requirements": [
        "govee-api-laggat==0.2.2",
        "dacite==1.8.0"
      ]
    },
    "spook": {
      "documentation": "https://spook.boo",
      "version": "3.1.0",
      "requirements": []
    },
    "favicon": {
      "documentation": "https://github.com/thomasloven/hass-favicon",
      "version": "10.4",
      "requirements": []
    },
    "wiser": {
      "documentation": "https://github.com/asantaga/wiserHomeAssistantPlatform/blob/master/README.md",
      "version": "3.4.12",
      "requirements": [
        "aioWiserHeatAPI==1.5.19"
      ]
    },
    "smartthinq_sensors": {
      "documentation": "https://github.com/ollo69/ha-smartthinq-sensors",
      "version": "0.40.3",
      "requirements": [
        "pycountry>=23.12.11",
        "xmltodict>=0.13.0",
        "charset_normalizer>=3.2.0"
      ]
    },
    "eufy_security": {
      "documentation": "https://github.com/fuatakgun/eufy_security",
      "version": "8.0.4",
      "requirements": [
        "websocket-client==1.4.2",
        "aiortsp==1.3.7"
      ]
    },
    "spook_inverse": {
      "documentation": "https://spook.boo",
      "version": "3.1.0",
      "requirements": []
    },
    "bambu_lab": {
      "documentation": "https://github.com/greghesp/ha-bambulab",
      "version": "2.0.38",
      "requirements": [
        "cloudscraper"
      ]
    },
    "octopus_energy": {
      "documentation": "https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy",
      "version": "13.1.3",
      "requirements": []
    },
    "localtuya": {
      "documentation": "https://github.com/rospogrigio/localtuya/",
      "version": "5.2.1",
      "requirements": []
    },
    "nodered": {
      "documentation": "https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/custom_integration/",
      "version": "4.1.1",
      "requirements": []
    },
    "rooster_money": {
      "documentation": "https://github.com/pantherale0/ha-roostermoney",
      "version": "2023.9.1",
      "requirements": [
        "pyroostermoney==2023.9.1",
        "pytz"
      ]
    },
    "sonoff": {
      "documentation": "https://github.com/AlexxIT/SonoffLAN",
      "version": "3.8.1",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "presence_simulation": {
      "documentation": "https://github.com/slashback100/presence_simulation",
      "version": "4.10",
      "requirements": []
    }
  },
  "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": [
      "curl_cffi>=0.7.3"
    ],
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.0.36",
    "is_built_in": false,
    "overwrites_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 0.00012244703248143196
    },
    "cb3da52db35cde3a5258e99ee9a716bb": {
      "wait_import_platforms": -2.643583212979138,
      "config_entry_setup": 2.7649410227313638
    }
  },
  "data": {
    "config_entry": {
      "created_at": "1970-01-01T00:00:00+00:00",
      "data": {
        "device_type": "P1S",
        "serial": "**REDACTED**"
      },
      "discovery_keys": {},
      "disabled_by": null,
      "domain": "bambu_lab",
      "entry_id": "cb3da52db35cde3a5258e99ee9a716bb",
      "minor_version": 1,
      "modified_at": "2024-11-19T09:09:57.067679+00:00",
      "options": {
        "access_code": "**REDACTED**",
        "auth_token": "**REDACTED**",
        "email": "**REDACTED**",
        "host": "192.168.1.20",
        "local_mqtt": true,
        "name": "Bambu P1S",
        "region": "Europe",
        "usage_hours": 744.6599999999994,
        "username": "**REDACTED**"
      },
      "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": 1,
        "new_ver_list": []
      },
      "ipcam": {
        "ipcam_dev": "1",
        "ipcam_record": "enable",
        "timelapse": "enable",
        "resolution": "",
        "tutk_server": "disable",
        "mode_bits": 3
      },
      "upload": {
        "status": "idle",
        "progress": 0,
        "message": ""
      },
      "nozzle_temper": 219.8125,
      "nozzle_target_temper": 220,
      "bed_temper": 54.96875,
      "bed_target_temper": 55,
      "chamber_temper": 5,
      "mc_print_stage": "2",
      "heatbreak_fan_speed": "15",
      "cooling_fan_speed": "15",
      "big_fan1_speed": "11",
      "big_fan2_speed": "8",
      "mc_percent": 13,
      "mc_remaining_time": 711,
      "ams_status": 768,
      "ams_rfid_status": 2,
      "hw_switch_state": 1,
      "spd_mag": 100,
      "spd_lvl": 2,
      "print_error": 0,
      "lifecycle": "product",
      "wifi_signal": "-38dBm",
      "gcode_state": "RUNNING",
      "gcode_file_prepare_percent": "100",
      "queue_number": 0,
      "queue_total": 0,
      "queue_est": 0,
      "queue_sts": 0,
      "project_id": "166736173",
      "profile_id": "158783517",
      "task_id": "333517512",
      "subtask_id": "333517513",
      "subtask_name": "Mega Brick Santa (Remix) 10_1",
      "gcode_file": "Mega Brick Santa (Remix) 10_1.3mf",
      "stg": [
        2,
        14,
        1
      ],
      "stg_cur": 0,
      "print_type": "cloud",
      "home_flag": 23086511,
      "mc_print_line_number": "183561",
      "mc_print_sub_stage": 0,
      "sdcard": true,
      "force_upgrade": false,
      "mess_production_state": "active",
      "layer_num": 186,
      "total_layer_num": 2680,
      "s_obj": [],
      "filam_bak": [],
      "fan_gear": 9876223,
      "nozzle_diameter": "0.4",
      "nozzle_type": "stainless_steel",
      "cali_version": 0,
      "hms": [],
      "online": {
        "ahb": false,
        "rfid": false,
        "version": 2026671970
      },
      "ams": {
        "ams": [
          {
            "id": "0",
            "humidity": "3",
            "temp": "0.0",
            "tray": [
              {
                "id": "0",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_type": "PLA",
                "tray_sub_brands": "",
                "tray_color": "161616FF",
                "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": [
                  "161616FF"
                ]
              },
              {
                "id": "1",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "tray_type": "PLA",
                "tray_sub_brands": "",
                "tray_color": "F72323FF",
                "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": [
                  "F72323FF"
                ]
              },
              {
                "id": "2",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFL99",
                "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": "3",
                "remain": 40,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "6D646ADD00000100",
                "tray_id_name": "A09-Y0",
                "tray_info_idx": "GFA09",
                "tray_type": "PLA",
                "tray_sub_brands": "PLA Tough",
                "tray_color": "FEDB00FF",
                "tray_weight": "1000",
                "tray_diameter": "1.75",
                "tray_temp": "55",
                "tray_time": "8",
                "bed_temp_type": "2",
                "bed_temp": "0",
                "nozzle_temp_max": "230",
                "nozzle_temp_min": "190",
                "xcam_info": "D007D007E803E8039A99193F",
                "tray_uuid": "B64F8D3727974ECF9585495418ED557B",
                "ctype": 0,
                "cols": [
                  "FEDB00FF"
                ]
              }
            ]
          }
        ],
        "ams_exist_bits": "1",
        "tray_exist_bits": "f",
        "tray_is_bbl_bits": "f",
        "tray_tar": "1",
        "tray_now": "1",
        "tray_pre": "1",
        "tray_read_done_bits": "f",
        "tray_reading_bits": "0",
        "version": 3,
        "insert_flag": true,
        "power_on_flag": false
      },
      "vt_tray": {
        "id": "254",
        "tag_uid": "0000000000000000",
        "tray_id_name": "",
        "tray_info_idx": "GFU99",
        "tray_type": "TPU",
        "tray_sub_brands": "",
        "tray_color": "F95D73FF",
        "tray_weight": "0",
        "tray_diameter": "0.00",
        "tray_temp": "0",
        "tray_time": "0",
        "bed_temp_type": "0",
        "bed_temp": "0",
        "nozzle_temp_max": "250",
        "nozzle_temp_min": "200",
        "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": "2919"
    },
    "get_version": {
      "command": "get_version",
      "sequence_id": "2003",
      "module": [
        {
          "name": "ota",
          "project_name": "C12",
          "sw_ver": "01.06.01.02",
          "hw_ver": "OTA",
          "sn": "**REDACTED**",
          "flag": 3
        },
        {
          "name": "esp32",
          "project_name": "C12",
          "sw_ver": "01.08.27.62",
          "hw_ver": "AP04",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "mc",
          "project_name": "P1",
          "sw_ver": "00.00.26.61",
          "loader_ver": "00.00.00.23",
          "hw_ver": "MC07",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "th",
          "project_name": "P1",
          "sw_ver": "00.00.09.95",
          "loader_ver": "00.00.00.14",
          "hw_ver": "TH09",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "ams/0",
          "project_name": "",
          "sw_ver": "00.00.06.44",
          "loader_ver": "00.00.00.00",
          "ota_ver": "00.00.00.00",
          "hw_ver": "AMS08",
          "sn": "**REDACTED**",
          "flag": 0
        }
      ],
      "result": "success",
      "reason": ""
    }
  }
}

Log Extracts

2024-11-20 08:26:24.860 INFO (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] On Connect: Connected to printer
2024-11-20 08:26:25.070 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf78393fa1aa6c47failz3
2024-11-20 08:26:25.216 INFO (P1S-Watchdog-154) [custom_components.bambu_lab.pybambu] Watchdog thread started.
2024-11-20 08:26:25.226 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:25.226 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:25.280 INFO (MainThread) [homeassistant.components.sensor] Setting up bambu_lab.sensor
2024-11-20 08:26:26.230 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:26.231 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:26.910 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id 3008251550029153bf13
2024-11-20 08:26:27.238 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:27.239 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:28.245 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:28.246 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:29.252 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:29.252 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:29.690 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf48d9d0291651545fxf0j
2024-11-20 08:26:30.072 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf78393fa1aa6c47failz3
2024-11-20 08:26:30.258 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:30.258 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:31.263 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:31.264 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:31.907 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id 3008251550029153bf13
2024-11-20 08:26:32.268 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:32.269 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:33.356 INFO (MainThread) [custom_components.wiser.coordinator] Hub update completed for WiserHeat036EBA

Other Information

N/a

@vaderag vaderag added the bug Something isn't working label Nov 19, 2024
@AdrianGarside
Copy link
Collaborator

No errors in the logs? I’ll probably need debugs logs to have any hope of diagnosing this unless I get lucky and see it myself.

@vaderag
Copy link
Author

vaderag commented Nov 20, 2024

Sorry I thought I'd posted the logs. Anyway, must have been something strange/intermittent as I've just started a new print and it's working now!

@vaderag vaderag closed this as completed Nov 20, 2024
@vaderag vaderag reopened this Nov 20, 2024
@vaderag
Copy link
Author

vaderag commented Nov 20, 2024

Okay, tell a lie - it's just done it again on a new print. Showing a still from the last print...

I've captured some debug information so will stick that in the first post

2024-11-20 08:26:24.860 INFO (P1S-Mqtt-67) [custom_components.bambu_lab.pybambu] On Connect: Connected to printer
2024-11-20 08:26:25.070 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf78393fa1aa6c47failz3
2024-11-20 08:26:25.216 INFO (P1S-Watchdog-154) [custom_components.bambu_lab.pybambu] Watchdog thread started.
2024-11-20 08:26:25.226 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:25.226 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:25.280 INFO (MainThread) [homeassistant.components.sensor] Setting up bambu_lab.sensor
2024-11-20 08:26:26.230 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:26.231 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:26.910 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id 3008251550029153bf13
2024-11-20 08:26:27.238 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:27.239 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:28.245 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:28.246 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:29.252 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:29.252 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:29.690 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf48d9d0291651545fxf0j
2024-11-20 08:26:30.072 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id bf78393fa1aa6c47failz3
2024-11-20 08:26:30.258 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:30.258 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:31.263 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:31.264 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:31.907 WARNING (MainThread) [custom_components.localtuya.common] Missing device configuration for device_id 3008251550029153bf13
2024-11-20 08:26:32.268 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] A Chamber Image thread outer exception occurred:
2024-11-20 08:26:32.269 ERROR (P1S-Chamber-154) [custom_components.bambu_lab.pybambu] Exception. Type: <class 'ConnectionRefusedError'> Args: [Errno 111] Connection refused
2024-11-20 08:26:33.356 INFO (MainThread) [custom_components.wiser.coordinator] Hub update completed for WiserHeat036EBA

@cinghialino
Copy link

I was having the same issue, until I discovered that my router had changed the internal IP address of my printer, and while it was picking up the other sensors, the camera wouldn't be available.
I since then have updated the configuration in home assistant (and made sure to assign a static IP to my printer) and the problem went away.

@AdrianGarside
Copy link
Collaborator

@vaderag are you doing something else while the printer is printing that might be contributing to the repro (e.g. viewing the camera in Bambu Studio or Handy)?

I could do with more logging around but especially leading up to the log snippet you provided. The first line is already due to a reconnection to the printer being in progress - the question is why. It looks from the connection errors from the image capture thread that your printer might be rebooting. And it only tries to reconnect 10 times, once per second so if the printer won't accept the connection for >10s that would explain the observed symptoms as the mqtt connection attempts aren't bounded.

@vaderag
Copy link
Author

vaderag commented Dec 2, 2024

@vaderag are you doing something else while the printer is printing that might be contributing to the repro (e.g. viewing the camera in Bambu Studio or Handy)?

No, nothing - simply printing from my desktop and then trying to check the feed in HA.

I could do with more logging around but especially leading up to the log snippet you provided. The first line is already due to a reconnection to the printer being in progress - the question is why. It looks from the connection errors from the image capture thread that your printer might be rebooting. And it only tries to reconnect 10 times, once per second so if the printer won't accept the connection for >10s that would explain the observed symptoms as the mqtt connection attempts aren't bounded.

Could you tell me how I would get that and happy to provide... I turned on debug logging before I attempted to load the feed
The printer is definitely not rebooting by the time i try initiate the feed - I turn the printer off /on when it's not in use - I wonder if it's trying to initiate a feed in the background while that is happening?
All other values pull from the machine fine however - it's based on details from this integration that the plug turns off and that's been working fine

@drkpxl
Copy link

drkpxl commented Dec 5, 2024

I noticed this as well, I don't believe it's this plugin but a change to Home Assistant.

@Edivion
Copy link

Edivion commented Dec 11, 2024

I experience the same issues since a while. Unfortunately I cannot really pin it down to a specific update/time when this started to happen. The IP for my printer is already static so and I double checked it's correct.

I usually turn the printer on/off with a smart plug - just in case this might be a common thing.

Also if I reload this integration the camera feed works again each time.

Here's the diagnostics from just now (actively printing, reporting just fine but the camera is stuck from potentially before the print started and/or from yesterday even, the build plate is empty):

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.12.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.13.0",
    "docker": true,
    "arch": "x86_64",
    "timezone": "**REDACTED**",
    "os_name": "Linux",
    "os_version": "6.6.63-haos",
    "supervisor": "2024.11.4",
    "host_os": "Home Assistant OS 14.0",
    "docker_version": "27.2.0",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "dreame_vacuum": {
      "documentation": "https://github.com/Tasshack/dreame-vacuum",
      "version": "v2.0.0b16",
      "requirements": [
        "pillow",
        "numpy",
        "pybase64",
        "requests",
        "pycryptodome",
        "python-miio",
        "py-mini-racer",
        "paho-mqtt"
      ]
    },
    "uptime_kuma": {
      "documentation": "https://github.com/meichthys/uptime_kuma/blob/main/README.md",
      "version": "2.1.0",
      "requirements": [
        "pyuptimekuma-hass"
      ]
    },
    "spook": {
      "documentation": "https://spook.boo",
      "version": "3.1.0",
      "requirements": []
    },
    "browser_mod": {
      "documentation": "https://github.com/thomasloven/hass-browser_mod/blob/master/README.md",
      "version": "2.3.1",
      "requirements": []
    },
    "bermuda": {
      "documentation": "https://github.com/agittins/bermuda",
      "version": "0.7.2",
      "requirements": []
    },
    "bambu_lab": {
      "documentation": "https://github.com/greghesp/ha-bambulab",
      "version": "2.0.38",
      "requirements": [
        "cloudscraper"
      ]
    },
    "fontawesome": {
      "documentation": "https://github.com/thomasloven/hass-fontawesome",
      "version": "2.2.3",
      "requirements": []
    },
    "battery_notes": {
      "documentation": "https://andrew-codechimp.github.io/HA-Battery-Notes/",
      "version": "2.7.3",
      "requirements": []
    },
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "2.0.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "scheduler": {
      "documentation": "https://github.com/nielsfaber/scheduler-component",
      "version": "v0.0.0",
      "requirements": []
    },
    "spook_inverse": {
      "documentation": "https://spook.boo",
      "version": "3.1.0",
      "requirements": []
    },
    "icloud3": {
      "documentation": "https://gcobb321.github.io/icloud3_v3_docs/#/",
      "version": "3.1.3",
      "requirements": [
        "srp"
      ]
    }
  },
  "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": [
      "cloudscraper"
    ],
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.0.38",
    "is_built_in": false,
    "overwrites_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 4.077200003393955e-05
    },
    "01J481RK6WZG7C1SZ55DRRK207": {
      "wait_import_platforms": -6.540250398000012,
      "config_entry_setup": 6.566057820000026,
      "config_entry_platform_setup": 0.013592151000011654
    }
  },
  "data": {
    "config_entry": {
      "created_at": "1970-01-01T00:00:00+00:00",
      "data": {
        "device_type": "P1S",
        "serial": "**REDACTED**"
      },
      "discovery_keys": {},
      "disabled_by": null,
      "domain": "bambu_lab",
      "entry_id": "01J481RK6WZG7C1SZ55DRRK207",
      "minor_version": 1,
      "modified_at": "2024-12-11T07:10:52.847970+00:00",
      "options": {
        "access_code": "**REDACTED**",
        "auth_token": "**REDACTED**",
        "email": "**REDACTED**",
        "host": "10.100.1.173",
        "local_mqtt": true,
        "name": "**REDACTED**",
        "region": "**REDACTED**",
        "usage_hours": 490.63999999999896,
        "username": "**REDACTED**"
      },
      "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": 1,
        "cur_state_code": 1,
        "new_ver_list": [
          {
            "name": "ota",
            "cur_ver": "01.06.01.02",
            "new_ver": "01.07.00.00",
            "cur_release_type": 3,
            "new_release_type": 3
          },
          {
            "name": "ams/0",
            "cur_ver": "00.00.06.44",
            "new_ver": "00.00.06.49",
            "cur_release_type": 0,
            "new_release_type": 1
          }
        ]
      },
      "ipcam": {
        "ipcam_dev": "1",
        "ipcam_record": "enable",
        "timelapse": "enable",
        "resolution": "",
        "tutk_server": "disable",
        "mode_bits": 3
      },
      "upload": {
        "status": "idle",
        "progress": 0,
        "message": ""
      },
      "nozzle_temper": 255,
      "nozzle_target_temper": 255,
      "bed_temper": 69.96875,
      "bed_target_temper": 70,
      "chamber_temper": 5,
      "mc_print_stage": "2",
      "heatbreak_fan_speed": "15",
      "cooling_fan_speed": "1",
      "big_fan1_speed": "0",
      "big_fan2_speed": "10",
      "mc_percent": 41,
      "mc_remaining_time": 245,
      "ams_status": 768,
      "ams_rfid_status": 2,
      "hw_switch_state": 1,
      "spd_mag": 100,
      "spd_lvl": 2,
      "print_error": 83935249,
      "lifecycle": "product",
      "wifi_signal": "-48dBm",
      "gcode_state": "RUNNING",
      "gcode_file_prepare_percent": "100",
      "queue_number": 0,
      "queue_total": 0,
      "queue_est": 0,
      "queue_sts": 0,
      "project_id": "184071082",
      "profile_id": "174491434",
      "task_id": "369145648",
      "subtask_id": "369145649",
      "subtask_name": "untitled_project",
      "gcode_file": "untitled_project.3mf",
      "stg": [
        2,
        14,
        1
      ],
      "stg_cur": 0,
      "print_type": "cloud",
      "home_flag": 23085615,
      "mc_print_line_number": "278102",
      "mc_print_sub_stage": 0,
      "sdcard": true,
      "force_upgrade": false,
      "mess_production_state": "active",
      "layer_num": 133,
      "total_layer_num": 647,
      "s_obj": [],
      "filam_bak": [],
      "fan_gear": 11796505,
      "nozzle_diameter": "0.4",
      "nozzle_type": "hardened_steel",
      "cali_version": 0,
      "hms": [],
      "online": {
        "ahb": false,
        "rfid": false,
        "version": 56031193
      },
      "ams": {
        "ams": [
          {
            "id": "0",
            "humidity": "2",
            "temp": "0.0",
            "tray": [
              {
                "id": "0",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "CA4C56FD00000100",
                "tray_id_name": "A00-D2",
                "tray_info_idx": "GFA00",
                "tray_type": "PLA",
                "tray_sub_brands": "PLA Basic",
                "tray_color": "D1D3D5FF",
                "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": "803E803E8403E8030000803F",
                "tray_uuid": "468E6D0851174E6F8ED529B8BEF8AC7E",
                "ctype": 0,
                "cols": [
                  "D1D3D5FF"
                ]
              },
              {
                "id": "1",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "103E932F00000100",
                "tray_id_name": "G00-K0",
                "tray_info_idx": "GFG00",
                "tray_type": "PETG",
                "tray_sub_brands": "PETG Basic",
                "tray_color": "000000FF",
                "tray_weight": "1000",
                "tray_diameter": "1.75",
                "tray_temp": "65",
                "tray_time": "8",
                "bed_temp_type": "2",
                "bed_temp": "0",
                "nozzle_temp_max": "270",
                "nozzle_temp_min": "220",
                "xcam_info": "803E803E2003E8033333333F",
                "tray_uuid": "A83F624BBCC748EA8B941BD6FFBF0D1D",
                "ctype": 0,
                "cols": [
                  "000000FF"
                ]
              },
              {
                "id": "2",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "2CE6AB3900000100",
                "tray_id_name": "G00-W0",
                "tray_info_idx": "GFG00",
                "tray_type": "PETG",
                "tray_sub_brands": "PETG Basic",
                "tray_color": "FFFFFFFF",
                "tray_weight": "1000",
                "tray_diameter": "1.75",
                "tray_temp": "65",
                "tray_time": "8",
                "bed_temp_type": "2",
                "bed_temp": "70",
                "nozzle_temp_max": "270",
                "nozzle_temp_min": "220",
                "xcam_info": "D007D007E803E803CDCC4C3F",
                "tray_uuid": "8A4468C4B10C48ED9FAC50FA2BD6175E",
                "ctype": 0,
                "cols": [
                  "FFFFFFFF"
                ]
              },
              {
                "id": "3",
                "remain": -1,
                "k": 0.019999999552965164,
                "n": 1,
                "cali_idx": -1,
                "tag_uid": "0000000000000000",
                "tray_id_name": "",
                "tray_info_idx": "GFA00",
                "tray_type": "PLA",
                "tray_sub_brands": "",
                "tray_color": "000000FF",
                "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": [
                  "000000FF"
                ]
              }
            ]
          }
        ],
        "ams_exist_bits": "1",
        "tray_exist_bits": "f",
        "tray_is_bbl_bits": "f",
        "tray_tar": "2",
        "tray_now": "2",
        "tray_pre": "2",
        "tray_read_done_bits": "f",
        "tray_reading_bits": "0",
        "version": 3,
        "insert_flag": true,
        "power_on_flag": false
      },
      "vt_tray": {
        "id": "254",
        "tag_uid": "0000000000000000",
        "tray_id_name": "",
        "tray_info_idx": "GFU01",
        "tray_type": "TPU",
        "tray_sub_brands": "",
        "tray_color": "F930F3FF",
        "tray_weight": "0",
        "tray_diameter": "0.00",
        "tray_temp": "0",
        "tray_time": "0",
        "bed_temp_type": "0",
        "bed_temp": "0",
        "nozzle_temp_max": "250",
        "nozzle_temp_min": "200",
        "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": "3900"
    },
    "get_version": {
      "command": "get_version",
      "sequence_id": "0",
      "module": [
        {
          "name": "ota",
          "project_name": "C12",
          "sw_ver": "01.06.01.02",
          "hw_ver": "OTA",
          "sn": "**REDACTED**",
          "new_ver": "01.07.00.00",
          "flag": 15
        },
        {
          "name": "esp32",
          "project_name": "C12",
          "sw_ver": "01.08.27.62",
          "hw_ver": "AP04",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "mc",
          "project_name": "P1",
          "sw_ver": "00.00.26.61",
          "loader_ver": "00.00.00.23",
          "hw_ver": "MC07",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "th",
          "project_name": "P1",
          "sw_ver": "00.00.09.95",
          "loader_ver": "00.00.00.14",
          "hw_ver": "TH09",
          "sn": "**REDACTED**",
          "flag": 0
        },
        {
          "name": "ams/0",
          "project_name": "",
          "sw_ver": "00.00.06.44",
          "loader_ver": "00.00.00.00",
          "ota_ver": "00.00.00.00",
          "hw_ver": "AMS08",
          "sn": "**REDACTED**",
          "new_ver": "00.00.06.49",
          "flag": 4
        }
      ],
      "result": "success",
      "reason": ""
    }
  }
}

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

5 participants