Eufy Security Integration

I have a lot of those Errors in log.

2021-12-29 17:38:52 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/eufy_security/__init__.py", line 59, in update
    coordinator.async_set_updated_data(coordinator.data)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 287, in async_set_updated_data
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 505, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 93, in state
    if self.current_option is None or self.current_option not in self.options:
  File "/config/custom_components/eufy_security/select.py", line 65, in current_option
    return self.values_to_states[str(get_child_value(self.device.state, self.key))]
KeyError: '1'

Let’s track this as a GitHub issue?

Did it work?

Not really, it gave me the link to the camera stream, not the proxy link. But I didn’t want to bore you… :grin:

Then, i don’t know what is proxy link :slight_smile: what is it?

I have installed “RTSP Simple Server Add-on”. It connect to the camera and then republish the stream.
I wanted to try connect to it, instead of the rtsp of the camera, directly.
Something like rtsp://user:pass@75a80a57-rtsp-simple-server/camera1

My real problem is that I want to save videos of the events, outside Eufy app.
So I was configuring Frigate, but the stream from 2C Camera is instable because it just start when an event is triggered, and Frigate gets crazy. So, I tought that maybe, accessing the proxied stream on your addon, Frigate would not complain, and get the stream correctly when the event fires it up.

Just a correction, if you are using p2p streaming (assuming your camera doesn’t support native rtsp one), home assistant integration gathers all video chunk bytes and forward them to rtsp server add-on. But there is no way to connect to camera directly as camera doesn’t support it natively, i am imitating it using rtsp server. So, in your case, i would use that url, it should work fine.

!!! So, in my case, camera does support rtsp.
Can I delete the “RTSP Simple Server Add-on” because it’s used just for p2p streaming and I’m not actually using it??

Yes yes yes :slight_smile: just use the rtsp url from your camera in frigate, you don’t need rtsp server add-on.

I wanted to make it clear in Readme like this: Installing RTSP Simple Server Add On (for faster P2P streaming) - Required

Morning @anon63427907, since yesterday I receive this error message from eufy_security integration.

Logger: homeassistant.config_entries
Source: custom_components/eufy_security/coordinator.py:133
Integration: Eufy Security ([documentation](https://github.com/fuatakgun/eufy_security), [issues](https://github.com/fuatakgun/eufy_security/issues))
First occurred: January 2, 2022, 21:04:18 (1 occurrences)
Last logged: January 2, 2022, 21:04:18

Error setting up entry localhost for eufy_security

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/eufy_security/__init__.py", line 52, in async_setup_entry await coordinator.initialize() File "/config/custom_components/eufy_security/coordinator.py", line 70, in initialize await self.set_devices() File "/config/custom_components/eufy_security/coordinator.py", line 116, in set_devices if await self.async_get_device_properties() == False: File "/config/custom_components/eufy_security/coordinator.py", line 133, in async_get_device_properties for device in self.devices.values(): AttributeError: 'NoneType' object has no attribute 'values'

I maybe change some IP addresses and FQDNs in my network, so I am pretty sure the issue could be solved with some configuration but I don’t know where. Can you maybe help?

I try to change the host name from loacalhost directly to IP address, but changes seems to get ignored.
image

i see that home assistant can connect with add on but add on seems to failing to connect the physical devices. Please check add on logs, you will probably see me more helpful logs over there.

Thank you so much for this integration, but it created a really strange issue that I finally solved after more than 12 hours of debugging. I will include here in case anyone in future encounter the issue.


***ONLY APPLICABLE IF YOU ARE USING NODE-RED

If you are using Node-Red and this integration, you may have issues of your node-red not connecting to your HA server.

This could be because your websocket connection is broken, which is caused by MESSAGE SIZE EXCEEDED in the websocket call, which is caused by NODE-RED trying to retrieve all entities and attributes in a single call. See discussion: Client exceeded max pending messages [2]: 512 ¡ Issue #153 ¡ zachowj/node-red-contrib-home-assistant-websocket ¡ GitHub

This integration adds a ton of attributes which immediately broke websocket which then broke NODE-RED in a weird way.

I have 12 eufy cameras/devices which added 476 entities. I had to disable a ton of related entities from this integration and now everything is fine again.

Hope this may be useful for anyone who may also encounter this issue.

Just wanted to say thank you for all this. I set up my cameras >6 mos ago the old way and decided to check in on the latest when I found this update - very nice! And allowed me to significantly clean up my config file and reduce docker clutter. Pro 2 cameras “stream” - which is really just a single frame picture update every 10 seconds - but so much more than what I had before (which was really just using a HA proximity sensory to set different security modes). Thank you!

Can some1 help me out?
I tried to install the integration with this readme: GitHub - fuatakgun/eufy_security: Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.

Everything went fine till 6.3 installing integration
When I restart my home assistant - I install the integration - when I install ‘Eufy security’ I get a box where I have to fill in some info

I figured out I had to give in my email and password. After that it says it was installed successfully but no entity show up - when I log in on the eufy security website I can see my doorbell camera so it is connected to this account (yes I created a second


account without 2factor auth)
In the readme they say i have to see a box where I have to fill in localhost and so on but I don’t see that…

Can some1 help me out?
Thanks

Wow, sorry for the trouble :slight_smile: i am aware that we have too many entities but apparently there is a user base needing them :slight_smile:

Happy to hear that it is working for you for last 6 months and it will continue to functional in the future.

1 Like

i feel like you have used eufy integration from home assistant core, not custom eufy security integration. in this solution, you use add on configuration for username and password and then, use integration to connect to add on.

1 Like

I’m sorry man - you lost me :wink: What do I have to do?
If I get through this I will make a video on how to do it - hopefully that will help a lot of people :wink:

@mvanimpe
I had a similar problem when first installing the addon. The entities were missing.

Couldn’t figure it out, so I uninstalled first the addon and then the Hacs integration.

Then I followed the guide again, and next time it worked. Maybe it could work for you too?

Now, I am only waiting for the next update, which hopefully will make my cam fully supported :smiley:

When I install the eufy security add-on it gives me that port 3000 is already in use
When I look in my configuration.yaml file it’s used bij Hassio (google assistant plugin) .
How can I solve this?