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.
MIT License
484 stars 69 forks source link

[Bug]: Battery Doorbell already exists lib won't start #145

Closed lenoxys closed 2 years ago

lenoxys commented 2 years ago

Client version

2.0.0

Node version

16.15

Operating System type

Linux

Operating system version

Debian 11

Describe the bug

Hello,

When starting the script and getting the list of device the lib will stop when trying to load the battery doorbell.

I was looking in insane debug mode but I don't see anything related to that issue. lib crash right away loading the doorbell.

Regards, Aurelien

To reproduce

Have a battery doorbell seems to make the issue

Screenshots & Logfiles

DuplicateDeviceError: Device with this serial T8210PXXXXXXXXX exists already and couldn't be added again!
    at EufySecurity.addDevice (/home/adelamarre/plugin2/node_modules/eufy-security-client/src/eufysecurity.ts:285:19)
    at EufySecurity.handleDevices (/home/adelamarre/plugin2/node_modules/eufy-security-client/src/eufysecurity.ts:491:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional context

No response

bropat commented 2 years ago

@lenoxys

Could you please send me the complete debug logs?

lenoxys commented 2 years ago

Can I send it to you by email ?

bropat commented 2 years ago

Can I send it to you by email ?

Yeah

lenoxys commented 2 years ago

Can I send it to you by email ?

Yeah

done

bropat commented 2 years ago

@lenoxys

I replied to your email and attached a test version that should fix the problem. Could you please try it and give me feedback?

Thx!

lenoxys commented 2 years ago

Hey,

looking at my email. I didn't see anything even on my spam. Is it the one in develop branch ?

Thx!

bropat commented 2 years ago

Gmail has blocked the mail... :(

eufy-security-client-2.0.1.zip

Rename it from .zip to .tgz

lenoxys commented 2 years ago

looks good I don't have error when starting! I will leave it during a week.

bropat commented 2 years ago

Fixed in version 2.0.1