Eufy Security Integration

Are your motion and person sensors working now?

Working for me.

Hi

For the webrtc function, i had to add it 2x times, otherwise it said custom element doesnt exist, the github page didnt mention to add it 2x:

  • through hacs integration
  • through HA integration
    Maybe add this to the readme?

I’m gettings strange results with my 2 cams.
Sometimes i have video (very fast)
Sometimes errors:

Also the video isnt stopping , should this be added somewhere?
You click to start it

But then when does it stop

Still some progress to be made i guess

all contributions and proposals are welcome

It is still autoplaying , without doing anything hovering over it plays the rtsp stream
Tried to stop the stream with the service stop livestream over rtps

It keeps playing

In the conditional cards, you use camera turn on
IS that the right commando? Or should we use start stream?

Did you follow readme to disable auto play?

Yes i did
It is disabled

Think for now, i read your readme like 100 times lol

If your camera supports only p2p, camera turn on and start p2p livestream are identical. In my case, my camera supports both options, turn on refers to rtsp and i need to explicitly call start p2p livestream, if i need.

I’m looking to see what works now
 cause i get the idea, it doesnt respond to commands, like stopping.
Also it doesnt auto stop , so to be ready to start again, it needs to be stopped first
 maybe add this to readme too?
But i should get it to work first


I have 2 cams for now (would like more, but im holding off the boat, if i go further with eufy or not)

So i have the doorbell (only does p2p) but i use the rtsp addon
and a cam that does support rtsp

Edit: now my doorbell isnt responding to the turn on command
 when clicking the image (it is idle)

Very strange

regarding to your edit, did you get latest codebase?

What do you mean?

Regarding to your comments inside edit section, do you have latest codebase, there were some changes from today.

Yes i updated 2/3 times today :slight_smile:
Just now too

No difference
Looking at the rtsp addon, it shows timeouts for the doorbell

Even eufy security log has errors

It says its streaming already but the sensor streaming says false lol

In that case, there is nothing to do other than restarting add on. Integration heavily relies on add on actions and responses.

I read up some and found that we don’t get the motion notifications if the device is not sending push notifications, so that explains why I’m not getting any
 :slight_smile: We only have the notifications on during the night or when we’re away and so far we haven’t gotten any unexpected visitors. It’s a shame that limitation is there though.

I think I’ve finally got this all working how I’ve wanted since I got my Eufy 2k Wired doorbell :slight_smile:
I have always wanted a live video stream from my doorbell camera through Home Assistant when I want to quickly check my front door (in case I hear a noise etc).

My configuration is as follows:

  1. I have a conditional card that shows the ‘last event’ image (aka the image from the last motion detection or doorbell press) when the camera state is “Idle” (not streaming)

  2. On this card, I’ve set the tap action to call service which calls a script I’ve created called ‘script.eufy_doorbell_start_livestream’

  3. The script calls ‘eufy_security.start_livestream’ targeting my doorbell device/entity and also ‘browser_mod.window_reload’ (Browser Mod is a separate integration installed via HACS). The window reload triggers a full refresh of the page which for me results in the video stream appearing quicker.

  4. When the script is triggered, the ‘last event’ conditional card from Step 1 disappears and in it’s place appears a separate conditional card which I have set to only appear when the camera state is “Streaming - p2p”

  5. This conditional card is a WebRTC video stream card (WebRTC is a separate integration installed via HACS) which allows for low latency live stream from the camera (only approx 2 seconds delay)

  6. Below this card I’ve also setup another conditional card which only appears when the camera state is “Streaming - p2p”. This is a button card which calls another script ‘script: Eufy camera OFF’.

  7. This script calls ‘eufy_security.stop_livestream’ targeting my doorbell device/entity and also calls service ‘homeassistant.reload_config_entry’ targetting my doorbell device/entity which cleanly reloads the entire eufy integration, which I’ve found neccessary to get everything working perfectly. Once the ‘Eufy camera OFF’ script is triggered we end up cleanly back at Step 1 with the ‘last event’ image which is clickable to restart the live stream.

  8. Additional to all this I have an automation ‘Eufy - Stop doorbell stream after 2.50 min’ which has a trigger type: state, which triggers when the doorbell changes state from “Idle” to “Streaming - p2p”. This then triggers the action of delay for 2.50 mins after which it calls the ‘Scripts: Eufy camera OFF’ to stop livestream and reload the integration automatically incase the button on the UI wasn’t triggered.

Thanks for this, you were my inspiration point for webrtc and conditional card usage. https://github.com/fuatakgun/eufy_security/#63-optional---webrtc

Steps 6-7-8 should not be required anymore because integration is automatically calling stop_livestream, in case there are no new bytes are coming. Just try it out yourself and please share your experience.

Awesome, could you please share code for this? Mostly lovelace but also perhaps scripts + automation :slight_smile:

1 Like

Yeah the conditional cards/WebRTC points are the same as explained before but thought I’d share the entire setup for other people who are interested, just so it’s all in one place :slight_smile:

I have had issues with the stream breaking (not being able to trigger the video stream a second/third/fourth time) and I’ve found that the service ‘homeassistant.reload_config_entry’ targeting my doorbell device/entity works to resolve that very quickly so thought it would be useful to share!

Interesting to know that the integration is automatically calling stop_livestream when no new bytes are received though!

1 Like

here is code pointer: https://github.com/fuatakgun/eufy_security/blob/9d2b8368189b210f6341f5b1e9ba27e5b9547a86/custom_components/eufy_security/camera.py#L159

in case, we do not receive bytes after 10 iteration, each iteration waits for 0.25 seconds, it calls `stop_livestream’

Regarding to sharing your examples, if you can create a discussion in github, I can update the README with a link to it.

1 Like