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

WebRTC Camerastream does not load on one of my devices #732

Open
Pirol62 opened this issue Jul 26, 2024 · 20 comments
Open

WebRTC Camerastream does not load on one of my devices #732

Pirol62 opened this issue Jul 26, 2024 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@Pirol62
Copy link

Pirol62 commented Jul 26, 2024

  • Today I installed the component an run it successfully with two reolink E1 Outdoor cameras.
  • On one notebook and all my android devices, the custom webrtc camera works great.
  • Only on one of my devices, an older HP Elite notebook, the card does not load the stream.
  • Restart of HA, the notebook and the frontend did not solve the issue
  • The camera works with picture-glance card.

image

--HA 2027.6.4

@Pirol62 Pirol62 changed the title WebRTC does not loead only on one of my devices WebRTC Camerastream does not load on one of my devices Jul 26, 2024
@wavelov3r
Copy link

wavelov3r commented Aug 3, 2024

+1
I have 3 android devices and 2 iphones.
Two of the three androids are the same phone, one works and the other doesn't. On the third android it works. For the two ios, neither works. My sister said she has denied permission for a "permanent URL", but she couldn't tell me exactly. I uninstalled companion app and looked in the settings, but I can't figure out

@iJuiceman
Copy link

I have the same issue with my Reolink PoE Doorbell. Every few days it just stops. I have 9 cameras working on webRTC and only the Reolink has issues. Nothing in the logs, it just stops. I have worked out that if I stop and start the webRTC addon it fixes the problem. The rest of my cameras are Unifi and have not been an issue.

@AlexxIT AlexxIT added the question Further information is requested label Sep 3, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 3, 2024

Show card's config and stream info from go2rtc WebUI for active stream.

@Mytonn
Copy link

Mytonn commented Oct 14, 2024

type: custom:webrtc-camera
url: rtsp://username:[email protected]:554/live/0/MAIN

doesnt work with 3.6.0 but works fine on old version.

@bastionbot
Copy link

WebRTC 3.6.0 cameras don't load in the Android companion app but will load on the same device using the browser.
version 2024.9.4-full
io.homeassistant.companion.android

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 20, 2024

Posts like "worked before and doesn't work now" don't provide anything useful for diagnosing the problem.
There could be dozens of different reasons. Different cameras, different camera protocols, different viewing modes, different card settings, different browsers, different network setup and more.

go2rtc has good debugging features. Web interface, logs of different levels. You need to start with the stream info from WebUI. Then you can increase the level of logs and study them. Or attach the results here.

@bastionbot
Copy link

bastionbot commented Oct 20, 2024

I use the same dashboard on the mobile app and via the web.

type: custom:webrtc-camera
entity: camera.garage_mainstream

When I access the dashboard in the Home Assistant app, the camera card remains a broken image with "Loading...". If I use a web browser (mobile or desktop) the feeds load correctly.

I turned on debug logging for the integration and this was the result when trying to access via the app:

2024-10-20 14:00:28.607 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': <snip>', 'entity': 'camera.garage_mainstream'}

The same logging, using a browser:

2024-10-20 14:06:30.296 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': '<snip>', 'entity': 'camera.garage_mainstream'}
2024-10-20 14:06:30.341 DEBUG (webrtc) [custom_components.webrtc.utils] 14:06:30.340 INF [streams] create new stream url=rtsp://user:pass@ip:554/11
2024-10-20 14:06:30.362 DEBUG (webrtc) [custom_components.webrtc.utils] 14:06:30.362 INF [streams] create new stream url=rtsp://user:pass@ip:554/11

Home Assistant versions:
Core 2024.10.3
Supervisor 2024.10.2
Operating System 13.2
Frontend 20241002.3

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 20, 2024

Well. One user has problems with url: rtsp://... and another with entity: camera....
So this part of the setting is not related to the problem.

@bastionbot
Copy link

bastionbot commented Oct 20, 2024

Mine are RTSP cameras as well, they're just added in Home Assistant as Generic Camera first. Go2RTC seems like it's working fine, just for whatever reason the companion app isn't getting a stream and I'm not sure what additional logging is available to diagnose.

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 20, 2024

This is probably a classic mobile app cache problem. And it saved the old version of the card.

@bastionbot
Copy link

I thought so too, but the issue persists after clearing the cache and data. I will see if it is resolved once 2024.10.4 is available on the app store.

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 21, 2024

You need to check stream info when stream opens in mobile browser. And stream info when stream opens in hass app.

@bastionbot
Copy link

Browser:
garage_camera.json

App:
garage_camera2.json

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 21, 2024

Nothing special. Simple codecs H264+PCMA.
You needs to increase go2rtc log level to trace and check difference between browser and app connections.

@bastionbot
Copy link

App:

12:00:58.747 PM	trace	[api] GET /api/ws?src=rtsp://<user>:<pass>@<dvr>:554/11&name=camera.garage_mainstream 127.0.0.1:60526
12:00:58.885 PM	trace	undefined error=websocket: close 1000 (normal) caller=github.com/AlexxIT/go2rtc/internal/api/ws/ws.go:124

Browser:
trace.log

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 22, 2024

Ok. Probably the mobile app is crashing on executing JavaScript. Tell me the exact version of the mobile app. And exact version of mobile OS.

@AlexxIT AlexxIT added bug Something isn't working and removed question Further information is requested labels Oct 22, 2024
@AlexxIT AlexxIT self-assigned this Oct 22, 2024
@bastionbot
Copy link

bastionbot commented Oct 23, 2024

Home Assistant Companion:
2024.10.3-full (the update from 2024.9.4-full didn't fix it)

Android 14

Android security update:
September 5, 2024

Google Play system update:
September 1, 2024

Kernel version:
5.15.137-android14-11

Build:
AP2A.240905.003

@ddanielww
Copy link

same issue on android 14, players on other devices fine but not the android tablet.

@pjj108
Copy link

pjj108 commented Nov 19, 2024

I'm running HASSIO 11.2 and utilizing the new integrated WebRTC feature to connect my Dahua camera. It functions flawlessly on the Edge browser of my Windows PC and on Sidekick on my iMac. However, I encounter numerous issues on my iPad Pro 10.5". In the HA app, the WebRTC camera view intermittently pauses or displays a black screen, restarts the view, shows an error message, and occasionally works. On the Safari/Edge browsers on the iPad, the behavior is somewhat similar but seems slightly more stable. Despite clearing the Safari cache and restarting the iPad, there are no significant changes in behavior.

@RyanEwen
Copy link

I'm running HASSIO 11.2 and utilizing the new integrated WebRTC feature to connect my Dahua camera. It functions flawlessly on the Edge browser of my Windows PC and on Sidekick on my iMac. However, I encounter numerous issues on my iPad Pro 10.5". In the HA app, the WebRTC camera view intermittently pauses or displays a black screen, restarts the view, shows an error message, and occasionally works. On the Safari/Edge browsers on the iPad, the behavior is somewhat similar but seems slightly more stable. Despite clearing the Safari cache and restarting the iPad, there are no significant changes in behavior.

I am not sure it's relevant to this thread, but I have the same behaviour. HA app on iPad Pro actually loses connection to HA sometimes and has to be killed. But this is using the new built-in go2rtc and Picture Glance cards. So like I said, probably not the right place - but I wanted to +1 that anyway

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

10 participants