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
74.09k stars 31.1k forks source link

go2rtc, rtsp cam issue after Core upgrade to 2024.11.1 #130306

Open SlawNow opened 2 weeks ago

SlawNow commented 2 weeks ago

The problem

I have observed a problem with displaying the live view from the rtsp camera after upgrading the core to 2024.11.1 After switching to the card with the camera view, the live image from the camera appears for a few seconds but after a while it disappears. I returned to the 2024.10.4 backup as a test and then the view from the live camera is displayed seamlessly all the time without problems

What version of Home Assistant Core has the issue?

2024.11.1

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 Camera

Link to integration documentation on our website

https://www.home-assistant.io/integrations/generic/

Diagnostics information

home-assistant_generic_2024-11-10T20-01-47.044Z.log

Example YAML snippet

show_state: false
show_name: false
camera_view: live
type: picture-entity
entity: camera.kamerapodworko

Anything in the logs that might be useful for us?

Rejestrator: homeassistant.components.go2rtc.server
Źródło: components/go2rtc/server.py:151
integracja: go2rtc (dokumentacja, Problemy)
Pierwsze zdarzenie: 20:14:06 (43 zdarzenia)
Ostatnio zalogowany: 20:49:13

20:39:02.973 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:230 > error="read tcp 127.0.0.1:18554->127.0.0.1:37906: i/o timeout"
20:39:13.337 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:170 > error="read tcp 127.0.0.1:43342->127.0.0.1:18554: i/o timeout" url=rtsp://127.0.0.1:18554/camera.kamerapodworko_orginal
20:39:13.363 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:170 > error="read tcp 127.0.0.1:43344->127.0.0.1:18554: i/o timeout" url=rtsp://127.0.0.1:18554/camera.kameraschody_orginal
20:49:03.538 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:230 > error="read tcp 127.0.0.1:18554->127.0.0.1:42372: i/o timeout"
20:49:13.925 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:170 > error="read tcp 127.0.0.1:51202->127.0.0.1:18554: i/o timeout" url=rtsp://127.0.0.1:18554/camera.kameraschody_orginal

Additional information

No response

home-assistant[bot] commented 2 weeks ago

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

Code owner commands Code owners of `generic` 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 generic` 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)


generic documentation generic source (message by IssueLinks)

dodgydd commented 2 weeks ago

Exactly the same issue experienced here.

davet2001 commented 2 weeks ago

Possibly related to #130202

doron1 commented 2 weeks ago

Same issue here. A few rtsp cam streams on a dashboard, used to provide full video (in a picture-entity card) through 2024.10.x. Now provides a few seconds and then stops.

tekelectron commented 2 weeks ago

Same issue here, out of 4 cameras I have 2 don't work since upgrading.

However, I have noticed that it does work on the sub stream.

I'm using HIK cameras and a generic PT camera. For Hik this stream does not work anymore:

rtsp://admin:12345678@192.168.0.203:554/Streaming/channels/401

But this link when modified in the Generic Camera integration to be the substream, it loads fine:

rtsp://admin:12345678@192.168.0.203:554/Streaming/channels/402

Also, using the Hik integration instead of the Generic Camera I see a similar issue, it does load the image but at around 1 frame every 2 seconds. I'm wondering if this is something to do with the RTSP to WebRTC conversion as opposed to the Generic Camera integration.

Thanks

netbox123 commented 2 weeks ago

same here, after 2 seconds the camera feed stops working:

Logger: homeassistant.components.websocket_api.http.connection Source: components/go2rtc/init.py:262 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 21:00:00 (1 occurrences) Last logged: 21:00:00

[140147096051072] Error handling message: Unknown error (unknown_error) netbox from 192.168.0.234 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Safari/605.1.15) Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/go2rtc_client/exceptions.py", line 56, in _func return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/go2rtc_client/rest.py", line 124, in add await self._client.request( File "/usr/local/lib/python3.12/site-packages/go2rtc_client/rest.py", line 60, in request resp.raise_for_status() File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1157, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url='http://localhost:11984/api/streams?name=camera.192_168_0_16&src=rtsp://127.0.0.1:18554/camera.192_168_0_16_orginal&src=ffmpeg:camera.192_168_0_16_orginal%23audio%3Dopus'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/camera/webrtc.py", line 263, in ws_webrtc_offer await camera.async_handle_async_webrtc_offer(offer, session_id, send_message) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 666, in async_handle_async_webrtc_offer await self._webrtc_provider.async_handle_async_webrtc_offer( File "/usr/src/homeassistant/homeassistant/components/go2rtc/init.py", line 262, in async_handle_async_webrtc_offer await self._rest_client.streams.add( File "/usr/local/lib/python3.12/site-packages/go2rtc_client/exceptions.py", line 66, in _func raise Go2RtcClientError from exc go2rtc_client.exceptions.Go2RtcClientError

Andrew-Rayand commented 2 weeks ago

Возникла та же самая проблема после обновления

stevegroom commented 1 week ago

Same here - using Periscope Pro on a retired iPad mini.

doron1 commented 1 week ago

Issue still here with core 2024.11.2

Andrew-Rayand commented 1 week ago

Issue still here with core 2024.11.2

Подтверждаю, что проблема сохраняется после загрузки нового обновления 2024.11.2. Объект камеры отображается в статичном режиме (картинка), однако после загрузки потока картинка перестает отображаться Screenshot_2024-11-21-12-39-57-636-edit_io homeassistant companion android Screenshot_2024-11-21-12-40-26-002-edit_io homeassistant companion android

fqz-1015 commented 1 week ago

The same thing happened here.

using IMOU VERSA camera IPC-C22FN-C

https://www.imou.com/la/product/detail/versa

either it does not work or after a few seconds the camera transmission stops working.

I tried tekelectron's recommendation

before: rtsp://admin:passw@192.167.1.184:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

when modified in the generic camera integration to be the sub transmission, it loads fine: now: rtsp://admin:passw@192.167.1.184:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

works, again updates the image every 10 seconds and streams live video and audio when clicked.

thanks tekelectron and HA community.

stevegroom commented 1 week ago

Just tried editing the dashboard

Option Live shows the text 'Preview of the camera. X' Changing to option auto shows a black screen (it's completely dark out, so not sure if that is working). VLC shows the same though.

image

What happens if you set option Auto?

Andrew-Rayand commented 6 days ago

Who uses the ycc365 camera and generic camera integration - it helped by changing the RSTP server address to: rtsp://admin:123456@192.x.x.x:554 After the change, the camera began to display correctly. Authentication settings have not been entered.