Eufy Security Integration

Now the latest version of eufy-security-ws is 0.5.0, which uses driver version 1.2.0. :wink:

2 Likes

oh crap, hateful for you
Do they communicate about an open api?

Not that I know of. But there is a petition for it:

2 Likes

Yeah i signed that ages ago :slight_smile:

apparently, it was a typo from my end, created a new revision, please update your integration

1 Like

totally agree on bropat, he is doing heavy lifting here alone, reverse engineering what has been delivered by eufy engineers. I believe, there will be always issues here and there.

1 Like

I’m not sure i follow you
I dont see any updates available

However it seems the ws has some major changes/improvements and bug fixes
Did you see?
Also check https://github.com/fuatakgun/eufy_security/issues/59

Edit: ohhh you mean you fixed the widt and heigth?

Ok i’ll update as soon as it says theres one available

You can force update in hacs, rather than waiting for next cycle.

Regarding to new eufy ws version, i am getting all notifications and updates in client, don’t worry, but i need to confirm everything is working locally before moving forward. Latest version includes some bug fixes which i had noticed in 0.4.2.

Ok thx, i just updated.
Will see if i have it working now with width and heigth again.
Regarding update i see differtent stuff that might solve my problems (and others)
1.2.0

  • (bropat) Added experimental feature for supported devices: start/stop local RTSP streaming

.1.2 (2021-08-19)

  • (bropat) Fixed push notification issue on new indoor outdoor camera device (thx to @lenoxys)
  • (bropat) Fixed issue where device doesn’t support p2p connection

1.1.1 (2021-08-13)

  • (bropat) Fixed p2p video streaming for some devices (fallback mechanism implemented)
  • (bropat) Fixed p2p audio codec detection

And lots more until 0.9.4

The width and heigth works again, thanks !

@anon63427907

You have any ETA when you will move to the latest ws version?
Not to push you though, just curious and waiting for it.

I was busy with work stuff, I am planning to continue working on it next week. I will update respective github sim with my findings

1 Like

somehow current version don’t work ok. I have
eufy_security_addon 0.3.3 and latest from HACS

cameras and homestation become unavalable. (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: eufy_security …take more 10 minutes

addon errors:

2021-10-27 07:06:06.821  ERROR Status return code not 200 
{
  status: 400,
  statusText: 'Bad Request',
  data: {
    error: {
      code: 400,
      message: 'Invalid JSON payload received. Unknown name "fid": Cannot find field.\n' +
        'Invalid JSON payload received. Unknown name "appId": Cannot find field.\n' +
        'Invalid JSON payload received. Unknown name "authVersion": Cannot find field.\n' +
        'Invalid JSON payload received. Unknown name "sdkVersion": Cannot find field.',
      status: 'INVALID_ARGUMENT',
      details: [
        {
          '@type': 'type.googleapis.com/google.rpc.BadRequest',
          fieldViolations: [
            {
              description: 'Invalid JSON payload received. Unknown name "fid": Cannot find field.'
            },
            {
              description: 'Invalid JSON payload received. Unknown name "appId": Cannot find field.'
            },
            {
              description: 'Invalid JSON payload received. Unknown name "authVersion": Cannot find field.'
            },
            {
              description: 'Invalid JSON payload received. Unknown name "sdkVersion": Cannot find field.'
            }
          ]
        }
      ]
    }
  }
}
2021-10-27 07:06:06.854  ERROR Generic Error: 
 Error  FID Token renewal failed with error: Bad Request
error stack:
• service.ts:131 renewFidToken
    node_modules/eufy-security-client/src/push/service.ts:131:23
• service.ts:155 renewPushCredentials
    node_modules/eufy-security-client/src/push/service.ts:155:45
• service.ts:491 _open
    node_modules/eufy-security-client/src/push/service.ts:491:32
• service.ts:510 <anonymous>
    node_modules/eufy-security-client/src/push/service.ts:510:17
2021-10-27 07:06:06.870  ERROR Push credentials renew Error: 
 Error  FID Token renewal failed with error: Error: FID Token renewal failed with error: Bad Request
error stack:
• service.ts:135 renewFidToken
    node_modules/eufy-security-client/src/push/service.ts:135:19
• service.ts:155 renewPushCredentials
    node_modules/eufy-security-client/src/push/service.ts:155:45
• service.ts:491 _open
    node_modules/eufy-security-client/src/push/service.ts:491:32
• service.ts:510 <anonymous>
    node_modules/eufy-security-client/src/push/service.ts:510:17
2021-10-27 07:06:06.880  ERROR Push notifications are disabled, because the registration failed! 

HA logs:

2021-10-27 08:14:44 ERROR (MainThread) [homeassistant.components.alarm_control_panel] Error adding entities for domain alarm_control_panel with platform eufy_security
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 682, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 456, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 489, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 462, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/eufy_security/alarm_control_panel.py", line 132, in state
return CODES_TO_STATES[current_mode]
KeyError: -1

2021-10-27 08:14:44 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 56, 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 456, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 489, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 462, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/eufy_security/alarm_control_panel.py", line 132, in state
return CODES_TO_STATES[current_mode]
KeyError: -1

2021-10-27 08:14:46 ERROR (MainThread) [custom_components.eufy_security] eufy_security - Exception - process_messages: 'T8113N1320221D9C' - traceback: Traceback (most recent call last):
File "/config/custom_components/eufy_security/websocket.py", line 62, in process_messages
await self.on_message(msg)
File "/config/custom_components/eufy_security/websocket.py", line 68, in on_message
await self.message_callback(message)
File "/config/custom_components/eufy_security/coordinator.py", line 145, in on_message
self.set_value_for_property(event_source, serial_number, event_property, event_value)
File "/config/custom_components/eufy_security/coordinator.py", line 159, in set_value_for_property
device: Device = self.devices[serial_number]
KeyError: 'T8113N1320221D9C'
- message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"event","event":{"source":"device","event":"property changed","serialNumber":"T8113N1320221D9C","name":"battery","value":90,"timestamp":1635315286854}}', extra='')

Superb ! Thx mate!
All understanding here…
Work goes first

1 Like

can you create an issue over here? GitHub - bropat/eufy-security-client: This shared library allows to control Eufy security devices by connecting to the Eufy cloud servers and local/remote stations over p2p.

it looks like your execution environment cannot communicate with google servers to get client-id for push notifications.

Having an odd issue, I reloaded the Integration and now all three of my cameras are missing camera entities. All the other entities seem to be there and working great. Without a camera entity I cant get it in a normal picture card


Strange, i myself regularly restart add on and reload integration (not individual devices/entities) and not having any issue. Do you still have this issue after restarting HA? If yes, let’s track this as an GitHub issue.

Sorry fuatakgun,

looks like i figured out the issue. I Run eufy-security-ws and RSTP on a seperate pi in my custer. Portainer had it set to the latest tag and it looks like that caused the problem. Relaunching eufy-security-ws:0.4.2 instead of latest brought back the entities.

In case anyone else runs in to that issue, might be worth adding to the documentation for those that run these dockers not in HA

You are right, i will update readme accordingly, thanks for the heads up