fuatakgun / eufy_security

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

Battery powered eufy cameras always initially fail with "mse: streams: wrong user/pass, wrong response on DESCRIBE" until refreshed #1206

Open lone-cloud opened 1 month ago

lone-cloud commented 1 month ago

Describe the bug

Every time I run camera.turn_on the video is stream is started in an error'ed state with the error message: "mse: streams: wrong user/pass, wrong response on DESCRIBE". I believe this is happening because the stream is started instantly where as the battery powered eufy cams require some time to initialize. You can see this with start-up period with a loading spinner in the official app. When I click in the top right corner, the stream refreshes and everything starts to work as expected.

To reproduce

Steps to reproduce the behavior: I'm using the camera with the following card set UI set up:

        conditions:
          - entity: camera.porch
            state: idle
        card:
          show_state: false
          show_name: false
          type: picture-entity
          entity: image.porch_event_image
          tap_action:
            action: call-service
            service: camera.turn_on
            data: {}
            target:
              entity_id: camera.porch
      - type: conditional
        conditions:
          - entity: camera.porch
            state: streaming
        card:
          type: vertical-stack
          cards:
            - show_name: true
              show_icon: false
              type: button
              tap_action:
                action: call-service
                service: camera.turn_off
                data: {}
                target:
                  entity_id: camera.porch
              entity: camera.porch
              name: Stop
            - type: custom:webrtc-camera
              entity: camera.porch
              poster: image.porch_event_image
              ui: true
              mode: mse
              style: '.pictureinpicture {display: none}'

Expected behavior

The camera should know to wait for x seconds until the battery powered camera is turned on and then play the camera feed.

Additional information

Hardware Information;

kmil4 commented 3 weeks ago

+1 having same issues with RTC enabled 360 Pan & Tilt models.

60% of the time I can recover by keeping the stream running and navigating away then navigating back, or refreshing

HarryBouch96 commented 2 weeks ago

It seems many people are experiencing this issue. I have found a work around and that is to create an automation which starts the RTSP stream every 5 minutes using the entity provided. This means that I can no longer stop the stream though or else it just starts again after 5 minutes but a continuous stream is fine for my needs.