homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
166 stars 24 forks source link

[Bug]: Plugin does not work with node 20.x.x #505

Closed guitardoc closed 5 months ago

guitardoc commented 7 months ago

What happened?

Plugin does not work with node 20.x.x

Device Type

Doorbell (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.6.x (Supported)

NodeJS Version

v18 (Supported)

Operating System

Debian 10+ (Supported)

Relevant log output

See above

config

See above
github-actions[bot] commented 7 months ago

Did you check this Common Issues pages ?

guitardoc commented 7 months ago

Is there any plan to make the plugin work with Node 20?

jfishfl commented 7 months ago

Downgraded to 18.15.0 and is now working. Hopefully, there Is an update soon

codyc1515 commented 7 months ago

Are you seeing errors in the logs?

guitardoc commented 7 months ago

I just rechecked it with node 20.11.0 and now it works fine. Issue can be closed if nobody else encounters problems with node20.

guitardoc commented 6 months ago

Today I installed node 20.11.1 and, again, the plugin does not work with it. It works with 20.11.0 but not with 20.11.1. The error message said that the camera wouldn't start in time and that no source for the camera could be found. When falling back on node 20.11.0 it works like a charm. Very strange.

guitardoc commented 6 months ago

Here are the error messages under node 20.11.1:

[03/14/2024, 09:54:34] [EufySecurity] ERROR Türklingel Local livestream didn't start in time. Abort livestream request. [03/14/2024, 09:54:34] [EufySecurity] WARN Türklingel Could not get snapshot from livestream! [03/14/2024, 09:54:34] [EufySecurity] WARN Türklingel No camera source detected.

As already said, node 20.11.0 works fine but 20.11.1 does not.

DWLaurie commented 5 months ago

I attempted to upgrade to 20.12.1 today from 20.11.0; 20.12.1 (LTS) still does not work with my cameras (doorbells T8213). I downgraded back to 20.11.0 and functionality returned.

lenoxys commented 5 months ago

In February, Nodejs introduced a security fix on their new version which break the plug-in there is no workaround atm than downgrading. You can use special version likes 2.3.26+ which should warn you when using an incompatible version of NodeJS. See Readme.

lhari84 commented 5 months ago

Hi @lenoxys I'm currently using the plugin just to expose my S220 cameras to Homekit as a security system (not as a camera), which allows me to switch between camera recording- and alerting-states autmatically, using Homkit-automations and scenes.

Anyway, I just want to report this was working fine while using latest Nodejs-version together with v2.3.21. Only when I upgrade to v2.3.22+ when using latest Nodejs-version, plugin is completely broken and also shows the mentioned warning in logs.

My personal solution for now was to downgrade plugin to v2.3.21 and stay with latest Nodejs-version instead.

lenoxys commented 5 months ago

hum, let me check what I can do !

lhari84 commented 5 months ago

@lenoxys Thank you! No problem so far, I'm just using v2.3.21 till newer version supports latest Nodejs-version. I was just surprised that older version v2.3.21 works wit latest Nodejs-version and the latest ones do not... :)

lenoxys commented 5 months ago

Advanced users should always have choice !

image
lhari84 commented 5 months ago

@lenoxys Hi, I've tried new version v2.3.29 but had no luck at all. Even when activating the Bypass switch, I was not able to get the alarm system functionality working with this version. Devices popped up in Homekit, but not working at all. I even tried to completely reinstall the plugin, of course I've also tried to remove all devices from Homekit Cache, etc. Also, in logs all of my 3 S220 cameras appeard twice when restarting homebridge. I've recoverd my my backup with v2.3.21 again now to get it working again.