Eufy Security Integration

I have updated the master branch with latest developments (new sensors and using go2rtc for p2p streaming hoping to be more reliable). If you are up to test, please try master version using HACS, if not, wait for new release version.

Big thanks to @bropat who made this possible. Please consider buying a coffee for him over here: https://ko-fi.com/bropat

1 Like

I have recently added two 3C in addition to my 2C cameras. If I turn on RSTP option there, the max recording in the app is restricted to Full HD, so same and no improvements to the 2C.

Is there a way to get a stream to HA without RSTP enabled for this models as the eufy app is able to stream without as well?

to be honest, there is P2P based streaming but I do not think it is reliable enough for streaming yet.

But, can you just enable the RTSP for these cameras using this integration (you can enable RTSP here) and skip the restriction of 3 if not using the mobile app?

Ah. Thought that P2P can only be enabled for cameras without RSTP. Anyway. Pressed the start button the Video Queue Size started increasingly but the stream status remained in preparing forever.

I tried you other ideas as well and started (HA switch) RSTP on the device, but then more or less everything is suspicious. The start/stop rspt stream buttons entities are not there. start_camera service stets stream status to preparing as will and there is stays forever. stop_camera not possible because “camera is not on”.

The video recording input is staying on 4K, but in the app (or after restart of add-on and integration) it is then already 1080 (checked this later).

And the end stream-status, recording resolution, etc. was wrong and the whole integration/add-on stopped working and I restarted all of them.

Doesn’t matter. I’m looking forward to the improved P2P option and will try again with this (if I can find out how to use/set-up it then).

Reason as explained: The camery should still record 4k, but I would like to see the a stream (few times a and in special cases) in HA. To reduce the cam to 1080, then I would have again a 2C. :joy:

Installed everything to use a S330 Doorbell camera.

Still getting an error that Eufy security can not find anything :

Imgur

This is the log file :

2023-11-23 09:46:52.566 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 127.0.0.1 for eufy_security
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 402, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/eufy_security/init.py”, line 50, in async_setup_entry
await coordinator.initialize()
File “/config/custom_components/eufy_security/coordinator.py”, line 39, in initialize
await self._api.connect()
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 71, in connect
await self._set_schema(SCHEMA_VERSION)
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 147, in _set_schema
await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.set_api_schema, schema_version=schema_version))
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 324, in _send_message_get_response
return await future
^^^^^^^^^^^^
custom_components.eufy_security.eufy_security_api.exceptions.FailedCommandException: {‘type’: ‘result’, ‘success’: False, ‘messageId’: ‘set_api_schema.055bff92287e4ec1a242f1db31320f4e’, ‘errorCode’: ‘schema_incompatible’}
2023-11-23 09:46:53.544 WARNING (SyncWorker_7) [websocket] websocket connected
2023-11-23 09:46:56.932 ERROR (MainThread) [homeassistant.components.motion_blinds.gateway] Could not find working interface for Motion Blinds host 192.168.0.183, using interface ‘any’
2023-11-23 09:47:12.448 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.dhwp_actuator_water_consumption (<class ‘homeassistant.components.overkiz.sensor.OverkizStateSensor’>) is using state class ‘measurement’ which is impossible considering device class (‘volume’) it is using; expected None or one of ‘total_increasing’, ‘total’; Please update your configuration if your entity is manually configured, otherwise create a bug report at Issues · home-assistant/core · GitHub
2023-11-23 09:58:24.979 ERROR (SyncWorker_7) [websocket] [Errno 104] Connection reset by peer - goodbye
2023-11-23 09:58:25.108 WARNING (SyncWorker_7) [websocket] websocket connected
2023-11-23 10:00:24.096 ERROR (MainThread) [frontend.js.latest.202310302] Uncaught error from Chrome 119.0.0.0 on Windows 10
TypeError: Cannot read properties of null (reading ‘removeEventListener’)
renderHeading (src/components/ha-dialog.ts:51:24)
apply (src/scoped-custom-element-registry.js:262:44)
mainWindow.history.pushState (src/dialogs/make-dialog-manager.ts:129:7)
2023-11-23 10:07:59.740 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 127.0.0.1 for eufy_security
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 402, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/eufy_security/init.py”, line 50, in async_setup_entry
await coordinator.initialize()
File “/config/custom_components/eufy_security/coordinator.py”, line 39, in initialize
await self._api.connect()
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 71, in connect
await self._set_schema(SCHEMA_VERSION)
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 147, in _set_schema
await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.set_api_schema, schema_version=schema_version))
File “/config/custom_components/eufy_security/eufy_security_api/api_client.py”, line 324, in _send_message_get_response
return await future
^^^^^^^^^^^^

Can someone tell me what is wrong?

I just updated my HA OS and Core to the latest ones. I had the Eufy integration working just fine. Now it doesnt work at all. I updated the Eufy security integration through HACS too and nothing. So I tried to reinstall it, but it never asks me to login to Eufy or anything. Just goes through and when I set it up to 127.0.0.1, it just says “no devices or entities” and “failed to setup”.

This is the error in the integration logs that shows up.

2023-11-26 03:24:13.615 INFO Client disconnected with ip: 172.30.32.1 port: 49886 code: 1000 reason: Normal Closure
2023-11-26 03:24:13.617 ERROR Message error
Error
details:
{
schemaId: 19,
errorCode: ‘schema_incompatible’
}
error stack:
• server.ts:91 receiveMessage
src/lib/server.ts:91:27

• server.ts:68
src/lib/server.ts:68:53

• node:events:513 emit
node:events:513:28

• websocket.js:1178 receiverOnMessage
node_modules/ws/lib/websocket.js:1178:20

• node:events:513 emit
node:events:513:28

• receiver.js:528 dataMessage
node_modules/ws/lib/receiver.js:528:14

• receiver.js:446 getData
node_modules/ws/lib/receiver.js:446:17

• receiver.js:148 startLoop
node_modules/ws/lib/receiver.js:148:22

• receiver.js:83 _write
node_modules/ws/lib/receiver.js:83:10

• writable:391 writeOrBuffer
node:internal/streams/writable:391:12

Searching with the error code would give you the reason quickly either in this forum or github issues

Thanks for the reply,

I think I am not schooled enough to understand the errorcodes and how to solve them…

The codes I am seeing (566) I really do not know how to fix them.

that’s the one you are looking for. Means your addon is outdated and doesn’t support the integration

In your case I suspect it’s the same.

This did fix most of the issue. I totally forgot that it used an Add On, my bad. I can see all of my T8520N locks now. But the only available entities that show up for them are debug for device and station. I cannot lock or unlock the lock at all. In fact it didnt create a lock entity. Add on logs shown below.

2023-11-26 17:46:05.325 INFO Eufy Security server listening on host 0.0.0.0, port 3000
2023-11-26 17:46:08.531 INFO MQTT connection successfully established
2023-11-26 17:46:08.599 INFO Successfully registered to MQTT notifications for lock T8520Q1020280AFD
2023-11-26 17:46:08.601 INFO Successfully registered to MQTT notifications for lock T8520Q25224504A7
2023-11-26 17:46:08.602 INFO Successfully registered to MQTT notifications for lock T8520Q2522450D22
2023-11-26 17:46:09.922 INFO Push notification connection successfully established
2023-11-26 17:46:11.600 INFO Connected to station T8520Q1020280AFD on host 192.168.1.107 and port 27519
2023-11-26 17:46:11.783 INFO Connected to station T8520Q25224504A7 on host 192.168.1.229 and port 28144
2023-11-26 17:46:18.148 INFO Client disconnected with ip: 127.0.0.1 port: 50230 code: 1000 reason: Normal Closure
2023-11-26 17:46:23.413 ERROR All address lookup tentatives failed.
{
stationSN: ‘T8520Q2522450D22’
}
2023-11-26 17:46:23.418 INFO Timeout connecting to station T8520Q2522450D22
2023-11-26 17:46:41.761 INFO Initiated closing of connection to station T8520Q1020280AFD for saving battery.
2023-11-26 17:46:41.762 INFO Disconnected from station T8520Q1020280AFD
2023-11-26 17:46:42.077 INFO Initiated closing of connection to station T8520Q25224504A7 for saving battery.
2023-11-26 17:46:42.077 INFO Disconnected from station T8520Q25224504A7
2023-11-26 17:47:15.116 INFO Client disconnected with ip: 127.0.0.1 port: 50236 code: 1000 reason: Normal Closure
2023-11-26 17:47:46.773 INFO Client disconnected with ip: 127.0.0.1 port: 41182 code: 1000 reason: Normal Closure
2023-11-26 17:48:03.954 INFO Client disconnected with ip: 127.0.0.1 port: 56630 code: 1000 reason: Normal Closure
2023-11-26 17:49:09.294 INFO Client disconnected with ip: 127.0.0.1 port: 56638 code: 1006 reason: Abnormal Closure
2023-11-26 17:50:37.707 INFO Client disconnected with ip: 127.0.0.1 port: 48034 code: 1000 reason: Normal Closure
2023-11-26 17:53:49.863 INFO Client disconnected with ip: 127.0.0.1 port: 43828 code: 1000 reason: Normal Closure

Dont have any eufy locks sorry. I use Nuki as a smart lock.

@anon63427907 i would like to test the new P2P / go2rtc implementation. Is it possible yet by switching to master branch ?

I am publishing everything into master (as if it is garbage, please hold on more), it is not ready to be picked yet

haha :smiley: ok no problem

I fixed it. It appears that the integration disabled nearly all but the debug entities for each lock. I have no idea why it would do this. Home assistant even said it was the integration that disabled it. But I manually enabled all of the entities needed for each lock and then after 30 seconds, it worked just fine. Maybe a bug issue to look into for the dev of this integration?

What is the entity name? Control entities (main ones) are not supposed to be in the diagnostic section.

Is someone using the motion sensors of the devices? How do you do this.

I expected the motion is always set to true if there is motion and on to person if a person is found and on top person_name, when the person is identifies.

But here it is that way, that motion is only set when a person name is identified only perseon sensor is set. If an unknown person is found person is set and name of person_name is unknown and only when no person is found motion is set.

So if I want to send a notification I would have to trigger on motion and person_name.

Is this the case for those, who are using motion as trigger as well, esp. that motion is only triggered when not a person, and person is only triggered when unknown_person?

Edit: BTW The states of the person_name sensor are not the best at the moment. Unknown for not know person is hardly usable in HA, because it is a restricted word and has other Meaning and NULL/empty is hard to use either. At least it should be Normal or off instead of empty as in other sensors and not_known or whatever else for unknown persons instead of Unknown.

Thanks for the reply, wich one is outdated?

Greetings,

Erik.

The add on I suspect. Your integration invokes a scheme which the addon doesn’t support.

Can you share details of the add on you use? Did you switch to the bropat version?