bropat / eufy-security-ws

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

[Bug]: Lock command fail T8520 - brand new device/account #279

Closed kebel87 closed 12 months ago

kebel87 commented 1 year ago

Version

1.7.1

Node version

?

Operating System type

Other

Operating system version

HassOS

Describe the bug

Eufy S230 (T8520) lock is reporting correctly in home assistant using this add-on Fuatakgun HACS integration.

However, whenever I try to control the lock (lock or unlock) I get an error message.

To reproduce

  1. Click in lock
  2. Get error message
  3. Read logs below

Screenshots & Logfiles

2023-11-20 16:55:44.560 ERROR Unexpected error Error Public key is not valid for specified curve details: { code: 'ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY' } error stack: • errors:405 NodeError node:internal/errors:405:5

• diffiehellman:167 dhComputeSecret node:internal/crypto/diffiehellman:167:11

• utils.ts:549 getAdvancedLockKey usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:549:25

• utils.ts:669 getLockP2PCommand usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:669:39

• station.ts:4419 lockDevice usr/src/app/node_modules/eufy-security-client/src/http/station.ts:4419:46

• eufysecurity.ts:1149 setDeviceProperty usr/src/app/node_modules/eufy-security-client/src/eufysecurity.ts:1149:31

• task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5

• message_handler.ts:209 handle usr/src/app/node_modules/eufy-security-ws/src/lib/device/message_handler.ts:209:17

• server.ts:125 receiveMessage usr/src/app/node_modules/eufy-security-ws/src/lib/server.ts:125:21

Additional context

No response

pyr8 commented 1 year ago

Version

1.7.1

Node version

?

Operating System type

Other

Operating system version

HassOS

Describe the bug

Eufy S230 (T8520) lock is reporting correctly in home assistant using this add-on Fuatakgun HACS integration.

However, whenever I try to control the lock (lock or unlock) I get an error message.

To reproduce

1. Click in lock

2. Get error message

3. Read logs below

Screenshots & Logfiles

2023-11-20 16:55:44.560 ERROR Unexpected error Error Public key is not valid for specified curve details: { code: 'ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY' } error stack: • errors:405 NodeError node:internal/errors:405:5

• diffiehellman:167 dhComputeSecret node:internal/crypto/diffiehellman:167:11

• utils.ts:549 getAdvancedLockKey usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:549:25

• utils.ts:669 getLockP2PCommand usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:669:39

• station.ts:4419 lockDevice usr/src/app/node_modules/eufy-security-client/src/http/station.ts:4419:46

• eufysecurity.ts:1149 setDeviceProperty usr/src/app/node_modules/eufy-security-client/src/eufysecurity.ts:1149:31

• task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5

• message_handler.ts:209 handle usr/src/app/node_modules/eufy-security-ws/src/lib/device/message_handler.ts:209:17

• server.ts:125 receiveMessage usr/src/app/node_modules/eufy-security-ws/src/lib/server.ts:125:21

Additional context

No response

How did you get the option to "Lock/Unlock"? The only options I am seeing are for the sensor portion of the lock!

kebel87 commented 1 year ago

Version

1.7.1

Node version

?

Operating System type

Other

Operating system version

HassOS

Describe the bug

Eufy S230 (T8520) lock is reporting correctly in home assistant using this add-on Fuatakgun HACS integration. However, whenever I try to control the lock (lock or unlock) I get an error message.

To reproduce

1. Click in lock

2. Get error message

3. Read logs below

Screenshots & Logfiles

2023-11-20 16:55:44.560 ERROR Unexpected error Error Public key is not valid for specified curve details: { code: 'ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY' } error stack: • errors:405 NodeError node:internal/errors:405:5 • diffiehellman:167 dhComputeSecret node:internal/crypto/diffiehellman:167:11 • utils.ts:549 getAdvancedLockKey usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:549:25 • utils.ts:669 getLockP2PCommand usr/src/app/node_modules/eufy-security-client/src/p2p/utils.ts:669:39 • station.ts:4419 lockDevice usr/src/app/node_modules/eufy-security-client/src/http/station.ts:4419:46 • eufysecurity.ts:1149 setDeviceProperty usr/src/app/node_modules/eufy-security-client/src/eufysecurity.ts:1149:31 • task_queues:95 processTicksAndRejections node:internal/process/task_queues:95:5 • message_handler.ts:209 handle usr/src/app/node_modules/eufy-security-ws/src/lib/device/message_handler.ts:209:17 • server.ts:125 receiveMessage usr/src/app/node_modules/eufy-security-ws/src/lib/server.ts:125:21

Additional context

No response

How did you get the option to "Lock/Unlock"? The only options I am seeing are for the sensor portion of the lock!

I had to enabl the disabled entities. Do you have them?

pyr8 commented 12 months ago

I had to enabl the disabled entities. Do you have them?

I'm not sure I'm looking in the right spot. Where did you enable them?

fuatakgun commented 12 months ago

Check diagnostic section of device page

pyr8 commented 12 months ago

Check diagnostic section of device page @fuatakgun The only options available are "Reset Alarm" and "Trigger Alarm". Nothing to lock or unlock!

fuatakgun commented 12 months ago

Can you share a screenshot?

bropat commented 12 months ago

wrong repo