AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.55k stars 183 forks source link

EDIT: 3.x broke mobile access using nabucasa and HO Mobile #418

Open Claudio1L opened 1 year ago

Claudio1L commented 1 year ago

HI I'm having this issue:

with Nabucasa and 3.x update, images stuck in loading2 using webrtc-card on Android mobile. Using RTC only. It works with Apple in the same conditions. No significant logs. Just black screen. Going back to 2.3.1 works perfectly.

Tried multiple times with different 4g conditions and different device. Works with wifi but also there, very often, one or two card stuck in loading in a page where there are 4.

Following an example of the webrtc card config:

type: custom:webrtc-camera entity: camera.cam_strada mode: webrtc ui: true background: true

Any advice? Have you devices in similar condition (Nabu+Android+RTC) ?

Claudio1L commented 1 year ago

definitively 2.3.1 seems smoother also on iphone

AlexxIT commented 1 year ago

WebRTC on Android is no different from iPhone. You may have a different 4G network configuration. I guess you did not set up external access for WebRTC? Have you read docs? FAQ?

Claudio1L commented 1 year ago

ok, thanks.

I read everything related I found, also outside the official docs, but I was not able to solve. I did some more tests, instead, and I think is something related to my mobile operator. The issue is the same with any iphone and any android. At the time of the previous question I didn't swap sims. With the operator "HO mobile" works till 2.3.1, not 3.x. With "TIM" works 3.x also. Consistently. Any advice on what I can check? Tested both webrtc and MSE

PablaV commented 1 year ago

Try removing mode: webrtc from your card config and restart HA and the addon and see if that helps. I am experiencing issues when I set mode: webrtc so that could be the case for you too.

Claudio1L commented 1 year ago

Upgraded again to 3.0.2, removed mode: webrtc. no changes, same issue. There is something different between 3.x and 2.x that the mobile operator is filtering. TCP/UDP ports? no idea

AlexxIT commented 1 year ago

https://github.com/AlexxIT/WebRTC/issues/378

Claudio1L commented 1 year ago

378

yes thanks, already seen. There is nothing I can use to solve. If it's a simmetric nat issue of the mobile operator, it should work at least with MSE+android, instead nothing. There is something else

AlexxIT commented 1 year ago

Check if MSE works for you in LAN. MSE may not work for some buggy cameras.

Claudio1L commented 1 year ago

yes

immagine immagine

the first one is an hikvision, the second one is a reolink camera

in Lan and via TIM 4G connections everything working, from desktop (firefox+Macos), android and iphone.

AlexxIT commented 1 year ago

So can you describe again your issue?

Claudio1L commented 1 year ago

sure.

basically, with 3.x black screen with HO Mobile regardless the device or the protocol I try to use. without significant logs.

Claudio1L commented 1 year ago

of course, for me 2.3.1 is perfect. The only concern is about issues with future HA releases

Dc1975 commented 1 year ago

Hello, i have a similar problem. Maybe i can attach it to this, but i am not using Nabucasa.

HA Mobile App in my WLan => No Stream HA Mobile Browser in my WLan => Stream HA Desktop Browser in my Lan => Stream

HA Mobile App with 4G => No Stream HA Mobile Browser with 4G => Stream

The system configuration is: Home Assistant 2023.7.2 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest

The card configuration is: type: custom:webrtc-camera url: rtsp://user:pw@IP:554/h264Preview_01_sub webrtc: true

I have changed webrtc true/false and url/entity in every condition with the same result described above.

grafik