Custom element doesn't exist: webrtc-camera

Hi,
I think I have read all of the posts on this topic and I spent hours trying to get this to work, but now comes a time I have to ask for help.
I have the g2rtc version 1.9.7 installed
In HACS, I have added webrtc-camera and I have restarted HA
and under Settings → Dashboards → resources, I have added “hacsfiles/webrtc-camera/webrtc-camera.js” as a JavaScript module and I have restarted HA again

I have cleared my browser
and when I try to add a custom card like this:
type: ‘custom:webrtc-camera’
url: ‘rtsp://rtsp:[email protected]:554/av_stream/ch0’
I get Custom element doesn’t exist: webrtc-camera

When I browse directly to: http://192.168.x.y:8123/hacsfiles/webrtc-camera/webrtc-camera.js, I do see the JS file.
But Lovelace can’t find it.

HA versions

  • Core: 2025.4.4
  • Supervisor: 2025.04.0
  • Frontend: 20250411.0

Any tips are greatly appreciated,
thanks,
/chriV

Hi, you have used both installation methods at the same time.

It’s either via HACS or manual by copying the file and creating the reference to the resource.

Hi Nick,
thank you for your reply
Well, in the end, yes, I used both methods… in an attempt to get Lovelace to recognize/find/process the JS file.
I have a bit of an a-typical setup, and I must admit that Idon’t fully understand what I’m doing

As a reference, the custom:button-card works fine, so I made sure the webrtc-camera files were (also) in the same location. But that didn’t help.
I also gave the files 777 permissions.

I have the following files

pi@raspberrypi:~ $ find  /usr/share/hassio/homeassistant/ | grep  button-card
/usr/share/hassio/homeassistant/www/button-card.js
/usr/share/hassio/homeassistant/www/community/button-card
/usr/share/hassio/homeassistant/www/community/button-card/button-card.js.gz
/usr/share/hassio/homeassistant/www/community/button-card/button-card.js
find: ‘/usr/share/hassio/homeassistant/volumes/influxdb/data/wal’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/influxdb/data/data/_internal’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/performance_schema’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/homeassdb’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/mysql’: Permission denied

pi@raspberrypi:~ $ find  /usr/share/hassio/homeassistant/ | grep  webrtc-cam
/usr/share/hassio/homeassistant/www/community/webrtc-camera
/usr/share/hassio/homeassistant/www/community/webrtc-camera/webrtc-camera.js
/usr/share/hassio/homeassistant/www/webrtc-camera.js
find: ‘/usr/share/hassio/homeassistant/volumes/influxdb/data/wal’/usr/share/hassio/homeassistant/custom_components/webrtc/www/webrtc-camera.js
: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/influxdb/data/data/_internal’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/performance_schema’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/homeassdb’: Permission denied
find: ‘/usr/share/hassio/homeassistant/volumes/mariadb/config/databases/mysql’: Permission denied
pi@raspberrypi:~ $ 

Further suggestions (from anyone) are always appreciated.
thanks
/chriV