Realtime camera streaming without any delay - WebRTC

The lovelace card is fairly reliable with a single card/camera (~85% success rate)… but the streams become less likely to load the more I duplicate things out (2, 3, 4, etc. cards).

Just with 2 cards for example, it loads ~40% the time, and the following error often shows up in console -

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

Also a lot of times 1 of X cards will load, but the rest will not.

1 Like

Hi @xAPPO
Card is not displaying, i’m juste having a black card.
url http://192.168.0.42:8083 is working

debugger show:

With just one stream, card loads just fine. But very often after a while it just stops updating, image freezes and comes back live when you reload the page or refresh lovelace. I appreciate the effort, but as for now it is not very reliable :slight_smile:

Hi,

OUTSTANDING WORK !!!

But I really can’t figure how to make this card work.

I installed your addon and i get the feed of my cameras with no delay in the addon in ingress.

I uploaded the 3 js files to my config/www/lovelace-webrtc-card folder

The three files are accessible from outside home assistant

And I did add the URL in the ressources tab in lovelace dashboards.

This is the error i get :

/local/lovelace-webrtc-card/lovelace-webrtc-card.js?v=0.1:7:1 Uncaught SyntaxError: Unexpected token ‘<’

Any clues on how to solve this ?

Fix for install problems and for backup size in version 0.2.0

2 Likes

You will be able to fix the addon based on Alexxit, can’t install. Thanks.

I managed to get your card working in Chrome on windows but when I try to view it on an android tablet or via the home assistant app on sumsung s8 the image doesn’t render.

If I go back to AlexxIT’s repo then I can view the cameras using the webui.

I like this, the zero lag is a game changer for me. Just need to get it working on my tablets :slight_smile:

Use https for homeassistant and the WebRTC add-on. The WebRTC add-on is served with http. You can setup an nginx reverse proxy to serve it using https.

I am accessing my home assitant instance over HTTPS on port 8123 using DuckDNS addon. Could someone help me how can I setup nginx reverse proxy to be able to access the RTSPWebRTC addon on port 8083 on HTTPS. Or I am also interested about a more simple solution if there is any.
My goal is to use the lovelace card of @mals but it is blocked because it is served over HTTP.

Why no one read docs :slight_smile:
Port 8083 will not helps you. Video data sends via 50000-50009 UDP ports.
Nginx and HTTPS can’t handle this data.
You should port forward this port range on your router.

Thanks for your reply @AlexxIT. Your AddOn works fluently for me. Many thanks again for your efforts.
I have problem with the lovelace card created by @mals. It would be great to use WebRTC stream on a lovelace card, but I cannot, because of the SSL problem, I mentioned above.

Absolute gamechanger!
Tried both lovelace cards. @mals is the one I use. Because it is easier to install. The one from @olijouve is also working, but causes sometimes 100% cpu load on the webrtc instance.

But all of you did a great job. Hopefully this will be integrated to homeassistant natively.

Edit: Vote for my feature request Integrate webrtc-streamer for superb camera performance

4 Likes

Are your lovelace cards showing up on an Android tablet or using the homeassistant app?
I’ve got it working in Chrome on PC but no luck with any mobile device so far.

1 Like

It does on a android tablet. But not on my smartphone.
But I use the card inside a Popup, need to test it as a normal card.

Same here with my wall mounted Android Tablet version 5.0.2 (SDK 21). Lovelace Card is not yet working but I try to load directly http://n.n.n.n:8083. The page is loaded but without a video stream.
Newer devices have no issue.

Hey all. I rewrited addon to custom component. It means now it works not only with Hass.io, but also with Docker, venv and Windows. And now it has Lovelace card.

You need stop addon, because they can’t work together. And you need clean your browser cache to find new lovelace card in cards list

14 Likes

Wow, big news! Thanks Alexey!

You’re the best! No idea how this works on my Huawei tablet now but it does! Normal WebRTC isn’t able to run on it so IDK what type of wizardry you did, but I’m not complaining.

Thank you so much :+1: . It’s working with my old Android 5 Tablet and Fully Remote Browser.

1 Like

did you mean Fully Kiosk Browser? I tried it on my Amazon Fire tablet but it crashed.

Yes, big news!
Had a lot of trouble to view my UniFi G3 Flex (standalone) camera in Lovelace without high latency and not to drop off from the UI (drop off was the biggest problem). Tried @scstraus solutions I tried all the camera platforms so you don't have to (not Live555Proxy or ONVIF)

But this WebRTC component seems to be very stable!