Eufy Camera Integration

no need for Kofi

unfortunately right now retrieval of video events isnt a thing yet. I believe its being worked on, but it hasnt made it into the current repositories.

Join us :smiling_imp:

Hi,
After follow the guide made by @fuzzymistborn and dealing with IO broker, I have not been able to play video on HA lovelace.
Everytime I try to load the video I get decoding/demuxing errors. It looks to be related with stream component and I havent been able to solve it (even changing some constants in stream component code).

I tried to made a research to solve it, but after some days I havent been able to do it. Also, randomly the iobroker instance crashesh and the only way to detect it is when actions on rest api doesnt make effect (so i need to make it manually).

The errors I get on demuxing seems related to libav codecs (so no related to eufy directly).

If anyone has deal with this, hope you can help.

Logger: libav.h264
Source: components/stream/worker.py:128
First occurred: 13:21:56 (4 occurrences)
Last logged: 13:28:29

error while decoding MB 33 29, bytestream -16
error while decoding MB 35 29, bytestream -13
error while decoding MB 31 29, bytestream -7
error while decoding MB 33 29, bytestream -10

Similar error:

Error demuxing stream: [Errno 1414092869] Immediate exit requested: 'http://192.xxxxxxx:8082/eufy-security.0/T8020P1xxxxxx9/live/T8222Pxxxxxxxxx.m3u8'; last error log: [h264] error while decoding MB 35 29, bytestream -13

Looks like maybe we need to wait some time for stream component to be better.

Hello,
Anyone get luck with last event video with iobroker. Everything working except last event video there is no URL in iobroker.
My doorbell is T8200

Nope. I can get last livestream, but not last event.

I’m seeing the following error when attempting to steam last_event_video_url or livestream

|host.iobroker|2021-03-24 14:27:09.120|warn|Do not restart adapter system.adapter.eufy-security.0 because restart loop detected|
|---|---|---|---|
|host.iobroker|2021-03-24 14:27:09.120|info|Restart adapter system.adapter.eufy-security.0 because enabled|
|host.iobroker|2021-03-24 14:27:09.119|error|instance system.adapter.eufy-security.0 terminated with code 6 (UNCAUGHT_EXCEPTION)|
|eufy-security.0|2021-03-24 14:27:09.085|info|(2666) terminating with timeout|
|eufy-security.0|2021-03-24 14:27:09.084|info|(2666) Disconnected from station ******.|
|eufy-security.0|2021-03-24 14:27:08.050|info|(2666) Disconnected from station ******.|
|eufy-security.0|2021-03-24 14:27:07.396|warn|(2666) Terminated (UNCAUGHT_EXCEPTION): Without reason|
|eufy-security.0|2021-03-24 14:27:07.395|info|(2666) terminating|
|eufy-security.0|2021-03-24 14:27:07.394|info|(2666) Disconnect from station ******.|
|eufy-security.0|2021-03-24 14:27:07.393|info|(2666) Disconnect from station ******.|

If I then check in instances I see that the connection to host and heartbeat is lost and I have to reload the instance to get it working again.

Any thoughts on what’s happening?

With me last event is randomly available on 2 of the 3 cameras, for one it’s never visible. Doorbell last event is most often saved under the name/code of a different camera. Also have quite some errors related to downloading the video.

You could try to force eufy to process lower quality. I did this myself and that had some effect. Still errors but no longer on the video images but on the sound (AAC)

I tried it, but still get same results. I think maybe is a network issue. Will try in a new home with different local area network topology and will see

Hi i have read this guide

but my livestream in iobroker doesnt have a link, its blank.

Also when i make the rest sensor in sensor.yaml it doesnt show in home assistant. To see what mode eufy uses etc.

Is there a trick to this? Also the guide doesnt mention the addon that is mentioned in this thread.

So im wondering whats the right way to this.

Yeah, the blog is out of date on the livestream part. I haven’t had time to go back to figure it out again as the ioBroker adapter has undergone some major changes.

The mode sensor should work. Please post what you have in your config so we can help.

And the mqtt bridge came out after I wrote the post, that’s why it’s not mentioned (nor have I played with it at all).

Thanks i got this working:

http://10.0.0.35:8087/getPlainValue/eufy-security.0.X.station.guard_mode
http://10.0.0.35:8087/getPlainValue/eufy-security.0.X.cameras.Y.livestream
 
 - platform: generic
    name: Ringeklokke
    still_image_url: http://10.0.0.35:8082/eufy-security.0/X/last_event/X.jpeg

However the most important thing for me is to access livestream/livestream. But livestream always show as “no stream” and looking at the ioadapter there is not and option. Is there a trick for it to be able to stream live?

Yes, like I said the adapter changed. Maybe someone else can help you figure out which of the new options you need to use (it’s no longer livestream but one of the other ones).

I got a bit further, with starting the stream pulled the url which ends in .m3u but when i press the livestream camera in lovelace to change to live view, i get a play button which buffers, but nothing happens.

i got livestream working, not on a laptop but on my phone, allthough it looks like this so baby steps it seems

error message from logs

anything you have seen before @bropat?

Hi all, i just want to say thanks so much for this integration, i dont use streams but the image recall works great.

One question - does anyone have an example binary sensor config for motion and or person detection? I just want to monitor person detected events that trigger lighting automations at night etc… but im a complete noob with YAML and dont really get how to monitor the true false response from this endpoint.

I have spent a couple of hours looking for this tna.

any help appreciated. im sure its really simple

Here’s what I have, haven’t paid close attention to it but it seems to work:

  - platform: mqtt
    state_topic: "iobroker/eufy-security/frontdoor/doorbell"
    name: Eufy Doorbell Button
    unique_id: eufy_doorbell_button
    payload_on: "true"
    payload_off: "false"
    value_template: "{{ value }}"
  - platform: mqtt
    state_topic: "iobroker/eufy-security/frontdoor/motion"
    name: Eufy Doorbell Motion
    unique_id: eufy_doorbell_motion
    payload_on: "true"
    payload_off: "false"
    value_template: "{{ value }}"
    device_class: motion
  - platform: mqtt
    state_topic: "iobroker/eufy-security/frontdoor/person"
    name: Eufy Doorbell Person
    unique_id: eufy_doorbell_person
    payload_on: "true"
    payload_off: "false"
    value_template: "{{ value }}"
    device_class: motion

You need to set up MQTT for the various things in the ioBroker adapter page.

ah ok sorry I wasnt planning on using MQTT for this but rather rest API to iobroker as per the mode selector.

i have zero MQTT knowledge!

That’s really never going to be fast enough is the issue. You’d have to refresh the rest API every second which isn’t TERRIBLE but not ideal. MQTT is pretty easy to get set up so I’d encourage you to run down that rabbit hole. Lots of guides and info out there.