ha-bambulab
ha-bambulab copied to clipboard
[Bug] EXTERNAL: Error opening camera streams due to X1 firmware issues
Describe the bug
Camera streams stopped working and I see this error in the logs:
2023-09-19 21:17:18.749 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.x1c_****_camera] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://****:****@192.168.1.168/streaming/live/1
Camera streams time out:
They were working before when I first set up the integration.
To Reproduce
Install integration and add devices. Eventually the streams just stop loading.
Expected Behaviour
Camera stream loads
What device are you using?
X1C
Firmware Version
01.06.03.00
Home Assistant Version
2023.9.2
Component Version
1.5.0
Log Extracts
2023-09-19 21:17:18.749 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.x1c__camera] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://:***@192.168.1.168/streaming/live/1
Other Information
I don't see any other errors in the logs. Is there anything else I can do to help debug?
Has the IP of your printer changed by any chance?
Has the IP of your printer changed by any chance?
No, I checked and the IPs of all the printers are still the same. All of the other sensors are working properly (I'm assuming those would be broken too, if the IP changed?).
Ah yeah you're right. I got the logic mixed up with something else I did.
Can you access the stream via VLC?
Hello,
I have the same problem.
Error from stream worker: Error opening stream (EXIT, Immediate exit requested) rtsps://:@us.mqtt.bambulab.com/streaming/live/1
Ohhh ok, I know the cause of this now. The URL is populated from the config flow, not the MQTT. Will revert
Thank you for your work !
Can you try the latest pre-release please: https://github.com/greghesp/ha-bambulab/releases/tag/v1.7.1-dev1
Hello,
Still does not work.
Tried to install locally, without success.
I am attaching error logs, but I am not sure that they correspond to this problem.
Logger: aiohttp.server Source: custom_components/bambu_lab/camera.py:64 Integration: Bambu Lab (documentation, issues) First occurred: 18:10:13 (2 occurrences) Last logged: 18:11:23
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 763, in get return await self.handle(request, camera) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 803, in handle stream = await camera.handle_async_mjpeg_stream(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 624, in handle_async_mjpeg_stream return await self.handle_async_still_stream(request, self.frame_interval) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 612, in handle_async_still_stream return await async_get_still_stream( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 280, in async_get_still_stream img_bytes = await image_cb() ^^^^^^^^^^^^^^^^ File "/config/custom_components/bambu_lab/camera.py", line 76, in async_camera_image stream_source = await self.stream_source() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bambu_lab/camera.py", line 64, in stream_source url = URL(self.coordinator.get_model().camera.rtsp_url).with_user('bblp').with_password( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yarl/_url.py", line 835, in with_user raise ValueError("user replacement is not allowed for relative URLs") ValueError: user replacement is not allowed for relative URLs
Hello,
Still does not work.
Tried to install locally, without success.
I am attaching error logs, but I am not sure that they correspond to this problem.
Logger: aiohttp.server Source: custom_components/bambu_lab/camera.py:64 Integration: Bambu Lab (documentation, issues) First occurred: 18:10:13 (2 occurrences) Last logged: 18:11:23
Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 763, in get return await self.handle(request, camera) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 803, in handle stream = await camera.handle_async_mjpeg_stream(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 624, in handle_async_mjpeg_stream return await self.handle_async_still_stream(request, self.frame_interval) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 612, in handle_async_still_stream return await async_get_still_stream( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 280, in async_get_still_stream img_bytes = await image_cb() ^^^^^^^^^^^^^^^^ File "/config/custom_components/bambu_lab/camera.py", line 76, in async_camera_image stream_source = await self.stream_source() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bambu_lab/camera.py", line 64, in stream_source url = URL(self.coordinator.get_model().camera.rtsp_url).with_user('bblp').with_password( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yarl/_url.py", line 835, in with_user raise ValueError("user replacement is not allowed for relative URLs") ValueError: user replacement is not allowed for relative URLs
Oops, minor issue. New dev release: https://github.com/greghesp/ha-bambulab/releases/tag/v1.7.1-dev2
You might need to reload the integration
Hello, I can't find the version on HACS.
Hello, I can't find the version on HACS.
Have you go the Beta toggle ticked?
Yes, i see v1.7.1-dev1
Yes, i see v1.7.1-dev1
Odd. I just checked my production instance and it's there. Maybe try toggling it? Sometimes its in the drop-down, but you have to select off if and then back into it for it to select
I will try to uninstall completely and download again
No, it doesn't appear
Ahhhh, I'd created the tag but not the release. Oops! Try again now
Upload the file directly to home assistant, unfortunately it still doesn't work
Logger: homeassistant.components.stream.stream.camera.x1c_00m09a371200619_camera Source: components/stream/init.py:434 Integration: Stream (documentation, issues) First occurred: 21:30:52 (7 occurrences) Last logged: 21:34:22
Error from stream worker: Error opening stream (PROTOCOL_NOT_FOUND, Protocol not found) ://bblp:edc1d6f5@disable
Now i see, i test
Oh - you don't have RTSP enabled on your printer. After the @ sign in that URL should have the IP address, but its reporting disabled instead
My fault, I forgot to reactivate live. It works, thank you very much! Beautiful evening
Seems I've also got the same issue as OP
2023-10-01 11:19:06.584 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.x1c_00m00a280103660_camera] Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://****:****@192.168.1.64/streaming/live/1
I'm not sure this is an issue with the integration, as VLC cannot access the stream either.
@bubbleytea - Have you got Timelapse on? I've never had this issue before, and I've just turned timelapse on and now have this issue
Hello,
New problem it seems, my timelaps is activate
Logger: homeassistant.components.stream.stream.camera.x1c_00m09a371200619_camera Source: components/stream/init.py:434 Integration: Stream (documentation, issues) First occurred: 12:39:31 (5 occurrences) Last logged: 12:42:02
Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://:@192.168.68.140/streaming/live/1 Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://:@192.168.68.140/streaming/live/1 Error from stream worker: Error opening stream (PROTOCOL_NOT_FOUND, Protocol not found) ://bblp:edc1d6f5@disable
Error from stream worker: Error opening stream (PROTOCOL_NOT_FOUND, Protocol not found) ://bblp:edc1d6f5@disable
This looks like it's been disabled again
Reactivate..., this printer likes to play jokes on me...
Logger: homeassistant.components.stream.stream.camera.x1c_00m09a371200619_camera Source: components/stream/init.py:434 Integration: Stream (documentation, issues) First occurred: 12:46:29 (1 occurrences) Last logged: 12:46:29
Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://:@192.168.68.140/streaming/live/1
I'm also getting this issue as well. It's nothing to do with HA from what I can tell, as I'm also unable to access the stream from VLC. Must be a bug in the firmware
Re-added IP fix up workaround: #299
Re-added IP fix up workaround: #299
I've applied the fix to my copy of the component but it's still showing me the same error as @IIDemoniaKII has:
Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://****:****@192.168.0.136/streaming/live/1
Re-added IP fix up workaround: #299
I've applied the fix to my copy of the component but it's still showing me the same error as @IIDemoniaKII has:
Error from stream worker: Error opening stream (ERRORTYPE_5, I/O error) rtsps://****:****@192.168.0.136/streaming/live/1
Double check that its enabled on your printer. This error is the printer not returning a stream, usually because its disabled
Lan View is enabled - I was just playing with the local instance of Bambu Studio and figured out I can get a cloud stream on demand by running bambu_source and piping it into ffmpeg which is what the studio does. bambu_source takes a token from a file called url.txt which I presume is populated from some API call the studio does.
Printer is in cloud mode - integration is connected using cloud mode as well