Eufy Security Integration

Following on from my above post, here are the steps to take to achieve this setup.

  1. Install and configure WebRTC via HACS: https://github.com/AlexxIT/WebRTC

  2. Install and configure Browser Mod via HACS: https://github.com/thomasloven/hass-browser_mod

  3. Create this script:

alias: Eufy Doorbell Start Livestream
sequence:
  - service: eufy_security.start_livestream
    target:
      entity_id:
        - camera.YOUR-CAMERA-NAME
      device_id: YOUR-DOORBELL-DEVICE-ID
  - service: browser_mod.window_reload
mode: single
  1. Create this script:
alias: Eufy camera OFF
sequence:
  - service: eufy_security.stop_livestream
    target:
      entity_id: camera.YOUR-CAMERA-NAME
      device_id:
        - YOUR-DOORBELL-DEVICE-ID
  - service: homeassistant.reload_config_entry
    target:
      entity_id: camera.YOUR-CAMERA-NAME
      device_id:
        - YOUR-DOORBELL-DEVICE-ID
mode: single
icon: mdi:video-off
  1. Create this automation:
alias: Eufy - Stop doorbell stream after 2.50 min
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.doorbell_streaming_sensor
    to: 'True'
    from: 'False'
condition: []
action:
  - delay:
      hours: 0
      minutes: 2
      seconds: 50
      milliseconds: 0
  - service: script.THE_SCRIPT-ID-FOR-Eufy camera OFF script from step 4
mode: restart
  1. Create this card for ‘last event’ image:
type: conditional
conditions:
  - entity: binary_sensor.doorbell_streaming_sensor
    state: 'False'
card:
  type: picture-glance
  entities: []
  camera_image: camera.YOUR-CAMERA-NAME
  tap_action:
    action: call-service
    service: script.eufy_doorbell_start_livestream
    service_data: {}
    target: {}
  1. Create this card for the ‘live stream’ WebRTC card:
type: conditional
conditions:
  - entity: binary_sensor.doorbell_streaming_sensor
    state: 'True'
card:
  type: custom:webrtc-camera
  entity: camera.doorbell
  mse: false


  1. Create this card for the “STOP CAMERA” button (not required but can be useful to have ability to stop the livestream via UI):

type: conditional
conditions:
  - entity: binary_sensor.doorbell_streaming_sensor
    state: 'True'
card:
  type: button
  tap_action:
    action: call-service
    service: script.THE_SCRIPT-ID-FOR-Eufy camera OFF script from step 4
    service_data: {}
    target: {}
  icon: mdi:doorbell
  show_state: false
  show_name: true
  icon_height: 50px
  name: STOP CAMERA

Ps. If there are any issues I usually find restarting the bropat docker container fixes things.

Also, you may not require to call the `stop_livestream’ service as @anon63427907 has pointed out that the integration automatically calls this when no incoming bytes received. However I do find that I need the service ‘homeassistant.reload_config_entry’ to get everything working perfectly.

5 Likes