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.43k stars 168 forks source link

Custom element doesn't exist: webrtc-camera #260

Open Dim3333 opened 2 years ago

Dim3333 commented 2 years ago

Hello,

Home Assistant 2022.2.6 Same issue that anothers posts : Custom element doesn't exist: webrtc-camera but I don't find the solution.

The integration seems to be well installed.

Could you help me ?

Thanks

Botond24 commented 2 years ago

You need to also add the WebRTC integration to home-assistant via the Integrations page.

Dim3333 commented 2 years ago

I'm stupid, ..... I forgot to do that ... now the card appears but connection refused

image

Same issue with VLC, snapshot is OK but rtsp is down. I use this link : rtsp://username:password@myip/av_stream/ch0

Dim3333 commented 2 years ago

I changed the rtsp port to 254 and it's works.

alexvenom commented 2 years ago

I'm running into this same problem: "Custom element doesn't exist: webrtc-camera".

Any thoughts?

slash133 commented 2 years ago

I have the same problem since my update on homeassistant, my integration is not loaded and i don t understand for why webrtc1 webrtc2

if you have ideas ? thks

fedemartino commented 2 years ago

same problem on version: 2022.3.0 image

any ideas?

BabaBoch1 commented 2 years ago

I am having the same issue when trying to setup a lovelace tile for eufy camera.

lolfonfire commented 2 years ago

I've been using this integration for some weeks now. Setup was easy but it's not stable. I'm not sure if this is due to Home Assistant updates or the integration itself. Yesterday I've updated Home Assistant to core-2022.3.3. After the Home Assistant update none of my cameras were visible in Lovelace. Error: Custom element doesn't exist: webrtc-camera

As shown in the following screenshot the integration is added/loaded. Sometimes when I press F5 the error is gone and cameras are visible. Last week I had a similar issue in the HA Companion app on Android. I needed to sign-out the HA app and sign-in again. Then the "Custom element doesn't exist: webrtc-camera" error was gone. This was before the update to core-2022.3.3. image

After pressing F5 a few more times it sometimes shows this: image

BabaBoch1 commented 2 years ago

I've been using this integration for some weeks now. Setup was easy but it's not stable. I'm not sure if this is due to Home Assistant updates or the integration itself. Yesterday I've updated Home Assistant to core-2022.3.3. After the Home Assistant update none of my cameras were visible in Lovelace. Error: Custom element doesn't exist: webrtc-camera

As shown in the following screenshot the integration is added/loaded. Sometimes when I press F5 the error is gone and cameras are visible. Last week I had a similar issue in the HA Companion app on Android. I needed to sign-out the HA app and sign-in again. Then the "Custom element doesn't exist: webrtc-camera" error was gone. This was before the update to core-2022.3.3. image

After pressing F5 a few more times it sometimes shows this: image

Same problem here. I gave up on this and deleted it all today.

Dim3333 commented 2 years ago

Hi,

None issues from my side with the last version of HA.

wowgamr commented 2 years ago

Same error for me after update to 2022.3.3.

MagellanOo commented 2 years ago

Same issue for me after performing the update to 2022.3.4.

wowgamr commented 2 years ago

In my case the problem resolved itself. Camera is working again. Didn't update or reboot anything. Magic!

jaegerschnitzel commented 2 years ago

I ca

I've been using this integration for some weeks now. Setup was easy but it's not stable. I'm not sure if this is due to Home Assistant updates or the integration itself. Yesterday I've updated Home Assistant to core-2022.3.3. After the Home Assistant update none of my cameras were visible in Lovelace. Error: Custom element doesn't exist: webrtc-camera

As shown in the following screenshot the integration is added/loaded. Sometimes when I press F5 the error is gone and cameras are visible. Last week I had a similar issue in the HA Companion app on Android. I needed to sign-out the HA app and sign-in again. Then the "Custom element doesn't exist: webrtc-camera" error was gone. This was before the update to core-2022.3.3. image

After pressing F5 a few more times it sometimes shows this: image

Same for me.

Mark612 commented 2 years ago

Using 'master', with the latest home assistant, sometimes it works. Sometimes it does not. Refresh and restarting sometimes helps.

lolfonfire commented 2 years ago

Yeah if i hit F5 like 5-6 times then suddenly it works. Then I close the webinterface/app when I open it again it's broken. Again hitting F5 and it works ...

fgonza2 commented 2 years ago

same issue here. In my Raspi based HA container doesnt work, on my NUC based HA container it works. 2022.3.4 version on both

WebRTC Camera "Not Loaded" on the integrations page

mortenmoulder commented 2 years ago

Chipping in to say I've got the same issue. "Not Loaded"

mishoboss commented 2 years ago

Same issue here. It's a strange one, because it seems to be random - sometimes it loads the card, sometimes it can't. More often it can't.

fedemartino commented 2 years ago

Anything we can do to help diagnose this? maybe there is a way to debug the error and help find the cause?

MercerK commented 2 years ago

Hi folks.

It looks like Home Assistant and GitHub are pointing to 2.1.0, instead of the latest version 2.2.0. This could be due to the way the author managed the release for the very last one (as it doesn't even show up in the releases list). If you have 2.1.0, you may be encountering this issue. I would recommend uninstalling that version and manually installing version 2.2.0 available here (https://github.com/AlexxIT/WebRTC/releases/tag/v2.2.0).

Once I did this, it started to work.

fgonza2 commented 2 years ago

Hi folks.

It looks like Home Assistant and GitHub are pointing to 2.1.0, instead of the latest version 2.2.0. This could be due to the way the author managed the release for the very last one (as it doesn't even show up in the releases list). If you have 2.1.0, you may be encountering this issue. I would recommend uninstalling that version and manually installing version 2.2.0 available here (https://github.com/AlexxIT/WebRTC/releases/tag/v2.2.0).

Once I did this, it started to work.

I can confirm that this FIXES the issue. Had to do manual install to 2.20 and it works! so the bug is on HACS installation

fedemartino commented 2 years ago

Hi folks. It looks like Home Assistant and GitHub are pointing to 2.1.0, instead of the latest version 2.2.0. This could be due to the way the author managed the release for the very last one (as it doesn't even show up in the releases list). If you have 2.1.0, you may be encountering this issue. I would recommend uninstalling that version and manually installing version 2.2.0 available here (https://github.com/AlexxIT/WebRTC/releases/tag/v2.2.0). Once I did this, it started to work.

I can confirm that this FIXES the issue. Had to do manual install to 2.20 and it works! so the bug is on HACS installation

This solved it! thanks!

Mark612 commented 2 years ago

Once I did this, it started to work.

Yes, this helps for web browsers. However, is it working for your mobile companion application? It is still problematic for me.

homeoneautomacao commented 2 years ago

here the problem is only on android app.... webrtc doesn´t exist...... on my PC with chrome is ok !! "Solution": remove de WiFi SSDI and Internal URL on android app.... using only external URL is fine now !!

I´m using 2.2.0 webrtc without hacs

georaspi commented 2 years ago

Once I did this, it started to work.

Yes, this helps for web browsers. However, is it working for your mobile companion application? It is still problematic for me.

Same issue here. Browser working ok, not on Android up though... A bit disappointed.

maximatchev commented 2 years ago

Once I did this, it started to work.

Yes, this helps for web browsers. However, is it working for your mobile companion application? It is still problematic for me.

Same issue here. Browser working ok, not on Android up though... A bit disappointed.

Same for me

AlexxIT commented 2 years ago

GitHub recently had a bug. That's where the latest release got lost (2.2.0).

You need:

wowgamr commented 2 years ago

Lovelace card still broken on v2.3.0 (in mobile app)

AlexxIT commented 2 years ago

@wowgamr what mobile OS do you use? What lovelace mode do you use?

wowgamr commented 2 years ago

Android 10 (MIUI 12). Home Assistant mobile app v2022.3.0-full

lovelace:
  mode: yaml

Card:

  - type: 'custom:webrtc-camera'
    url: 'rtsp://login:password@192.168.1.171:554/stream1'
    ui: true
    ptz:
      service: tapo_control.ptz
      data_left:
        entity_id: camera.tapo_c200_hd
        pan: LEFT
      data_right:
        entity_id: camera.tapo_c200_hd
        pan: RIGHT
      data_up:
        entity_id: camera.tapo_c200_hd
        tilt: UP
      data_down:
        entity_id: camera.tapo_c200_hd
        tilt: DOWN

image

AlexxIT commented 2 years ago

Oh. Lovelace mode yaml always have some problems

wowgamr commented 2 years ago

It worked fine for the few months, and broke after update to 2022.3. I think the problem is in HA.

homeoneautomacao commented 2 years ago

I did extensive testing on a newer version of HA and concluded that the "custom element doesn't exist:webrtc-camera" problem occurs when: 1) lovelace: yaml activated 2) only on HA version 2022.3.1 or higher (2022.2.9 with webrtc 2.2.0 works fine) 3) only on android or iphone app (Browser from PC works normal) Now I really don't know if the problem is in HA or Webrtc, but as all other integrations work normally, my first suspicion is, something has changed in HA in version 2022.3.1 that AlexxIT may need to make some modification on the webrtc side .

PS: I tested on 3 different servers, on all of them just disable lovelace:yaml and it works again. PS2: before only 2.2.0 with 2022.2.9 works.... now works with 2.3.0 as well

PROBLEM SOLVED !!! I just change lovelace:yaml to lovelace: storage..... i can still use lovelace on yaml files and the problem DISAPEARED !!

McDAlexander commented 2 years ago

Hi All. I ran into this problem and didn't have any luck manually copying over WebRTC into the custom-components folder. I also tried to copy the webrtc-camera.js into the root webrtc folder within custom-components.

What I did to solve my problem was look in HA Configurations -> Dashboards -> Resources and verified if the webrtc-camera.js resource was loaded. Turns out it was added and at the end of the resource there was "?v2.2.0" appended onto the end. I removed the ?v2.2.0 and the resource started working properly.

bigsem89 commented 2 years ago

i have same issue webrtc v.2.3.0, HA 2022.4.1

uncle-wong commented 2 years ago

Same for me WebRTC Camera "Not Loaded" on the integrations page v23.0

vks007 commented 2 years ago

Hi All. I ran into this problem and didn't have any luck manually copying over WebRTC into the custom-components folder. I also tried to copy the webrtc-camera.js into the root webrtc folder within custom-components.

What I did to solve my problem was look in HA Configurations -> Dashboards -> Resources and verified if the webrtc-camera.js resource was loaded. Turns out it was added and at the end of the resource there was "?v2.2.0" appended onto the end. I removed the ?v2.2.0 and the resource started working properly.

Thanks this worked for me too with v2.3.0 , I also removed the version from the end of the resource and it works - on browser , iOS app and Android app. Changed -> /webrtc/webrtc-camera.js?v2.3.0 To /webrtc/webrtc-camera.js

SvenBre commented 2 years ago

Is it perhaps possible that this problem has to do with the way AlexxIT is packaging the module? I noticed that the file webrtc-camera.js is in a subfolder of the integration folder, i.e. not where other community frontend modules are placing their js-files. As a user of Lovelace's yaml mode, I was pointing to that file from my configuration.yaml:

- url: /hacsfiles/webrtc/www/webrtc-camera.js type: module

It was working but I have seen the phenomenon discussed here: Several times a day, especially after restarting HA, the card got lost with "custom element doesn't exist". None of the solutions suggested here had worked or were what I wanted (switch to storage mode).

What I did yesterday is copying the files under "/custom_components/webrtc/www/" into a newly created folder "/www/community/webrtc/" (a softlink may also have worked and would be preferable) and pointed to that path in configuration.yaml:

- url: /hacsfiles/webrtc/webrtc-camera.js type: module

I don't know whether that makes any sense, but I haven't seen the phenomenon ever since. The card seems to be stable now. Is that working for other users too?

AlexxIT commented 2 years ago

Because this is not frontend integration. This is custom component.

SvenBre commented 2 years ago

Sure. But obviously something is causing trouble for yaml-mode users. I can meanwhile confirm my workaround. The problem hasn't occurred again in 4 days. Thanks, AlexxIT, for a wonderful integration!

AlexxIT commented 2 years ago

The right link to script is https://github.com/AlexxIT/WebRTC/blob/3e1099d65cf66ac7b7e1bcc787722f48f25c6bea/custom_components/webrtc/__init__.py#L74

No one should move this file to www folder or use /local link or use /hacsfiles link. It just work from its place with this link.

I think yaml users are just make problem for themselves with using yaml mode... Because default UI mode support configure UI via YAML and also handle links to external resources properly.

Smokeayelot commented 2 years ago

How do I remove this action off my device ?

Smokeayelot commented 2 years ago

How to remove this off my phone Simone put this and several More on my phone to spy and send them weird stuff how to remove this !?!?!!!

bigsem89 commented 2 years ago

The right link to script is

https://github.com/AlexxIT/WebRTC/blob/3e1099d65cf66ac7b7e1bcc787722f48f25c6bea/custom_components/webrtc/__init__.py#L74

No one should move this file to www folder or use /local link or use /hacsfiles link. It just work from its place with this link.

I think yaml users are just make problem for themselves with using yaml mode... Because default UI mode support configure UI via YAML and also handle links to external resources properly.

I'm using UI mode. The same issue. I've tried delete all file and reinstall integration. Nothing helps.

AlexxIT commented 2 years ago

@bigsem89 you need to have latest integration version (2.3). It should be installed and configured without any errors in Hass log

bigsem89 commented 2 years ago

@bigsem89 you need to have latest integration version (2.3). It should be installed and configured without any errors in Hass log

It 2.3... no errors in log

urielz commented 2 years ago

Is it perhaps possible that this problem has to do with the way AlexxIT is packaging the module? I noticed that the file webrtc-camera.js is in a subfolder of the integration folder, i.e. not where other community frontend modules are placing their js-files. As a user of Lovelace's yaml mode, I was pointing to that file from my configuration.yaml:

- url: /hacsfiles/webrtc/www/webrtc-camera.js type: module

It was working but I have seen the phenomenon discussed here: Several times a day, especially after restarting HA, the card got lost with "custom element doesn't exist". None of the solutions suggested here had worked or were what I wanted (switch to storage mode).

What I did yesterday is copying the files under "/custom_components/webrtc/www/" into a newly created folder "/www/community/webrtc/" (a softlink may also have worked and would be preferable) and pointed to that path in configuration.yaml:

- url: /hacsfiles/webrtc/webrtc-camera.js type: module

I don't know whether that makes any sense, but I haven't seen the phenomenon ever since. The card seems to be stable now. Is that working for other users too?

I can confirm that this solved the issue for me as well. Something is clearly broken. This fix, albeit temporary, works well.

webphantom115 commented 2 years ago

If I use HACS installation, I always get “Custom element doesn’t exist” error and no errors in log. Doesn’t matter what version, 2.3, 2.2, master etc If I use manual installation I see “Restart connection” for my camera and for Bunny stream. The error is “Error opening stream (ERRORTYPE_110, Operation timed out)”. In VLC both streams work fine

Unfortunately, have to uninstall (

arunoruto commented 2 years ago

Currently running version 2.3.1 and it was working for a short time and then I started getting the error. Using a few hints here, I tried to make a link using:

mkdir -p /config/www/community/webrtc-my
ln -s /config/custom_components/webrtc/www/webrtc-camera.js /config/www/community/webrtc-my/webrtc-camera.js

Then I added the following to my resources.yaml:

- url: /local/community/webrtc-my/webrtc-camera.js
  type: module

For now it works as it should! Hope this helps someone.