Eufy Camera Integration

  1. Yes, no question. Now I will create a issue on your page

  2. For the video stream, I use Agent DVR, webrtc is built in there and the video is broadcast without delay. Agent DVR for me is an important part of automation for a smart home. It is very convenient to use profiles for different events there, although I asked the author to add functionality

  3. Thanks to Agent DVR, I have banned camera access to the Internet in the router settings, which excludes tracking me from the outside, but I can have access to recordings

Thanks for summary, so you are not watching any of these streams over home assistant? i have a hypothesis that HA is causing 4-5 seconds delay and still testing against it

I watch the broadcast through the home assistant and it works very fast. No delay. I have raised a separate server for Agent DVR in docker and am using Agent DVR integration. True, there were delays, but the author eliminated them

image

Are you using default stream to watch broadcast or webrtc in home assistant?

There is no choice which stream I need to use, webrtc works there by default and the video has no delays at all. It is broadcast in the home assistant without delay. For example, raise Agent DVR, install Agent DVR integration, add a camera to lovelace and wave your hand and look at yourself through lovelace, there is no delay, everything is in real time.

type: picture-glance
title: hall
entities: []
camera_view: live
camera_image: camera.eufy_camera_hall

i see, to have webrtc in HA, there needs to be a custom integration, otherwise it uses stream integration, which seems to be the culprit for latency.

When you click on camera picture on HA, it should be calling an endpoint for streaming, do you know if it is rtsp endpoint?

i will deep dive and check how agentdvr is working.

Hi,

After installing eufy_security_addon, set the configuration and restarted HA. according to the manual on https://github.com/fuatakgun/eufy_security
For the account info, I created a second account with ‘admin’ right. Account has no MFA enabled.

The plugin is unable to find any station of device, see logs below. HA and Eufy are on the same local lan.

If I login on the eufy app on my phone or on eufy Security I see the homebase2 and doorbell.

Any idea what i’m doing wrong? See below for my setup and eufy addon log;

SETUP
Home Assistant OS 6.5
Core core-2021.10.6
eufy_security_addon version: 0.3.3
Homebase 2 systemversion 2.1.7.8h
Doorbell (T8210) systemverion 2.2.3.3

EUFY_SECURITY_ADDON LOG
2021-10-20 18:31:37.016 INFO Eufy Security server listening on port 3000
2021-10-20 18:31:37.884 INFO No stations found.
2021-10-20 18:31:38.200 INFO No devices found.
2021-10-20 18:31:38.753 INFO Push notification connection successfully established

Thanks for the help!

Leroy

There were some instances that removing the cameras from new account and sharing them again solved this issue

Thanks @anon63427907. That solved the issue!

Hi @fuatakgun

thanks for the work on the eufy_security integration/addon.
I just wanted to post that when I install eufy_security addon via Supervisor
i get the following error

      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype] {
        accept: [
          'Accept',
          'application/json, text/plain, */*'
        ],
        'content-type': [
          'Content-Type',
          'application/json'
        ],
        app_version: [
          'app_version',
          'v2.8.0_887'
        ],
        os_type: [
          'os_type',
          'android'
        ],
        os_version: [
          'os_version',
          '30'
        ],
        phone_model: [
          'phone_model',
          'EUFYCLIENT'
        ],
        country: [
          'country',
          'US'
        ],
        language: [
          'language',
          'en'
        ],
        openudid: [
          'openudid',
          '93b6f5235639eb6f'
        ],
        uid: [
          'uid',
          ''
        ],
        net_type: [
          'net_type',
          'wifi'
        ],
        mnc: [
          'mnc',
          '02'
        ],
        mcc: [
          'mcc',
          '262'
        ],
        sn: [
          'sn',
          '#####*##*###'
        ],
        model_type: [
          'Model_type',
          'PHONE'
        ],
        timezone: [
          'timezone',
          'GMT-05:00'
        ],
        'user-agent': [
          'User-Agent',
          'axios/0.23.0'
        ],
        'content-length': [
          'Content-Length',
          64
        ],
        host: [
          'Host',
          'mysecurity.eufylife.com'
        ]
      }
    },
    _currentUrl: 'https://mysecurity.eufylife.com/api/v1/passport/login',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
error stack:
• dns.js:71 onlookup
    dns.js:71:26
2021-10-24 17:13:20.038  ERROR Status return code not 200 
{
  status: undefined,
  statusText: undefined
}
2021-10-24 17:13:20.041  ERROR Token error 

but when i run it from your command line version the docker command,
same host

docker run -dt --restart unless-stopped -e USERNAME="MYUSERNAME" -e PASSWORD="MYPASSWORD" -p 3000:3000 bropat/eufy-security-ws:latest

everything works out
without error, the error above seems to be DNS, the log output of the docker command is showing its using an alternate hostname.

2021-10-24 17:16:38.757  INFO Eufy Security server listening on port 3000 
2021-10-24 17:16:39.611  INFO Switching to another API_BASE (https://security-app.eufylife.com/v1) and get new token. 
2021-10-24 17:16:46.344  INFO Connected to station T8010P1321131C9B on host 192.168.2.24 and port 22116 
2021-10-24 17:16:47.111  INFO Push notification connection successfully established 

everything else works. webrtc has a few timing glitches, it seems starting p2p on my camera takes a bit of time around 8 sec, but still playing with it.

Thanks

Could you please check if you are supplying correct country code for add on?

If that is correct, i am sure this is about latest version, which we are not using through add on yet, add on is using 0.3.3 and latest is around 0.5.1. I am testing it locally but i don’t have an eta when i can finish tests. I will try to speed up on this and then you can rely on add on.

2 Likes

Let me know if there’s anything I can do as far as testing since I kinda started the whole update mess with my Floodlight cam problem. :sweat_smile:

In the addon I’m using country code → US
in the Eufy Security App I verified in Settings->Region it is United States on
both accounts, even the shared account dedicated for this addon.

The docker command I didn’t pass any country code arguments, I didn’t see it
in your documentation, so I don’t know what it defaults to.

Running docker natively in raspbian is a good workaround for now. when the addon has an update I’ll remove the latest docker image and switch to the latest addon again. I have it running with restart, so even if the host reboots it runs before Homeassistant.

on upgrading from 0.3.3 vs 0.5.1 …I asked this on your github issues page as would be good to have an upgrade how to for converting GUI 0.3.3 to Docker 0.5.1 as I deployed it via the Gui and got pretty confused, trying badly to switch to cli, would love to get it to get to 0.5.1 etc. so some upgrade guide would be good … pls ta

Do not upgrade yet, i am still working on testing and preparing it. There is an open issue about tracking this and i will publish the updated add on version and integration version when it is ready.

You need to update your integration through hacs and add-on through supervisor.

2 Likes

ta v much :slight_smile:

I’ve been following this thread for a while now and all the new integrations people have been coming up with to try and workaround the fact that Eufy won’t give us the API. Just want to say thanks to all you guys for all the work put into improving Eufy device integration into Home Assistant.

I currently have a wired doorbell and the original floodlight in my house. I’m going to be moving into a new house in the coming months and i’m debating whether to take my Eufy devices or just leave them there and start fresh. Question I have for anyone that’s moved on from Eufy to another camera brand is what are you using and are you happy with it? I’d be looking for something that required minimal setup for me and integrated well into Home Assistant. The biggest thing I wanted out of Eufy was to be able to just have a livestream playing on my wall tablet Lovelace setup. Would be nice if there was an ecosystem that played nice enough with Home assistant to allow this with minimal work. Thanks all

1 Like

As integration owner and engineer, I am enjoying to play this so I would stick to eufy BUT it might be difficult to catch up for novice users. On the other hand, I see that there are many people out there using this with variety of technical background.

1 Like

Hi
I looking to get an indoor camera, to keep an eye on our new dog when not home.

My question is can this integration disable the camera on command. I don’t want it recording when we are home. Only when we not.

Hi @phairplay ,

Not sure how your camera is setup but I use frigate and I disable my cameras recording when I’m home and vice versa when we leave home :slight_smile:

- alias: CCTV - Activate motion we leave home
  id: cctv_activate_motion_we_leave_home
  initial_state: true
  trigger:
    - platform: state
      entity_id: person.laurent
      from: "home"
    - platform: state
      entity_id: person.div
      from: "home"
  condition:
    - condition: template
      value_template: '{{ states("person.laurent") != "home"}}'
    - condition: template
      value_template: '{{ states("person.div") != "home"}}'
    - condition: state
      entity_id: input_boolean.guests
      state: 'off'
  action:
    - service: switch.turn_on
      data:
        entity_id: switch.conservatory_detect,switch.conservatory_recordings,switch.conservatory_snapshots
    - service: switch.turn_on
      data:
        entity_id: switch.kitchen_detect,switch.kitchen_recordings,switch.kitchen_snapshots
    - service: switch.turn_on
      data:
        entity_id: switch.living_room_detect,switch.living_room_recordings,switch.living_room_snapshots
1 Like