bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
177 stars 27 forks source link

[Bug]: Eufy Security Add-On Crashes on Start #125

Closed kardboard604 closed 2 years ago

kardboard604 commented 2 years ago

Version

0.9.4

Node version

Unable to get

Operating System type

Linux

Operating system version

Home Assistant OS 8.4

Describe the bug

New fresh HASS 2022.7.7 install on Raspberry Pi 4 B, following the instructions for the Eufy Security custom integration and after installing the add-on, found that it doesn't stay loaded. Can restart it and immediately do the config with a second Eufy Security account as suggested. Tried restarting HASS many times but no change, won't stay running. Tried another fresh install and same thing. Can follow the rest of the readme to get HACS, Eufy Security integration, RTSP Simple Server add-on, but obviously not fully working as Eufy Security Add-On just won't stay running. Was told by fuatakgun that this was a eufy-security-ws bug.

To reproduce

  1. Install add-on
  2. Start add-on, wait until it shows green in HASS
  3. Refresh page, find that it has crashed and isn't running.
  4. See logs

Screenshots & Logfiles

2022-08-01 04:41:25.409 INFO Eufy Security server listening on host 0.0.0.0, port 3000 /usr/src/app/node_modules/eufy-security-client/build/http/device.js:51 this.rawDevice.params.forEach(param => { ^ TypeError: Cannot read properties of null (reading 'forEach') at UnknownDevice.update (/usr/src/app/node_modules/eufy-security-client/build/http/device.js:51:35) at UnknownDevice.initializeState (/usr/src/app/node_modules/eufy-security-client/build/http/device.js:30:14) at Function.initialize (/usr/src/app/node_modules/eufy-security-client/build/http/device.js:1810:17) at EufySecurity.handleDevices (/usr/src/app/node_modules/eufy-security-client/build/eufysecurity.js:449:57) at HTTPApi. (/usr/src/app/node_modules/eufy-security-client/build/eufysecurity.js:117:50) at HTTPApi.emit (node:events:527:28) at HTTPApi.refreshDeviceData (/usr/src/app/node_modules/eufy-security-client/build/http/api.js:517:22) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async HTTPApi.refreshAllData (/usr/src/app/node_modules/eufy-security-client/build/http/api.js:530:9) at async EufySecurity.refreshCloudData (/usr/src/app/node_modules/eufy-security-client/build/eufysecurity.js:499:9)

Additional context

No response

kardboard604 commented 2 years ago

Updating to Home Assistant 2022.8.2 with OS 8.4 fixed it, nothing else needed.