greghesp / ha-bambulab

A Home Assistant Integration for Bambu Lab Printers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] X1C camera feed intermittent to not working

capsel22 opened this issue · comments

Describe the bug

I've received new X1C and I am having issues with the camera feed. It's almost never working. Sometimes it works for 2-3sec and gets forever stuck, sometimes it just shows black screen. Reboot of the printer rarely fixes it.
I have tried toggling the live view off/on and regenerating the access code and re-adding the integration.

I also have P1S and the camera feed is bullet-proof.
Bambu handy and studio work as intended.

the debug log is flooded with
ERROR (stream_worker) [homeassistant.components.stream.stream.camera.x1c_00m09a372901852_camera] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://:@192.168.1.125:322/streaming/live/1

To Reproduce

  1. Got to the integration
  2. Open camera feed
  3. Black screen or stuck on a single frame

Expected Behaviour

Hopefully to work and show the feed.

What device are you using?

X1C

Diagnostic Output

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.3.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "6.6.20-haos",
    "supervisor": "2024.03.0",
    "host_os": "Home Assistant OS 12.1",
    "docker_version": "24.0.7",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "webrtc": {
      "version": "v3.5.1",
      "requirements": []
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "bambu_lab": {
      "version": "2.0.15",
      "requirements": []
    },
    "nodered": {
      "version": "3.1.3",
      "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",
    "ssdp": [
      {
        "st": "urn:bambulab-com:device:3dprinter:1"
      }
    ],
    "version": "2.0.15",
    "is_built_in": false
  },
  "data": {
    "config_entry": {
      "entry_id": "2515ff4d4aca64c3cad5536a29d8e7e3",
      "version": 2,
      "minor_version": 1,
      "domain": "bambu_lab",
      "title": "**REDACTED**",
      "data": {
        "device_type": "X1C",
        "serial": "**REDACTED**"
      },
      "options": {
        "region": "Europe",
        "email": "**REDACTED**",
        "username": "**REDACTED**",
        "name": "X1C",
        "host": "192.168.1.125",
        "local_mqtt": false,
        "auth_token": "**REDACTED**",
        "access_code": "**REDACTED**",
        "usage_hours": 28.330000000000002
      },
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },
    "push_all": {
      "command": "gcode_line",
      "reason": "SUCCESS",
      "result": "SUCCESS",
      "return_code": "150",
      "sequence_id": "2122"
    },
    "get_version": {
      "command": "get_version",
      "module": [
        {
          "hw_ver": "",
          "name": "ota",
          "sn": "",
          "sw_ver": "01.07.02.00"
        },
        {
          "hw_ver": "AP05",
          "name": "rv1126",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.28.55"
        },
        {
          "hw_ver": "TH09",
          "name": "th",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.07.12"
        },
        {
          "hw_ver": "MC07",
          "name": "mc",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.22.37/00.00.22.37"
        },
        {
          "hw_ver": "",
          "name": "xm",
          "sn": "",
          "sw_ver": "00.01.02.02"
        },
        {
          "hw_ver": "AMS08",
          "name": "ams/0",
          "sn": "**REDACTED**",
          "sw_ver": "00.00.06.40"
        }
      ],
      "sequence_id": "0"
    }
  }
}

Log Extracts

No response

Other Information

Screenshot_2024-03-21-20-47-40-14_c3a231c25ed346e59462e84656a70e50

I have the same issue. 1 week ago everything works well, but now the camera feed is not working anymore. I use the X1e. Thanks for your support.

commented

I just got this installed and both of my X1C's show "Camera Unavailable" even though camera works fine.
image
image

See #453 for suggestions how to make the extremely unreliable rtsp feed off the X1 somewhat reliable for use.

I switched 5 times my Bambulab on/off. Now it works, I dont know how long.....

For me, I think that Bambu Studio are messing the the "LAN mode LiveView" setting under Settings - General. I have found it to be ticked off several times. Might be a bug in firmware? I am using the latest X1C FW.
Anyhow - The camera works great for me, after enabling the LAN Mode LiveView toggle.
Ive made a PR to update the documentation with this instruction. I missed it and had to tinker quite a bit until I found that this setting needs to enabled for the video stream to be presented to the LAN.

Indeed, enabling LAN mode LiveView in the printer settings made the camera work

What I found best to get the camera working for X1C is:

  1. Enable Lan Mode View
  2. Reset the Access Code
  3. Add HA Integration via cloud and add your Printer's IP and Access code after selecting connect to printer localy
  4. Restart Printer

Since following this steps the Camera is rock solid on my HA.