Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Can't get URL for camera #287

Closed
b0rrasca opened this issue Feb 27, 2022 · 23 comments
Closed

ERROR: Can't get URL for camera #287

b0rrasca opened this issue Feb 27, 2022 · 23 comments

Comments

@b0rrasca
Copy link

Describe the bug
After following setup instructions and creating a card using the sample yaml provided at the bottom, I get the error above when I try to stream video.

To Reproduce
Steps to reproduce the behavior:
-Create lovelace card using example yaml provided
-Change entity names
-While still in edit mode, watch as the second card appears below and shows the error message

Expected behavior
Video should start streaming

Hardware Information about Home Assistant
Running Home Assistant 2022.2.9 in docker using a raspberry pi 4 (bullseye).

Hardware Information about Cameras

  • Wired 2K doorbell (T8200)
  • Live Streaming Protocol: P2p, as this model does not support rtsp

Additional context
I noticed when I rebooted my raspberry pi the integration lost connection with the add-on (installed using docker run -it -e USERNAME=email@address.com -e PASSWORD=password_goes_here -p 3000:3000 bropat/eufy-security-ws:X.Y.Z). Running the command again restored things (as well as docker run --rm -it -e RTSP_PROTOCOLS=tcp -d -p 8554:8554 -p 1935:1935 aler9/rtsp-simple-server), but does that mean that I will need to do this manually every time I reboot my machine?

@b0rrasca
Copy link
Author

b0rrasca commented Feb 28, 2022

Adding some additional details:

  • It doesn't look like the camera is communicating at all with HA. The lovelace card shows the sensors and a still image, but it does not record any change in state for the sensors when lookig at the log an history, and clicking the image creates an empty pop-up (only the X and gear icon are visible)
  • I am seeing a lot of errors in my browser console; including webrtc-camera.js?v2.2.0:95 WebSocket is already in CLOSING or CLOSED state. and core.30819411.js:1 WebSocket to 'ws://10.0.0.182:8123/api/websocket' failed:
  • looking at the network tab in my browser, I am seeing a lot of websocket requests with a 101 status and 0 B size such as ws://10.0.0.182:8123/api/webrtc/ws?authSig=TONSOFNUMBERS&entity=camera.doorbell
  • Logs from eufy-security-ws show INFO Stopping the station stream for the device T8200T602133093E, because we haven't received any data for 5000 seconds

@b0rrasca
Copy link
Author

As an aside, I included the add-ons in my docker-compose file. This way I don't have to manually launch them every time I reboot my machine; My docker-compose looks as follows:

  eufy:
    image: bropat/eufy-security-ws
    container_name: eufy
    restart: unless-stopped
    environment:
      - USERNAME=email
      - PASSWORD=pass
      - COUNTRY=country
    ports:
      - 3000:3000
    
  rtsp:
    image: aler9/rtsp-simple-server 
    container_name: rtsp_server
    restart: unless-stopped
    environment:
      - RTSP_PROTOCOLS=tcp
    ports:
      - 8554:8554
      - 1935:1935

@b0rrasca
Copy link
Author

b0rrasca commented Mar 2, 2022

Just talking to myself a bit more here: the guidelines state "please always set STREAMING QUALITY, CODEC and COMPRESSION to LOW", but my doorbell only offers two options: streaming quality, and recording quality. I set streaming quality to low, but that is the only thing I can control out of the three parameters outlined in the instructions.

@fuatakgun
Copy link
Owner

can you share your device with one of the accounts listed in README, following items listed in README :) I can debug later on.

@b0rrasca
Copy link
Author

b0rrasca commented Mar 7, 2022

can you share your device with one of the accounts listed in README, following items listed in README :) I can debug later on.

Thank you @fuatakgun! I shared it with you US account.

@Twanne
Copy link

Twanne commented Mar 10, 2022

Same issue here, everything works fine, but I get a "ERROR: Can't get URL for camera.doorbell" message when trying to stream over p2p.

Using the Eufy Battery Doorbell.

@Sandy4161
Copy link

Exact same issue as well, followed all the steps but getting same error.

@Igor01-Tech
Copy link

Same for me :/

@jorik591
Copy link

Same issue here.

@mannyp26
Copy link

mannyp26 commented May 3, 2022

Any updates on this?

@MagicIndustries
Copy link

MagicIndustries commented May 12, 2022

Getting the same issue here, running hassio on a raspberry pi 4. The doorbell entity card works fine, shows an old image, but sensors don't update and the conditional cards cause these errors:

webrtc-camera.js?v2.3.0:96 WebSocket is already in CLOSING or CLOSED state.
mediaSource.onsourceopen @ webrtc-camera.js?v2.3.0:96
webrtc-camera.js?v2.3.0:218 WebSocket is already in CLOSING or CLOSED state.
pc.onicecandidate @ webrtc-camera.js?v2.3.0:218

Using a Eufy battery powered doorbell. I'm a developer, so happy to help debug or provide more logs if helpful.

@urielz
Copy link

urielz commented Jun 2, 2022

Experiencing the same issue. Has anyone found a workaround?

@b0rrasca
Copy link
Author

b0rrasca commented Jun 2, 2022

No solution here, and I am not sure this is being actively developed anymore.

@cdnninja
Copy link
Collaborator

cdnninja commented Jun 2, 2022 via email

@Nazze
Copy link

Nazze commented Sep 15, 2022

Hi! I still have the issue. After one of the last updates the stream starts to fail with "Can't get URL for camera" ... Using Flood Light 1 (no RTSP). Used to work for a while, but not anymore. After spending hours of debugging, I will uninstall it again.

@jamesjharris
Copy link

Has anyone sussed this out, I'm getting the same error, the streams worked fine for about 30 minutes and now this error continuously

@Menz01
Copy link

Menz01 commented Jun 1, 2023

has anyone gotten this to work again??

@JimboJamez
Copy link

I have the following Eufy cameras:

  • T8140-Z (x2)
  • T8414
  • T8210
  • T8010
  • T8530

My stream won't even start. I just get the "Can't get URL for camera...." error regardless of which camera I choose.

image

For the example above I have the following configured in my yaml:

`square: false
columns: 1
type: grid
cards:

  • type: conditional
    conditions:
    • entity: camera.front_entrance
      state: idle
      card:
      type: vertical-stack
      cards:
      • show_name: true
        show_icon: false
        type: button
        tap_action:
        action: call-service
        service: camera.turn_on
        data: {}
        target:
        entity_id: camera.front_entrance
        entity: camera.front_entrance
        name: Start
      • type: custom:webrtc-camera
        entity: camera.front_entrance`

@DarkAllMan
Copy link

Same for me. I have 3 other camera's that work without issues: (T8113-Z + T8114-Z), but my 2 T8210 cannot stream to my dashboard. When I open the URL with VLC (changing the local ip to the network ip, I do have a working stream.).

@rjvbeek
Copy link

rjvbeek commented Dec 7, 2023

Why is this issue closed? Seems like many people are still experiencing the issue (myself included)

@fuatakgun
Copy link
Owner

@rjvbeek go ahead and create a new one with proper information

@Parmezana
Copy link

Hi All,
try this if your stream doesn't work, I enabled a button from the "Diagnostic" attributes (Start P2P stream) and when I pressed it, my card showed the stream fine. now I have no idea to trigger the start p2p stream from within the Yaml of the custom webrtc card.

@CaseyRo
Copy link

CaseyRo commented Feb 27, 2024

I've used a (not so amazing) workaround that does 90% of what I need it to do:

square: false
type: grid
cards:
  - type: conditional
    conditions:
      - condition: state
        entity: camera.kitchen_2
        state: streaming
    card:
      square: false
      type: grid
      cards:
        - type: conditional
          conditions:
            - condition: state
              entity: camera.kitchen_2
              state: streaming
          card:
            type: custom:webrtc-camera
            entity: camera.kitchen_2
            ptz:
              service: eufy_security.ptz
              data_left:
                entity_id: camera.kitchen_2
                direction: LEFT
              data_right:
                entity_id: camera.kitchen_2
                direction: RIGHT
              data_up:
                entity_id: camera.kitchen_2
                direction: UP
              data_down:
                entity_id: camera.kitchen_2
                direction: DOWN
        - type: custom:mushroom-template-card
          primary: Stop camera
          secondary: ''
          icon: mdi:stop
          tap_action:
            action: call-service
            service: eufy_security.stop_rtsp_livestream
            target:
              entity_id: camera.kitchen_2
          fill_container: true
      columns: 1
  - type: conditional
    conditions:
      - condition: state
        entity: camera.kitchen_2
        state_not: streaming
    card:
      square: false
      type: grid
      cards:
        - type: picture-elements
          camera_image: camera.local_file
          elements: []
          tap_action:
            action: call-service
            service: eufy_security.start_rtsp_livestream
            target:
              entity_id: camera.kitchen_2
        - type: custom:mushroom-template-card
          primary: Start camera
          secondary: ''
          icon: mdi:play
          tap_action:
            action: call-service
            service: eufy_security.start_rtsp_livestream
            target:
              entity_id: camera.kitchen_2
          fill_container: true
      columns: 1
columns: 1
title: Camera

it adds a start/stop button that triggers the start_rtsp service, and uses the condition of the camera to either display a picture card (that I'm creating regularly during and off stream).

You could consider always running the RTSP stream of course so it's being displayed always, but it defeats my use case (i want to see on demand).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests