Eufy Security Integration

Hi, I have the following automation to automatically show a popup using browser_mod when motion detected on my camera

  1. Do I need a separate automation for each camera or can I somehow modify this one to cover multiple different camera motion events and show relevant image?

  2. What is best way to also have a notification sound play when popup shows?

alias: test popup
description: ""
triggers:
  - type: motion
    device_id: 0247f6b9c76de5db7d1559fec3da3a9b
    entity_id: c617ac5f69c23b6771f1f4c527f4eb17
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - type: turn_on
    device_id: e4ef52da3baef7f3d0be8b94be803617
    entity_id: 6a0076cd561d6246a77f9364905d0914
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
    enabled: true
  - data:
      dismissable: true
      autoclose: false
      title: Driveway
      size: wide
      timeout: 30000
      browser_id:
        - 1a3d407c6fa5e82aa02cfd9eb382563b
        - b5391f694055808e3e064d99a6a70c13
        - 285041b6465149c70fead06db19e1c22
        - 4f6708ecd791f66b6a490d8e42e34f5e
      content:
        type: picture-entity
        entity: image.driveway_event_image
    enabled: true
    action: browser_mod.popup
mode: single

  1. You can have multiple cameras under the “triggers” if they all have the same/similar actions. (BTW, in the UI, I find it easier to choose the trigger on the entity rather than device.)
  2. Not sure what you mean by notification sound - do you mean to have the browser on your PC/tablet/phone play a sound?
  1. Thanks. All of them would be same trigger e.g. motion and then showing the relevant event_image from that camera. But I mean motion from camera 1 and show event_image from camera 1, or if motion is from camera 2 then show event_image from camera 2 and so on for about 4 cameras

  2. Yes, sorry should have been clearer - I have an Samsung Tab A9+ on the wall and when the above alert triggers and shows popup I want to make a notification sound or similar on the Android tablet

Below code works for me… at least for one Eufy camera I have tested (camera name below is “eufycam_lr”).

You can add other camera motion detection entity_id’s to the triggers section and the “regex” command in the template should replace “motion_detected” with “event_image” to get to the respective camera’s event_image entity.

For notification sound, I just added a “play_media” action, targeted to the browser ID identified by the browser_mod. (Note that the sound file is local to where I am running homeassistant, which is a raspberry pi, not the device where the browser is).

Not sure if this is the cleanest way, but hope it works for you.

alias: Eufy Security motion/person notifies phone + browser popup + sound
description: ""
triggers:
  - entity_id:
      - binary_sensor.eufycam_lr_motion_detected
      - binary_sensor.eufycam_lr_person_detected
    to: "on"
    trigger: state
conditions: []
actions:
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - metadata: {}
    data:
      title: "{{ device_attr(trigger.entity_id, 'name') }} -  Motion/Person detected!"
      message: >-
        by {{ trigger.to_state.object_id }} at {{
        as_local(trigger.to_state.last_changed) }}
      data:
        ttl: 0
        priority: high
        image: >-
          /api/image_proxy/image.{{ trigger.to_state.object_id |
          regex_replace(find='motion_detected|person_detected',
          replace='event_image', ignorecase=False) }}
    action: notify.mobile_app_sm_g973u1
  - action: browser_mod.popup
    metadata: {}
    data:
      dismissable: true
      content:
        type: picture-entity
        entity: >-
          image.{{ trigger.to_state.object_id |
          regex_replace(find='motion_detected|person_detected',
          replace='event_image', ignorecase=False) }}
      size: wide
      timeout: 10000
  - action: media_player.play_media
    metadata:
      title: Nudge.ogg
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://media_source
    data:
      media_content_type: audio/ogg
      media_content_id: media-source://media_source/local/Nudge.ogg
    target:
      entity_id: media_player.xxxxxxxx_xxxxxxxx
mode: single
1 Like

Hi, I have the code below which uses a picture entity to show last event image from my camera and then when tapped it shows image larger.

This works fine but pops up on all devices, how can I get it to only show pop up large image on the device I tapped it on? Is that possible?

show_state: true
show_name: false
camera_view: auto
type: picture-entity
entity: image.driveway_event_image
name: Driveway
tap_action:
  action: perform-action
  perform_action: browser_mod.popup
  target: {}
  data:
    dismissable: true
    content:
      type: picture-entity
      entity: image.driveway_event_image
    size: wide
    autoclose: false
    timeout: 20000
    title: Driveway

Not an expert on browser_mod but it looks like you can encapsulate the browser_mod action with fire-dom-event action (link to doc) - like this:

tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    target: {}
    data:
      dismissable: true
      content:
        type: picture-entity
        entity: image.driveway_event_image
      size: wide
      autoclose: false
      timeout: 20000
      title: Driveway

(The lines from “target” onwards are the same from your original code but indented by 2 spaces.)

The effect is that the action will act on the current browser.

1 Like

That works perfectly, thank you so much for your help, I really appreciate it

I can’t manage to stream to solocam s220, is it possible? the other integration works just fine

I would go with Reolink, they have loads of options now from battery powered, to POE.

Best part the integration is official.

I was using Eufy for years but gave up, sold them all off and got the Reolink, wired house with POE, all rock solid now for over a year. I use HA to send me rich notifications and everything is local.

Eufy has good hardware but their implementation and support for non homekit ecosystems is bad. Bropat is doing magic here and its brilliant but you’ll be relying on one person who might choose to go a different direction in the future.

So my advice would be that if you havent purchased or are in the window of return, dump the Eufy’s and go with Reolink.

1 Like

Custom quick responses start with VoiceID “100”

“100” = First custom quick response
“101” = Second custom quick response
Etc…

Hi, i’ve been searching on different locations and it looks like a lot of people share the exact same issue as I have, being everything working fine except for the motion detection. All latest software / addon installed, but motion doesn’t seem to ring a bell with any of the eufycams or doorbell. Can’t find a solution on the web. Anybody who got this fixed? Thanks!

Make sure your notifications are turned on / enabled the Eufy app itself on your phone. If you don’t want the notifications showing up on your phone, block them in the phone settings (not in the Eufy app).

thanks, but these were enabled already.

I feel like I am completely missing something here. Can you use an account with MFA for this add-on? I installed the add-on after adding the repository, and I’m sure like others, I received the MFA code via email. I must be missing documentation here somewhere, but this was also asked in the GitHub repo and the ticket was closed with no answer lol.

If MFA is supported, where should it be entered, and does it maintain persistent connection with a refresh token so that you don’t need to provide MFA again if so?

is there any way you can show me your exact codes for this. This is exactly what i want to do but i can’t get it to work no matter what i try.
thank you,
Lisa

Hi, I got my doorbell camera T8214 to the point where it has been integrated with HA and for a brief moment, streamed. However, I get this message now after using the github examples: mse: streams: streams: unsupported scheme: T8214XXXXXXXX

Thoughts?

Are you using that on your dashboard?
When i use that when its idle, i get an error.
If i start to stream using eufy app, i see live feed then with those 2 buttons play and stop
When i press stop, i see an old image with error again: cant get url

I just want a button that i press (using bubble card), then a popup comes up showing the live feed :slight_smile:

in the end, this seemed to do the trick. Thanks!

S100 / S120 light control.

Loving this integration - I can finally trigger automations from motion detection on my Eufy kit, brilliant!! A question though … how do I control the lights on the S100 and S120 cameras? They can be controlled via the Eufy app (independent of motion or daylight) and a “Light” switch.xxx_light entity is exposed but this doesn’t control the light.

=== Ignore me, figured it out, was being stupid!! :rofl: ===

When I update to the beta version of HA 2024.12, the Eufy intergration crashes
Seel logs.

Anyone else experiencing this?

Logger: homeassistant.loader
Bron: loader.py:1074
Eerst voorgekomen: 12:18:02 (2 gebeurtenissen)
Laatst gelogd: 12:18:03

Unexpected exception importing component custom_components.eufy_security
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1074, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/eufy_security/__init__.py", line 13, in <module>
    from .const import COORDINATOR, DOMAIN, PLATFORMS
  File "/config/custom_components/eufy_security/const.py", line 16, in <module>
    from .model import EntityDescription
  File "/config/custom_components/eufy_security/model.py", line 19, in <module>
    class ConfigField(Enum):
    ...<14 lines>...
        mfa_input = auto()
  File "/config/custom_components/eufy_security/model.py", line 25, in ConfigField
    rtsp_server_address = auto()
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/enum.py", line 431, in __setitem__
    v.value = self._generate_next_value(
              ~~~~~~~~~~~~~~~~~~~~~~~~~^
            key, 1, len(self._member_names), self._last_values[:],
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            )
            ^
  File "/usr/local/lib/python3.13/enum.py", line 1248, in _generate_next_value_
    raise TypeError('unable to sort non-numeric values') from None
TypeError: unable to sort non-numeric values


Logger: homeassistant.setup
Bron: setup.py:334
Eerst voorgekomen: 12:18:03 (1 gebeurtenissen)
Laatst gelogd: 12:18:03

Setup failed for custom integration 'eufy_security': Unable to import component: Exception importing custom_components.eufy_security
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1074, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/eufy_security/__init__.py", line 13, in <module>
    from .const import COORDINATOR, DOMAIN, PLATFORMS
  File "/config/custom_components/eufy_security/const.py", line 16, in <module>
    from .model import EntityDescription
  File "/config/custom_components/eufy_security/model.py", line 19, in <module>
    class ConfigField(Enum):
    ...<14 lines>...
        mfa_input = auto()
  File "/config/custom_components/eufy_security/model.py", line 25, in ConfigField
    rtsp_server_address = auto()
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/enum.py", line 431, in __setitem__
    v.value = self._generate_next_value(
              ~~~~~~~~~~~~~~~~~~~~~~~~~^
            key, 1, len(self._member_names), self._last_values[:],
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            )
            ^
  File "/usr/local/lib/python3.13/enum.py", line 1248, in _generate_next_value_
    raise TypeError('unable to sort non-numeric values') from None
TypeError: unable to sort non-numeric values

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 334, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1034, in async_get_component
    self._component_future.result()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1026, in async_get_component
    comp = self._get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1085, in _get_component
    raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.eufy_security