Eufy Security Integration

Following up on my previous report, and related to a few other posts here in this thread made since then - In short, the event image property does not get updated (any camera, doorbell, seems device independent, but for the record I’m using T8160 S330 Eufycam and T8210 doorbell).
To be clear - the mobile app shows updated event images.
In the integration the event image does not get updated.
Notifications are not enabled, and I wanted them to stay disabled.

When I reported this a couple of weeks ago, @anon63427907 you asked that I create a a feature request with bropat and ask him if he can raise an event for regular forced updates. So I did, and his reply was that this already exists:

I apologize if I’m not asking the question 100% accurately, I’m just trying to have the integration imitate the way the mobile app is able to show updated event images. I’ve given up on streaming through the integration for now, so I wanted to at least have updated images, if possible… (I see there are others who posted here about the event image issue since then, so I know I’m not alone here… :-)).

1 Like

@anon63427907 could you please add eufyCam E330 integration, not working currently, happy to help to debug with remote access if it helps…

Hi! Rookie here :slight_smile:

First of, thanks for great integration @anon63427907!

I’m really new with HA and with this integration and I (maybe?) found a problem? Or at least need help.

Issue is that I would want to turn motion detection off in automation. Problem is that for some reason my switch request end up in error.

So when I click this switch to off, it doesn’t work.

image

Log reveals following

2023-12-05 20:09:12.107 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] {'name': 'motionDetection', 'value': False, 'serialNumber': 'T811111111111111', 'command': 'device.set_property', 'messageId': 'device.set_property.7bd779019d3840189d48c18a32dfbc4c'}
2023-12-05 20:09:12.107 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] send_message - {'name': 'motionDetection', 'value': False, 'serialNumber': 'T811111111111111', 'command': 'device.set_property', 'messageId': 'device.set_property.7bd779019d3840189d48c18a32dfbc4c'}
2023-12-05 20:09:12.114 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'result', 'success': True, 'messageId': 'device.set_property.7bd779019d3840189d48c18a32dfbc4c', 'result': {'async': True}}
2023-12-05 20:09:32.233 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'station', 'event': 'connection error', 'serialNumber': 'T811111111111111'}}
2023-12-05 20:09:43.556 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'station', 'event': 'connected', 'serialNumber': 'T811111111111111'}}
2023-12-05 20:09:43.920 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'device', 'event': 'command result', 'serialNumber': 'T811111111111111', 'command': 'set_property', 'returnCode': -5, 'returnCodeName': 'ERROR_PPCS_INVALID_PARAMETER', 'customData': {'property': {'name': 'motionDetection', 'value': False}}}}

But weird thing is that for example Motion Detection Sensitivity change worked → so prove that something works

2023-12-05 20:13:28.156 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] {'name': 'motionDetectionSensitivity', 'value': 6, 'serialNumber': 'T811111111111111', 'command': 'device.set_property', 'messageId': 'device.set_property.5f0ae559244a4e669c9c37a15079e6ab'}
2023-12-05 20:13:28.156 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] send_message - {'name': 'motionDetectionSensitivity', 'value': 6, 'serialNumber': 'T811111111111111', 'command': 'device.set_property', 'messageId': 'device.set_property.5f0ae559244a4e669c9c37a15079e6ab'}
2023-12-05 20:13:28.162 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'result', 'success': True, 'messageId': 'device.set_property.5f0ae559244a4e669c9c37a15079e6ab', 'result': {'async': True}}
2023-12-05 20:13:31.662 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'station', 'event': 'connected', 'serialNumber': 'T811111111111111'}}
2023-12-05 20:13:33.413 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'device', 'event': 'property changed', 'serialNumber': 'T811111111111111', 'name': 'motionDetectionSensitivity', 'value': 6}}
2023-12-05 20:13:33.414 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] camera _handle_property_changed - motionDetectionSensitivity
2023-12-05 20:13:33.426 DEBUG (MainThread) [custom_components.eufy_security.eufy_security_api] _on_message - {'type': 'event', 'event': {'source': 'device', 'event': 'command result', 'serialNumber': 'T811111111111111', 'command': 'set_property', 'returnCode': 0, 'returnCodeName': 'ERROR_PPCS_SUCCESSFUL', 'customData': {'property': {'name': 'motionDetectionSensitivity', 'value': 6}}}}

Unfortunately I was not able to figure out what is the reason for ERROR_PPCS_INVALID_PARAMETER. Anyone experienced similar? I didn’t find similar issues earlier in this thread. I appreciate any help from anyone!

Please share the logs from add-on too, integration is sending the request to add-on, apparently something is failing there

Hi
We have a problem the Motion sensor in ha do not activation, how can we dat fix?

Thanks for helping

Did you enable all push notifications from eufy app?

Published all accumulated changes under v7.7.4-beta-01 version. To get this release, you should enable beta versions from HACS.

  1. Uninstall RTSP Simple Server, not needed anymore.
  2. Install custom Webrtc integration from here (until I can merge my changes to upstream): GitHub - fuatakgun/WebRTC: Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies. - this comes with go2rtc. If you have a standalone one, this will use existing one.
  3. Set the go2rtc address in integration configuration panel (127.0.0.1 for Supervised or OS installation)
  4. Reload eufy_security integration and test.

You do not need conditional card anymore, just rely on custom Webrtc card.

type: custom:webrtc-camera
entity: camera.entrance
poster: image.entrance_event_image
ui: true
shortcuts:
  - name: Play
    icon: mdi:play
    service: camera.turn_on
    service_data:
      entity_id: camera.entrance
  - name: Stop
    icon: mdi:stop
    service: camera.turn_off
    service_data:
      entity_id: camera.entrance
1 Like

I tried posting this in the custom WebRtc card and I changed the entity to my camera.backyard camera but still cant get a stream. I just get a little window on my dashboard that says “error” in the top right corner and “can’t get URL for camera.backyard” in the top left.

And you call the respective service to initiate the stream, @vs6817

Sorry I’m super new to home assistant, just set it up earlier this week. I put this into the webrtc card, I do see a line there for service: camera.turn_on is there something else I should also be doing?

type: custom:webrtc-camera
entity: camera.backyard
poster: image.backyard_event_image
ui: true
shortcuts:

  • name: Play
    icon: mdi:play
    service: camera.turn_on
    service_data:
    entity_id: camera.backyard
  • name: Stop
    icon: mdi:stop
    service: camera.turn_off
    service_data:
    entity_id: camera.backyard

Please read the readme file

@anon63427907 I honestly thought I had followed the readme file step by step and have looked through it a few times since then as well to see what I may have missed. Everything else seems to be working perfectly so I’m very confident I just missed something (again still new to home assistant so I’m sure I’m just an idiot that overlooked something). I’ll try reading over it again but I’m honestly not sure what I may have missed.

Sorry to hijack this post, but I am really struggling to find the WebRTC custom card.

I posted this on GitHub.

I read the instructions many times but I just cannot see what I am doing incorrectly.

Trying clearing your cache

@anon63427907 I’m sorry but I went back and read, re-read, re-re-read the readme file. I deleted everything and redid it and I still can not get the streaming to work. Can you please point me in the direction of what I’m doing wrong.

After installing the integration and setting up the custom dashboard, what do you do next?

no you have need that?

If you want to use the integration, you must read the readme, right?

As we already called out earlier, add-on heavily relies on push notifications, so you must enable all kind of push notifications (motion detected, person detected, lock events, alarm events etc) in your mobile app. These notifications are not user based but device based so after enabling all these notifications, your main account will probably bloated with many push notifications. In android, there is a setting to disable specific notifications, please use it.

Lastly, your camera would not start streaming magically by itself, you have to call turn_on or turn_off services of respective camera entities. So, when you first install everything, you would not have any video until you call these functions. Moreover, P2P streaming might stop randomly because of low level technical issues, you can restart it again with turn_off and turn_on. You can trigger your automation's on camera states (idle, preparing, streaming).

Referring to readme

I do have the push notifications all on. After installing the custom dashboard (step 4 in the githun) I dont do anything else since that is the last step listed in the github.I do realize that the camera’s dont magically start streaming on their own but I did use the example code you included and changed the entities to my own camera. I do see that your code has the “camera.turn_on” and “camera.turn_off” which is also included in my custom webrtc card.