eufy-security-client: [Bug]: guard mode changes crash the client

Client version

2.1.1

Node version

16.16.0

Operating System type

Windows

Operating system version

Windows 10

Describe the bug

With the new alarm delay event the library crashes on Homebase 2. See this issue for more information. I’ll provide a log of the eufy-security-client later. For now I only have the error message.

To reproduce

Calling this.eufyStation.setGuardMode(mode) with any approbiate mode.

Screenshots & Logfiles

[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase SET StationGuardMode (raw value homekit):0
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase SET StationGuardMode:1
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] INFO:  Homebase Request to change station guard mode to: Home.
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase ON handlePropertyChange: { name: 'guardMode', value: 1 }
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase ON handleRawPropertyChange: { type: 1151, value: '1' }
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase ON SecuritySystemCurrentState: 1
[7/21/2022, 8:51:34 AM] [EufySecurity-2.1.0-beta.11] DEBUG: Homebase ON handlePropertyChange: { name: 'currentMode', value: 1 }
TypeError: Cannot read properties of undefined (reading 'toString')
    at Station.getArmDelay (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\http\station.ts:596:85)
    at Station.onAlarmMode (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\http\station.ts:566:31)
    at P2PClientProtocol.<anonymous> (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\http\station.ts:54:68)
    at P2PClientProtocol.emit (node:events:527:28)
    at P2PClientProtocol.handleDataControl (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\p2p\session.ts:1274:22)
    at P2PClientProtocol.handleData (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\p2p\session.ts:988:18)
    at P2PClientProtocol.parseDataMessage (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\p2p\session.ts:979:26)
    at P2PClientProtocol.handleMsg (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\p2p\session.ts:801:26)
    at Socket.<anonymous> (C:\Users\Rene\AppData\Roaming\npm\node_modules\homebridge-eufy-security\node_modules\eufy-security-client\src\p2p\session.ts:113:56)
    at Socket.emit (node:events:527:28)
[21.7.2022, 08:51:34] [homebridge-eufy-security] Child bridge process ended

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (20 by maintainers)

Most upvoted comments

Sure. @thieren can you paste the security settings? And also, am I correct to assume you are using HomeKit?

Seems to work just fine now. Thx for the fix!

Yep. Have tested and is not crashing anymore.

But have not tested for delayed alarms, so if it works correctly if I set a delay whether it works as intended I can not say yet. But will do that later.