home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.73k stars 30.85k forks source link

Generic RTSP Camera stopped working since 2024.11 #130036

Open kozfelipe opened 1 week ago

kozfelipe commented 1 week ago

The problem

My cam stopped working since 2024.11. I can confirm the upgrade is the issue since I rolled it back to check. It seems it is being forced to act as WebRTC

What version of Home Assistant Core has the issue?

2024.11.0

What was the last working version of Home Assistant Core?

2024.10.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Generic Cam

Diagnostics information

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.11.0",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "aarch64",
    "timezone": "America/Sao_Paulo",
    "os_name": "Linux",
    "os_version": "6.6.31-haos-raspi",
    "supervisor": "2024.11.2",
    "host_os": "Home Assistant OS 13.2",
    "docker_version": "27.2.0",
    "chassis": "embedded",
    "run_as_root": true
  },
  "data": {
    "title": "192_168_0_6",
    "data": {},
    "options": {
      "stream_source": "rtsp://192.168.0.6/****",
      "rtsp_transport": "tcp",
      "authentication": "basic",
      "username": "**REDACTED**",
      "password": "**REDACTED**",
      "framerate": 2.0,
      "verify_ssl": false,
      "content_type": "image/jpeg",
      "limit_refetch_to_url_change": false
    }
  }
}

Anything in the logs that might be useful for us?

Logger: homeassistant.components.stream.stream.camera.192_168_0_6
Source: components/stream/__init__.py:448
integration: Stream (documentation, issues)
First occurred: 9:49:57 AM (8 occurrences)
Last logged: 9:54:39 AM

Error from stream worker: Error opening stream (ERRORTYPE_1, Operation not permitted, rtsp://****:****@192.168.0.6/user=admin_password=****_channel=1_stream=0.sdp)
Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:448
First occurred: 9:49:48 AM (1 occurrences)
Last logged: 9:49:48 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/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 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/generic/config_flow.py", line 513, in get
    image = await _async_get_image(
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 233, in _async_get_image
    raise HomeAssistantError("Unable to get image")
homeassistant.exceptions.HomeAssistantError: Unable to get image
Logger: homeassistant
Source: helpers/entity.py:987
First occurred: 9:49:48 AM (1 occurrences)
Last logged: 9:49:48 AM

Error doing job: Exception in callback Stream._async_update_state(True) (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/components/stream/__init__.py", line 378, in _async_update_state
    self._update_callback()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 906, in async_write_ha_state
    super().async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in async_write_ha_state
    self._async_verify_state_writable()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 987, in _async_verify_state_writable
    raise NoEntitySpecifiedError(
homeassistant.exceptions.NoEntitySpecifiedError: No entity id specified for entity preview
Logger: homeassistant.components.stream.stream.camera.192_168_0_6
Source: components/stream/__init__.py:448
integration: Stream (documentation, issues)
First occurred: 5:58:31 PM (4 occurrences)
Last logged: 5:59:36 PM

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input, rtsp://****:****@192.168.0.6/user=admin_password=*****_channel=1_stream=0.sdp)
Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused, rtsp://****:****@192.168.0.6/user=admin_password=a*****_channel=1_stream=0.sdp)

Additional information

image

home-assistant[bot] commented 1 week ago

Hey there @hunterjm, @uvjustin, @allenporter, mind taking a look at this issue as it has been labeled with an integration (stream) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `stream` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign stream` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


stream documentation stream source (message by IssueLinks)

joostlek commented 1 week ago

What camera do you have?

kozfelipe commented 1 week ago

ESCAM QF002

kozfelipe commented 1 week ago

After a while, the images returned on their own, but now they are gone again. I didn't have this behavior in the previous version

kozfelipe commented 1 week ago

It is working on Edge and Android Companion so it might be a Chrome issue in this version.

I am getting 403 forbidden in Chrome while in Edge I get 200 OK (from service worker) at /api/camera_proxy/camera.192_168_0_6

image

luca-angemi commented 1 week ago

+1.

Works on companion ios in my case but not on Chrome nor edge

kozfelipe commented 1 week ago

seems like the cache from previous version was holding these failed requests. clearing cache fix it

GoldenEyes78 commented 1 week ago

I have same problem since last update, before that the cameras were working fine always. Maybe we need to wait for home assistant to update. home assistant even on my android phone the cameras not working.

GoldenEyes78 commented 6 days ago

Anyone get a solution for this problem, my cameras still not working.

luca-angemi commented 6 days ago

Still an issue for me as well

GoldenEyes78 commented 6 days ago

The only thing I did to fix the problem is restore a core backup for Oct and this fixed the problem temporarily till update again in Dec.

kozfelipe commented 5 days ago
Failed to start WebRTC stream: webrtc: streams: wrong response on DESCRIBE, exec/rtsp
[rtsp @ 0x7f94590000] method DESCRIBE failed: 404 Not Found
[in#0 @ 0x7f94812b00] Error opening input: Server returned 404 Not Found
Error opening input file rtsp://127.0.0.1:18554/camera.192_168_0_6_orginal?audio.
Error opening input files: Server returned 404 Not Found
GoldenEyes78 commented 5 days ago
Failed to start WebRTC stream: webrtc: streams: wrong response on DESCRIBE, exec/rtsp
[rtsp @ 0x7f94590000] method DESCRIBE failed: 404 Not Found
[in#0 @ 0x7f94812b00] Error opening input: Server returned 404 Not Found
Error opening input file rtsp://127.0.0.1:18554/camera.192_168_0_6_orginal?audio.
Error opening input files: Server returned 404 Not Found

Try to do same as I did, restore the Oct core update. Working perfect now