fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
877 stars 73 forks source link

Notification on HA boot: "Eufy Security - Error" #866

Closed alexeiw123 closed 1 year ago

alexeiw123 commented 1 year ago

Describe the bug

On boot of home assistant a HA notification is generated with the title: "Eufy Security - Error"

Error: <Task finished name='Task-3351' coro=<WebSocketClient._process_messages() done, defined at /config/custom_components/eufy_security/eufy_security_api/web_socket_client.py:62> result=None>

To reproduce

Steps to reproduce the behavior:

  1. Notification content is: v6.3.3
  2. Restart Home Assistant
  3. See error in notifications

Additional information

Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;

home-assistant_2023-08-01T22-31-56.228Z.log

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023-08-01 22:03:26.231  INFO  Eufy Security server listening on host 0.0.0.0, port 3000 
2023-08-01 22:03:27.313  ERROR Data decryption error, invalidating session data and reconnecting... 
 Error  error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
details:
{
  library: 'digital envelope routines',
  function: 'EVP_DecryptFinal_ex',
  reason: 'bad decrypt',
  code: 'ERR_OSSL_EVP_BAD_DECRYPT'
}
error stack:
• cipher:193 final
    node:internal/crypto/cipher:193:29
• utils.ts:190 decryptAPIData
    usr/src/app/node_modules/eufy-security-client/src/http/utils.ts:190:16
• api.ts:1072 decryptAPIData
    usr/src/app/node_modules/eufy-security-client/src/http/api.ts:1072:47
• api.ts:1270 getPassportProfile
    usr/src/app/node_modules/eufy-security-client/src/http/api.ts:1270:46
• task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5
• api.ts:384 login
    usr/src/app/node_modules/eufy-security-client/src/http/api.ts:384:33
• eufysecurity.ts:756 connect
    usr/src/app/node_modules/eufy-security-client/src/eufysecurity.ts:756:9
• server.ts:495 start
    usr/src/app/node_modules/eufy-security-ws/src/lib/server.ts:495:9
• server.ts:66 <anonymous>
    usr/src/app/node_modules/eufy-security-ws/src/bin/server.ts:66:9
2023-08-01 22:03:45.005  INFO  Connected to station T8010P1320020B7D on host 192.168.1.10 and port 21653 
2023-08-01 22:03:45.429  INFO  MQTT connection successfully established 
2023-08-01 22:03:45.823  INFO  Successfully registered to MQTT notifications for lock T8520Q2021370971 
2023-08-01 22:03:47.304  INFO  Connected to station T8422N1021320AE8 on host 192.168.1.35 and port 19430 
2023-08-01 22:03:47.332  INFO  Connected to station T8423N1022160753 on host 192.168.1.73 and port 19430 
2023-08-01 22:03:48.801  INFO  Push notification connection successfully established 
2023-08-01 22:03:50.654  INFO  Connected to station T8520Q2021370971 on host 192.168.1.33 and port 25811 
2023-08-01 22:04:20.899  INFO  Initiated closing of connection to station T8520Q2021370971 for saving battery. 
2023-08-01 22:04:20.902  INFO  Disconnected from station T8520Q2021370971 
2023-08-01 22:09:30.184  INFO  Client disconnected with ip: 127.0.0.1 port: 32874 code: 1000 reason: Normal Closure 
2023-08-01 22:23:23.077  INFO  Client disconnected with ip: 127.0.0.1 port: 42586 code: 1006 reason: Abnormal Closure 
2023-08-01 22:25:17.270  INFO  Client disconnected with ip: 127.0.0.1 port: 44476 code: 1000 reason: Normal Closure 

Yes

Additional context

As far as I know, all functionality is OK, just an error on startup.

manually downloading v 6.3.1 removes the issue

johnjoemorgan commented 1 year ago

I had a similar error after upgrade:

Error: <Task finished name='Task-4465' coro=<WebSocketClient._process_messages() done, defined at /config/custom_components/eufy_security/eufy_security_api/web_socket_client.py:62> result=None>

This cleared after a second reboot.

kloodhu commented 1 year ago

i have the same error on integration reload.

Error: <Task finished name='Task-5101' coro=<WebSocketClient._process_messages() done, defined at /config/custom_components/eufy_security/eufy_security_api/web_socket_client.py:62> result=None>

zejulio commented 1 year ago

Same here, error just after installing, rebooted HA and it does not show up again.

alexeiw123 commented 1 year ago

I still get the error on subsequent reboots, just for some reason it takes a while to show up. Or at least, I just had it show up sometime after upgrading HA OS.

fuatakgun commented 1 year ago

I am just raising a notification when connection is broken between add-on and home assistant. So, even you see this notification, it is not causing any issues? I am asking this because, I do not see any disconnection in the logs neither any error. If so, I would live with it because I am planning to work on reconnection/recovery later on

alexeiw123 commented 1 year ago

I am just raising a notification when connection is broken between add-on and home assistant. So, even you see this notification, it is not causing any issues? I am asking this because, I do not see any disconnection in the logs neither any error. If so, I would live with it because I am planning to work on reconnection/recovery later on

Yes that's correct - over the last few days I've not noticed any issues in functionality on the latest version of add-on and integration beyond the error notification.

fuatakgun commented 1 year ago

btw, you would see this while rebooting your server or HA, given that connection would be interrupted between systems.

Anyway, until then, I will improve this so if any random disconnection happens, I would try to reconnect HA to add-on.

thanks for raising

geidorei commented 1 year ago

snap - and no live stream after August core update. No doubt will get sorted soon.

alexeiw123 commented 1 year ago

and no live stream after August core update

might be unrelated. all 3 of my cameras can still stream.

kvanbiesen commented 1 year ago

Same, notification pops up, just clear it and everything is working, not a big issue

fuatakgun commented 1 year ago

https://github.com/fuatakgun/eufy_security/issues/877