Eufy Security Integration

banned from what?

i use rtsp streams, the streams are local or ?

Hello gents,

I am new to HA and learning a lot everyday. I have it running on Dell WYSE 5070 in docker. When it makes it convenient to recreate everything when it fails it makes it also a bit harder to integrate 3rd parties hardware.

Now I am stuck with Eufy camera integration. I wanted to install eufy-security-ws (Docker Hub) but I got below errors. Any hint what causes all these errors?

2022-03-27 19:32:01.229 INFO Eufy Security server listening on host 0.0.0.0, port 3000
2022-03-27 19:32:28.544 ERROR Error:
RequestError getaddrinfo EAI_AGAIN extend.eufylife.com
details:
{
code: ‘EAI_AGAIN’,
timings: {
start: 1648409543523,
socket: 1648409543523,
lookup: 1648409548529,
connect: undefined,
secureConnect: undefined,
upload: undefined,
response: undefined,
end: undefined,
error: 1648409548529,
abort: undefined,
phases: {
wait: 0,
dns: 5006,
tcp: undefined,
tls: undefined,
request: undefined,
firstByte: undefined,
download: undefined,
total: 5006
}
}

m
error stack:
• index.js:962
node_modules/got/dist/source/core/index.js:962:111
• node:events:640 onceWrapper
node:events:640:26
• node:events:532 emit
node:events:532:35
• index.js:43 origin.emit
node_modules/@szmarczak/http-timer/dist/source/index.js:43:20
• node:_http_client:442 socketErrorListener
node:_http_client:442:9
• node:events:520 emit
node:events:520:28
• destroy:157 emitErrorNT
node:internal/streams/destroy:157:8
• destroy:122 emitErrorCloseNT
node:internal/streams/destroy:122:3
• task_queues:83 processTicksAndRejections
node:internal/process/task_queues:83:21
2022-03-27 19:32:28.552 ERROR Status return code not 200
{
status: undefined,
statusText: undefined
}
2022-03-27 19:32:28.559 ERROR Error:
Error input must not start with a slash when using prefixUrl
error stack:
• index.js:484 normalizeArguments
node_modules/got/dist/source/core/index.js:484:23
• create.js:112 got
node_modules/got/dist/source/create.js:112:39
• api.ts:496 request
node_modules/eufy-security-client/src/http/api.ts:496:43
• api.ts:171 authenticate
node_modules/eufy-security-client/src/http/api.ts:171:58
• eufysecurity.ts:565 connect
node_modules/eufy-security-client/src/eufysecurity.ts:565:36
• task_queues:96 processTicksAndRejections
node:internal/process/task_queues:96:5
2022-03-27 19:32:28.561 ERROR Status return code not 200
{
status: undefined,
statusText: undefined
}
2022-03-27 19:32:28.561 ERROR Token error

have you ptz controls enabled? or got it to work?

Hi there,
I have been wondering if I am missing some pieces… following the instruction on the GitHub site, and installing the integration directly in HACS, it seems that the suggested RTSP simple server add-on isn’t installable on the latest version of Home Assistant, the message is that the structure isn’t compatible with the new add-on structure. On the simple server RTSP the maintainer points back to the Eufy Security page… so no luck there.

I am running Home Assistant core, on Raspbian, and once I have installed the integration using HACS, I can add the integration from the Configuration page. There though the journey stops, because it is asking to provide an IP address and a port. My understanding is that these should be the RTSP coordinates, and not the camera ones… correct? If not how to find out which is the right port on the camera? I can’t enable RTSP because otherwise the native HomeKit integration will not work, so I need to go with the P2P option but I didn’t manage to move on from the first installation step.

Any help would be greatly appreciated, thanks in advance.

I am running Home Assistant 2022.3.8:

Version core-2022.3.8
Installation Type Home Assistant Core
Development false
Supervisor false
Docker false
Virtual Environment true
Python Version 3.9.2
Operating System Family Linux
Operating System Version 5.15.30-v8+
CPU Architecture aarch64

Hi all, i was away for a very long time and back now, please create issues under GitHub or +1 to existing ones. I will take a look and try to solve them

2 Likes

Hi,

Managed to get everything so far working! But with RTSP, within the eufy security app I have to have RTSP security set to none or I can’t get the streaming to work. I’ve read as much as I can find but can’t find a way to make it work with any security setup.

Is there a way to change the contact sensor states from true false to closed open?

Check integration configuration page, there is an option to fix this

I am sure I missed it but is there a way in Lovelace dash to toggle RTSP streams on and off by clicking on the camera feed? I am using the Eufy Security: Start Live Stream over RTSP in developer section manually for each camera. I did add the add-on (Use RTSP Add On (P2P) )for the RTSP and set it to on in the eufy config but my cameras dont show live updates.

I did something like the following to get the on/off functionality on the card itself. Basically, the off version of the card has a tap action that calls the turn_on service. Then, using the WebRTC card, I added a “shortcut” that calls the turn_off service. It’s not totally ideal that the “area” for interaction is different between the two states and there probably is a way (maybe another custom card) to get an icon to overlay in the same position for the off state, but I just wanted something quick and easy. Here’s the code that I currently have for the idea described above:

square: false
columns: 1
type: grid
cards:
  - type: conditional
    conditions:
      - entity: binary_sensor.front_streaming_sensor
        state: 'off'
    card:
      type: picture-entity
      entity: camera.front
      hold_action:
        action: none
      tap_action:
        action: call-service
        service: camera.turn_on
        target:
          entity_id: camera.front
  - type: conditional
    conditions:
      - entity: binary_sensor.front_streaming_sensor
        state_not: 'off'
    card:
      type: custom:webrtc-camera
      entity: camera.front
      ui: true
      shortcuts:
        services:
          - name: Power Off
            icon: mdi:power
            service: camera.turn_off
            service_data:
              entity_id: camera.front

Anybody else with no camera since upgrading to @bropat 's container 0.9.0?
Just raised an issue just in case:

Hi, just wondering if someone can tell me if I am doing something wrong, or is this a limitation.
I have a homebase 2, a doorbell 2k (which is going to be wired in), a 2k cam indoor, and two eufycam 2 pro.

The doorbell doesn’t support RTSP, but I installed the RTSP addon and webrtc and it seems to work perfectly, including the still-frame etc. It still saves the clips to the homebase.

However, the Eufycam 2 Pro don’t seem to be providing the still-frame, and I can only stream them if I enable RTSP on them (otherwise I ge a warning in HASS).
However, if I enable RTSP on the cameras, they stop saving the clips to the Homebase.
Is there a way to keep RTSP enabled on them but still have it save the clips to the homebase, or otherwise is it possible to run them in P2P? I don’t expect to be streaming from the camera a lot, so even if it reduces battery, it would not be a major issue.

For my use case, ideally I want to be able to have those still-frames for the eufycam 2 pros, so I can have a glance and see the last thing that basically triggered the motion detector on them (or even a notification with that sill), and I can then check the eufy app for the clips if needed.

The doorbell is working fine so I just need to do a bit of work to get it to stream to my nest hub or android tv.

Am I doing something wrong?

Thanks

I had the same thing initially but the after some tinkering the clips were saved again to the Homebase while rtsp was still configured. I think now that clips aren’t saved when rtsp streaming is active. Did you stop the rtsp stream after configuring it (which starts the stream), or did you try while the camera was still streaming?

I’m getting mixed results with the doorbell. Sometimes it works when streaming quality is low/low (requirement) and sometimes it does not. It also seems to take Eufy a while to accept streaming quality changes, which may account for a lot of attempts failing for me. But even when it was continuously set to low/low, it is not always working for me. And also for me the low/low quality setting is a bit too grainy to be useful.

But praise to @anon63427907, @bropat and others for creating this, seeing that Eufy isn’t exactly making it easy for them.

Does anyone know why anytime I stream my cameras, I get more eufy files and other files created in my file folder? There are tons of files.

Thanks

I might be mistaken but I think those are created by the WebRTC integration anytime you stream the camera.

Hi all, let me say first a BIG THANK YOU @anon63427907 and all others that made this possible.
I have a question - if anyone managed to do it already - how can I stream the camera feed to Google Hub?
I want to build an automation that uses as trigger the ring sensor, or the global motion sensor - get the feed from the camera and push it to Google Home (kind of a replica of what is done for Amazon Alexa).
Has anyone did it?
If I use the Call Service - Stream - it fails and states:

Logger: homeassistant.components.automation.display_front_door_camera_feed
Source: components/automation/__init__.py:525
Integration: Automation (documentation, issues)
First occurred: 12:58:48 PM (1 occurrences)
Last logged: 12:58:48 PM

Error while executing automation automation.display_front_door_camera_feed: camera.doorbell_camera does not support play stream service

The automation is:

alias: Front Door Motion
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.doorbell_camera_global_motion_sensor
    from: 'False'
    to: 'True'
condition: []
action:
  - service: camera.play_stream
    data:
      media_player: media_player.kitchen_display
    target:
      entity_id: camera.doorbell_camera
  - service: notify.mobile_app
    data:
      title: Alarma Soneriei a fost activata !
      data:
        actions:
          - action: URI
            title: Security Home Assistant page
            uri: >-
              https://homeassistant/lovelace/...
      message: Ceva se întâmplă în fata ușii de la întrare!
mode: single

I have the Eufy 1080p battery powered doorbell (T8222-Z) already setup in HA (Core 2022.5.3)
Went with the github instructions and install - and it works fine - apart from the issue above.
Any ideas?

After tinkering a bit, I am answering my own issue :slight_smile: - maybe it can be helpful for others.
I created a new script to start the P2P stream (my doorbell does not have RTSP) - changed from the integration the time to analyze to 2 sec.
Script:

alias: Doorbell Start / Stop Stream
sequence:
  - service: eufy_security.start_p2p_livestream
    data: {}
    target:
      entity_id: camera.doorbell_camera
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - service: media_player.play_media
    target:
      entity_id: media_player.kitchen_display
    data:
      media_content_id: media-source://camera/camera.doorbell_camera
      media_content_type: application/vnd.apple.mpegurl
    metadata:
      title: Doorbell Camera
      thumbnail: /api/camera_proxy/camera.doorbell_camera
      media_class: video
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://camera
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - service: eufy_security.stop_p2p_livestream
    data: {}
    target:
      entity_id: camera.doorbell_camera
mode: restart
icon: mdi:doorbell-video

Then called the script in the automation:

alias: Front Door Motion
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.doorbell_camera_global_motion_sensor
    from: 'False'
    to: 'True'
condition: []
action:
  - service: script.doorbell_start_stop_stream
    data: {}
  - service: notify.mobile_app_
    data:
      message: Ceva se întâmplă în fata ușii de la intrare!
      title: Alarma Soneriei a fost activata !
      data:
        actions:
          - action: URI
            title: Security Home Assistant page
            uri: >-
              https://homeassistant/lovelace/security
  - service: notify.mobile_app_
    data:
      message: 'Ceva se întâmplă în fata ușii de la intrare! '
      title: Alarma Soneriei a fost activata !
      data:
        actions:
          - action: URI
            title: Security Home Assistant page
            uri: >-
              https://homeassistant/lovelace/security
mode: restart

And this works with also with another automation to check for when someone rings actually the doorbell.
Most probably it can be done better - but this is how I solved it. If you have any other ideas/improvements, please share.

1 Like

Is there something better to use than webrtc? If i just start the stream normally, it is way delayed.

A little addition - if you want to get a notification on your Android device, with the last picture snap from the camera:

action:
  - service: notify.mobile
    data:
      message: Ceva se întâmplă în fata ușii de la intrare!
      title: Alarma Soneriei a fost activata!
      data:
        ttl: 0
        priority: high
        image: '{{state_attr(''camera.doorbell_camera'', ''inherited'').state.pictureUrl}}'
2 Likes

Can someone help me out? I want to receive a ‘critical notification’ on my iPhone when someone rings my doorbell. When I hit the ‘execute button’ in home assistant I get the message on my phone so the action works but I don’t get it when some1 rings my doorbell. So I guess there is a problem with my trigger but I don’t know what I’m doing wrong…

This is my automation:

alias: Deurbel
description: ''
trigger:
  - type: turned_on
    platform: device
    device_id: 4c54b0003cea733ecbdae99bc8355a7a
    entity_id: binary_sensor.deurbel_spoorwegstraat_22_ringing_sensor
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition: []
action:
  - service: notify.mobile_app_iphone_van_maarten
    data:
      title: Ding Dong!
      message: Er is iemand aan de deur
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 1