fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
843 stars 73 forks source link

Error: Can't get URL for Camera #1044

Open braddunlap opened 6 months ago

braddunlap commented 6 months ago

This was a previous bug report but was closed with a request to open with proper documentation. Issue still remains.

https://github.com/fuatakgun/eufy_security/issues/287

Error shows up at the top of Dashboard cards when trying to add a camera by entity ID. It seems to mostly be an issue with battery cameras, but I also see it intermittently with my plugin Eufy Indoor Cam E220 pan and tilt camera. I believe this is an issue related to the fact that battery cameras do not have a constant RTSP stream and rather only start the stream when motion is detected on the camera. I believe the error may be coming from either go2rtc or WebRTC, so it may need to be raised in one of those projects. But it also may be an integration issue, so I was hoping it could be looked into here first.

I have found that if you add the camera with the direct URL in the Dashboard card, the camera streams work fine, but this solution does not allow for previous event images to be displayed as poster images when the RTSP stream is not available.

To reproduce

Steps to reproduce the behavior:

  1. Add a Dashboard card with the boilerplate yaml from the documentation and update the camera entity name with a battery operated camera that supports RTSP.
  2. Notice the error at the top of the card.

Expected behavior

Stream would display for camera after camera detects motion without an error, and a poster image would be displayed from the previous event when the stream stops.

Additional information

Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;

Hardware Information;

hass_eufy_security_log.txt

Additional context

As mentioned previously, I believe the error may be coming from either go2rtc or WebRTC, so it may need to be raised in one of those projects. But it also may be an integration issue, so I was hoping it could be looked into here first.

I will be sure to buy a coffee for the help. Thanks!

braddunlap commented 6 months ago

I noticed that the camera entities / streams are not getting added to go2rtc unless I add the card with a manual URL. Then the RTSP URLs will show in go2rtc and I can click and view the stream. I think that may be part of the issue and I am wondering how the integration with go2rtc is supposed to work and if I should be seeing all of my camera IDs in go2rtc. Currently this is not working for me for some reason. I have tried restarting, reinstalling numerous times.

radeon79 commented 6 months ago

I have same problem with all my eufy camera.

braddunlap commented 6 months ago

Looks like @fuatakgun just dropped a major update (version 8.0.0) just a few hours ago. But it has a breaking dependency on a new version of go2rtc that has yet to be released, which hopefully will be released soon. Check out the build notes for more info. I am hoping this issue will be fixed in the new version once it is available.

fuatakgun commented 6 months ago

Please get webrtc from my fork following readme. It has respective dependency

braddunlap commented 6 months ago

Please get webrtc from my fork following readme. It has respective dependency

Thanks. It's working better at least for RTSP cameras, but I am now having a new issue with trying to edit the configuration of Eufy Security Integration. It's throwing an error - Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

I'll log a new bug so you can close this one.

data-alchemist commented 4 months ago

Hi, I am new to HA. I have set local Tuya, some water, temp sensors, door locks and now the Eufy cameras. I have received this error too.

I am using home base 2, dual cam doorbell and a bunch of wifi flood light cam and flood light pro. When I use stock HA camera entity card, it shows picture of the last event detected (unreliably). Also, the picture of the last event is a couple of days old sometimes (this is the stock card, not custom webrtc card).

WebRTC card does not start stream and shows Can't get URL for camera.backyard.

Is there an update or debug that I can try?

geidorei commented 4 months ago

Same happening with me to.

deifel commented 3 months ago

Same problem here

zalewskigrzegorz commented 3 months ago

got this same issue this is my code:

square: false
type: grid
columns: 1
cards:
  - type: entities
    entities:
      - entity: switch.salon_camera_enabled
        name: Camera enabled
      - entity: select.salon_guard_mode
        name: Guard Mode
      - entity: binary_sensor.salon_crying_detected
        name: Crying detected
      - entity: sensor.salon_current_mode
        name: Current Mode
      - entity: binary_sensor.salon_debug_device
        name: Debug (device)
      - entity: binary_sensor.salon_debug_station
        name: Debug (station)
      - entity: binary_sensor.salon_motion_detected
        name: Motion detected
      - entity: binary_sensor.salon_person_detected
        name: Person detected
      - entity: sensor.salon_person_name
        name: Person Name
      - entity: binary_sensor.salon_pet_detected
        name: Pet detected
      - entity: binary_sensor.salon_snooze
        name: Snooze
      - entity: sensor.salon_snooze_time
        name: Snooze Time
      - entity: binary_sensor.salon_sound_detected
        name: Sound detected
    title: Salon
  - type: alarm-panel
    entity: alarm_control_panel.salon
  - type: custom:webrtc-camera
    entity: camera.salon
    ptz:
      service: eufy_security.ptz
      data_left:
        entity_id: camera.salon
        direction: LEFT
      data_right:
        entity_id: camera.salon
        direction: RIGHT
      data_up:
        entity_id: camera.salon
        direction: UP
      data_down:
        entity_id: camera.salon
        direction: DOWN

and result:

Arc_2024-03-17_11 57_bnrVkdK6 Add-on is working, i can switch camera on and off

sysofwan commented 3 months ago

I had the same issue. It was fixed by setting the camera’s streaming quality to low.

data-alchemist commented 3 months ago

I had the same issue. It was fixed by setting the camera’s streaming quality to low.

@sysofwan, did you make any other change? I tried changing stream quality to low but made no difference. My card code is below. I have tried with a simpler, first two lines from the card as well.

type: custom:webrtc-camera
entity: camera.backyard
poster: image.backyard_event_image
ui: false
shortcuts:
  - name: Play
    icon: mdi:play
    service: camera.turn_on
    service_data:
      entity_id: camera.backyard
  - name: Stop
    icon: mdi:stop
    service: camera.turn_off
    service_data:
      entity_id: camera.backyard
sysofwan commented 3 months ago

Make sure the recording quality is also low. Also I find that sometimes I have to reload the page for steaming to start.

data-alchemist commented 3 months ago

Make sure the recording quality is also low. Also I find that sometimes I have to reload the page for steaming to start.

Lowest I can set is 1080p and I have set that. No luck still.

tomneij commented 3 months ago

same issue here, set my quality to 720 but no luck either

Clem- commented 1 month ago

Same issue. I get @fuatakgun webrtc-camera card fork, my camera have RTSP disabled (otherwise motion detection is not working), and I always have this error: Error requesting stream: camera.xxx does not support play stream service

The poster image isn't even displayed when streaming's off.

The thing is, I don't have an option to change streaming quality for my 2C cameras.

cong-khai-nguyen commented 1 month ago

I had the same issue. It was fixed by setting the camera’s streaming quality to low.

This solves my problem. I was constantly getting: Can't get URL for camera.doorbell in my dashboard while the stream would work fine on go2rtc