Video stream not working when accessing webrtc card remotely (outside LAN)
Version 1.2.0, rpi3B+ with hassio.
When iam in the lan it works great. When iam accessing my hassio from the outside (through duckdns) it doesn't connect with any camera or it gives false 'connected' with no video or audio.
It worked both ways with a previous version though.
Read FAQ about external access
Not sure if it has to do with this error
ERROR (MainThread) [frontend.js.latest.202104073] https://xxx.duckdns.org/webrtc/webrtc-camera.js:334:22 NotSupportedError: Cannot define multiple custom elements with the same tag name
when im accessing the lovelace with 3 webRTC cards from outside lan. It works great within lan.
When there's only one webRTC card then it works inside or outside the lan.
What is your browser and component version?
Tested on iphone with hassio app, google chrome, safari also on imac with google chrome and safari. Same behaviour/error when im accessing hassio through 4G or a different network and the lovelace contains more than one custom:webrtc card. Lovelace with a single webrtc card works as expected through 4G/ different network. Lovelace with a single or more webrtc cards works as expected localy.
Ok, remove and add again component in Integrations GUI
Yes, did that once again. Here's the interesting thing... cameras that reside in my 'home' network return this error when im trying to access them with webRTC from the outside (through the internet).
Logger: frontend.js.latest.202104073 Source: components/system_log/init.py:190 First occurred: 6:50:25 μ.μ. (1 occurrences) Last logged: 6:50:25 μ.μ.
https://xxx.duckdns.org/webrtc/webrtc-camera.js:355:22 NotSupportedError: Cannot define multiple custom elements with the same tag name
Even if it's a single card or the lovelace has many webrtc cards.
The demo video or the rtsp stream of a remote camera work with webrtc whether I ask access localy or through the internet.
not sure if it's relevant. Monitoring traffic with nettop in terminal.app I've noticed that when webrtc is in use through google chrome udp4 ports in use range randomly from 51000 to 62000 When inside local network , it doesnt really matter since access is local BUT when accessing it remotely I think it's lost somewhere since udp port range 50000 - 50039 (for 4 webrtc cams) is out of reach.
And I believe opening a wide range of ports , for example udp4: 50000 - 62000 to 192.168.1.xxx is not a good practice which didn't work either for remote access btw.
I have the exact same issue, I setup the integration to use a UDP port range 60000-60040 for 4 cameras. It works fine on the internal network, but once I put my iphone on the the internet it fails. When I monitor my firewall, I can see my iphone attempting to connect to random high UDP ports on my WAN's interface. I have tried re-installing the webrtc integration, reloading HA, no luck. It seems like the port range setting has no effect.
Not sure if it matters, I am running pfsense and use HAproxy to to access HASS. HAproxy is doing SSL offload. Any help would be appreciated.
Check my new project. It has solution for external access https://github.com/AlexxIT/go2rtc
Unsubscribe
On Sun, Aug 21, 2022, 7:58 AM Alex X @.***> wrote:
Closed #26 https://github.com/AlexxIT/WebRTC/issues/26 as completed.
— Reply to this email directly, view it on GitHub https://github.com/AlexxIT/WebRTC/issues/26#event-7227609718, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENNBYGAS4DTAZMQNCCII3TV2IKVBANCNFSM43LIOEDQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>