Eufy Camera Integration

Using CATT for this. Not great as currently there is some sort of issue that stream cuts every 10 minutes but I use an automation for this to restart the script every 10 min.

CATT: https://github.com/skorokithakis/catt
(See also https://blog.fuzzymistborn.com/homeassistant-and-catt-cast-all-the-things/)

  • This is just to stream a dashboard/lovelace to Hub. In there, I just have an picture entity card with sensor camera.doorbell_last_event (together with other stuff)*
alias: SmartDisplay_start
description: ''
trigger:
  - platform: time_pattern
    minutes: /10
condition:
  - condition: time
    after: '07:30'
    before: '23:59'
action:
  - data:
      addon: a0d7b954_ssh
      input: >-
        catt -d "Smart Display" cast_site
        http://IP_HOME_ASSISTANT:8123/lovelace-smartdisplay/homecard-smartdisplay
    service: hassio.addon_stdin
mode: single

Mmm sorry i think i misunderstood you, or you misunderstand me
I know how to cast my dashboard.
However i though u said, you cast the stream (of your eufy cam / doorbell) to google home device
But that i dont see in your automation

True, was already editing my post to add this. I do not have this working yet, also still searching for a method to stream on doorpress or motion on full screen to Hub. FOr example for 5 minutes and it closes again. Now the last event keeps constantly on the dashboard, which is not really required. So sorry, no method for that yet :). If someone knows in future, please share!

Yeah im trying to do the same, but i dont think its possible yet.
Still, maybe we can try to cast the still picture/thumbnail first?
That would be already something.
But that too , i dont succeed in

I can grab the RTMP url from the iobroker adapter via the REST api. The issue is the result includes quotes and I haven’t figured out how to strip the quotes to make it work with the generic camera integration.

Hi,

  • eufy security integration is based on python-eufy-security which, as far as I can see, is no longer being developed further
  • eufy addon bridge MQTT is based on eufy-node-client, which at the moment i see no more updates (i contributed a little bit to this lib - push notification and some p2p bugfixes)

My project started at the same time as the eufy-node-client project, with the difference that the eufy-node-client project was progressing faster, so I decided to contribute to it. However, when I needed some special features to integrate with ioBroker, I decided to make a spin-off from eufy-node-client.
Now my integration is more advanced than the others. Some examples:

  • I support 2FA
  • my P2P implementation already supports among others:
    • keep alive
    • reconnect on failure
    • checks the P2P response for success when issuing a command (the other implementations do not take this into account, so changing the guard mode could be considered as done, even if it is not).
    • There are some P2P events that are triggered directly by the station or device, like changing the guard mode (I already react to it) is also communicated via P2P (not only via push notification; just for info, the push notification can be disabled in the Eufy-App and then you won’t get anything over push…).

Anyway, I don’t want to force anyone to use my solution :wink:

I don’t have all the Eufy devices and so I can’t implement everything without help. So if someone wants me to add some functionality, just contact me and I will try (what i need then is support in testing the new funcionality, debug logs if something goes wrong etc.).

2 Likes

Digging in the eufy app code i found a piece of code that allows to trigger the chime via a RF433 dongle from the station using the P2P protocol. I think I read someone talking about this RF dongle in this thread.
I can implement it if anyone is interested. Is there someone who could test it?

    public static void addDongleChime(String str, String str2) {
        sendP2PRequest(str, str2, new P2PRequest(CommandType.APP_CMD_RF433_TRIGER_RING, ""));
    }

Nice to see you here @bropat, I am sure your development on your ioBroker adapter did some part of this currently awesome growing field of integration <3

Like 200 posts up you can see our ride along the mqtt train, that works, but is not at charming as it could be.

I think, technically speaking your adapter is the most advanced, specially the 2FA stuff is great (I personally don’t use it, if you want to hack and see me shirtless - feel free :stuck_out_tongue: ).

I guess in a perfect world you and matijse (I don’t thing he is here around) would get married and have a child called awesome-eufy-lib, and some fat cookie eating guy like me would build the home assistant addon around it, and someone else the iobroker adapter. This would definitely lead to world peace!

6 Likes

I tell google assistant “show doorbell on upstairs” – where doorbell is camera.doorbell and upstairs is media_player.upstairs (a chromecast device). Works like a charm.

1 Like

Eufy cam 2 at your service, whenever you need something tested pm me.

1 Like

:rofl: :rofl:
You made my day :smile:

When my adapter reaches stable status, I can imagine to start backporting the feature towards eufy-node-client. So matijse would benefit from it and indirectly the community. :wink:
I also thought of starting a backporting towards python-eufy-security, but that would be too many sites for my little spare time :stuck_out_tongue:
In any case, my code is freely available and if someone wants to start a backporting towards Python he can do it. If questions arise, I can try to answer them :wink:

PS: For the MQTT part I must confess, I have not read the previous posts :blush:

5 Likes

Not keen on that way…
Not everyone has an extra dongle ,or has a doorbell which transfer over RF433

I prefer the mqtt way with the doorbell press via push notificatin, that one always work without extra hardware

The reason why i use the addon bridge (node client) is cause for the doorbell press and motion detections

The reason i use security integration (python-eufy) is cause it always has thumbnail which i can use (with bridge thats a hit or miss) + the live time viewing that works…

Both in one, and able to cast live view automaticcaly would rock

For now, as i can read for your text, i dont see what it adds? (except 2FA, which i want too though)
Does it do all the stuff above too?
doorbellpress and live cam view and thumbnail? and motion?

How do i test yours?

What is supported with my adapter you can see in the readme of my git repo.

Currently only the RTMP stream is supported (without transcoding; will be implemented as soon as I have finished decoding the P2P part). Regarding the thumbnail, the support is about the same on with the addon bridge (integration is not finished yet; but will reach the quality of the security integration (python-eufy)). As I said before, the main focus right now is decrypting P2P communication.
Motion-detection etc. is already included (see Readme for more details).

If you are satisfied with your current solution, stick with it :wink:

2 Likes

I am struggling to get my Eufy doorbell to show up in HA now… I added the custom repository (https://github.com/nonsleepr/ha-eufy-security) and added the integration… but, I cannot find any entity with ‘camera.doorbell’ in my HA.

here is what I see in my logs:

2021-01-08 16:25:42 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for eufy_security which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2021-01-08 16:26:22 ERROR (MainThread) [homeassistant.components.camera] Error while setting up eufy_security platform for camera
  File "/config/custom_components/eufy_security/camera.py", line 31, in async_setup_entry
  File "/config/custom_components/eufy_security/camera.py", line 31, in <listcomp>
  File "/config/custom_components/eufy_security/camera.py", line 46, in __init__

I am not a developer but for the developers in this community I found that a Homey developer is working on a Eufy security app for Homey. Maybe for inspiration check https://github.com/martijnpoppen/com.eufylife.security

1 Like

Hi @bropat,

Thanks so much for effort and the work of @fuzzymistborn and @MaxW in this very long topic :). Your adapter in iobroker has allowed me to set the Guard Mode in my Homebase Model T8010 with two cameras and my powered doorbell Model T8200 which I have been waiting forever for.

I also have three Security 2K Indoor Cam Model T8410 that don’t work at all. In fact, they seem to crash the adapter. I can send more detailed logs but here’s the error from the log file:

2021-01-08 20:49:32.618  - ^[[31merror^[[39m: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
2021-01-08 20:49:32.618  - ^[[31merror^[[39m: eufy-security.0 (8661) unhandled promise rejection: Request failed with status code 404
2021-01-08 20:49:32.619  - ^[[31merror^[[39m: eufy-security.0 (8661) Error: Request failed with status code 404
    at createError (/opt/iobroker/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/opt/iobroker/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/opt/iobroker/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

These aren’t as critical to me but if you are able to get them working it would be appreciated.

Your stream continues forever? or it plays for 30 sec also?

I’m satisfied with current two addons, but if you do it all in one, then i prefer yours.
If you add 2FA its even better, if you do the stream longer, and i dont have to activate the camera, hell then you rock… even changing guard mode is a surplus

But, now it comes, im not sure how to use yours.
I have to install the iobroker and the iomqtt? (so also 2 things for you?)

1 Like

@golles can you answer this please?

Hi @gdagenais,

please activate the debug mode of the adapter and reproduce the error. Then please send me the logfile (note: the logfile contains sensitive data; mainly the token, so redact it).