homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
171 stars 23 forks source link

[Bug]: Null reference causing HomeBridge reset loop #175

Closed AndrewKite closed 2 years ago

AndrewKite commented 2 years ago

What happened?

Attempting to setup plugin and am unable to get it to initialize successfully. Have tried the latest version, the beta, and 2.0.1. A few cameras, door locks, sensors, are part of my setup. But it appears that it is trying to read a null field conatined in the accessory list retrieved?

Device Type

Station (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.4.x (Supported)

NodeJS Version

v16 (Supported)

Operating System

Raspbian 10+ (Supported)

Relevant log output

[27/09/2022, 8:16:41 pm] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge) is running on port 51170.
[9/27/2022, 8:16:44 PM] [EufySecurity-2.1.0] DEBUG: EufyClient connected true
[9/27/2022, 8:16:44 PM] [EufySecurity-2.1.0] DEBUG: CameraMaxLivestreamDuration: 30
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] DEBUG: Found Station T8010P1320310DDF Home Security STATION 192.168.50.148
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] INFO:  You're using guest admin account with this plugin! This is recommanded way!
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] DEBUG: Home Security UUID: bb826432-805b-4af6-bfd9-dfc9cde1289b
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] DEBUG: Home Security Constructed Station
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] DEBUG: Home Security manual alarm will be triggered only in these hk modes: 
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] DEBUG: Home Security Mapping for station modes: [{"hk":0,"eufy":1},{"hk":1,"eufy":0},{"hk":2,"eufy":3},{"hk":3,"eufy":63},{"hk":3,"eufy":6}]
[9/27/2022, 8:16:46 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Home Security
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: Found Station T8420N0020390AFC Garage FLOODLIGHT 119.17.146.159
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] INFO:  You're using guest admin account with this plugin! This is recommanded way!
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: This device is not a station. Generating a new UUID to avoid any duplicate issue
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: Garage UUID: e8e4fb88-1ca3-4317-a4b1-484268e8cdfe
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: Garage Constructed Station
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: Garage manual alarm will be triggered only in these hk modes: 
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] DEBUG: Garage Mapping for station modes: [{"hk":0,"eufy":1},{"hk":1,"eufy":0},{"hk":2,"eufy":3},{"hk":3,"eufy":63}]
[9/27/2022, 8:16:47 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Garage
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: Found Station T8510Q1020370CDF Garage Door LOCK_BLE undefined
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] INFO:  You're using guest admin account with this plugin! This is recommanded way!
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: This device is not a station. Generating a new UUID to avoid any duplicate issue
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: Garage Door UUID: 60e95708-4524-4535-b3ee-cdb8856c07b3
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: Found Station T8520Q10205103EF Front Door LOCK_WIFI undefined
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] INFO:  You're using guest admin account with this plugin! This is recommanded way!
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: This device is not a station. Generating a new UUID to avoid any duplicate issue
[9/27/2022, 8:16:48 PM] [EufySecurity-2.1.0] DEBUG: Front Door UUID: 76594c36-d267-4114-819d-fa1bea436efc
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8910P0020321224 Hallway MOTION_SENSOR
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Hallway UUID: 4f7ccd32-e83d-4181-91ee-3d2fbcf66c6b
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Hallway has a batteryLow, so append StatusLowBattery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Hallway Constructed Motion Sensor
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Hallway has a motionDetected, so append MotionDetected characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Hallway
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8900P0020321077 Sliding Door SENSOR
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Sliding Door UUID: e44921d9-d75d-4ea6-9213-236f01a6306c
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Sliding Door has a batteryLow, so append StatusLowBattery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Sliding Door Constructed Entry Sensor
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Sliding Door has a sensorOpen, so append ContactSensorState characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Sliding Door
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8900P0020321718 Laundry Door SENSOR
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Laundry Door UUID: e3bd9766-4896-4c9c-896c-a5f9b9ebd5ec
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Laundry Door has a batteryLow, so append StatusLowBattery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Laundry Door Constructed Entry Sensor
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Laundry Door has a sensorOpen, so append ContactSensorState characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Laundry Door
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8960P0020280909 Keypad KEYPAD
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Keypad UUID: 5370df9f-0a30-4b56-b8bd-60c23df33b07
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] WARN:  This accessory is not compatible with HomeBridge Eufy Security plugin: Keypad Type: 11
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8910P0020380F0A Living Room MOTION_SENSOR
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Living Room UUID: ef43f391-2824-4624-a029-1dce1178df38
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Living Room has a batteryLow, so append StatusLowBattery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Living Room Constructed Motion Sensor
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Living Room has a motionDetected, so append MotionDetected characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Living Room
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8114P0220461BFF Front Yard CAMERA2
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard UUID: 8d510895-3d1e-4fc9-8871-532dfbb360ff
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard Constructed Camera
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard config is: {
  name: 'Front Yard',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard has a motion sensor.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard enableButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard motionButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Front Yard Looks like not compatible with DeviceLight
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Front Yard
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8114P0220371350 Backyard CAMERA2
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard UUID: 547e1855-e5f9-4945-8419-a911c0347410
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard Constructed Camera
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard config is: {
  name: 'Backyard',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard has a motion sensor.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard enableButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard motionButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Backyard Looks like not compatible with DeviceLight
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Backyard
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8114P0220461066 Side Gate CAMERA2
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate UUID: 6745ccf2-e10b-4fd8-b5a2-0bdcfea6a8e6
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate Constructed Camera
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate config is: {
  name: 'Side Gate',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate has a motion sensor.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate enableButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate motionButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Gate Looks like not compatible with DeviceLight
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Side Gate
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8114P02204611BB Side Garage CAMERA2
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage UUID: 883909e7-0c2b-40ae-8aec-cc760a6f37df
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage Constructed Camera
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage config is: {
  name: 'Side Garage',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage has a motion sensor.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage enableButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage motionButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Side Garage Looks like not compatible with DeviceLight
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Side Garage
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Found device T8420N0020390AFC Garage FLOODLIGHT
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage UUID: b1335bb5-0c4d-4373-a085-7172b38bff77
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage has no battery
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage Constructed Camera
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage config is: {
  name: 'Garage',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage has a motion sensor.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage enableButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage motionButton config: true
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] DEBUG: Garage has a DeviceLight, so append switchLightService characteristic to him.
[9/27/2022, 8:16:50 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Garage
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Found device T8520Q10205103EF Front Door LOCK_WIFI
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Front Door UUID: 51ab083b-d43a-475d-83c9-c3c3facc6e4f
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Front Door has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Front Door Constructed SmartLock
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Front Door initial lock eufy state true
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] DEBUG: Front Door LockStatus true
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Front Door
[27/09/2022, 8:16:51 pm] TypeError: Cannot read properties of null (reading 'forEach')
    at Lock.update (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:65:35)
    at Lock.initializeState (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:43:14)
    at Function.initialize (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:1812:14)
    at EufySecurity.handleDevices (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:481:39)
    at HTTPApi.<anonymous> (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:147:63)
    at HTTPApi.emit (node:events:527:28)
    at HTTPApi.refreshDeviceData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/api.ts:545:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at HTTPApi.refreshAllData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/api.ts:561:9)
    at EufySecurity.refreshCloudData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:540:9)
[27/09/2022, 8:16:51 pm] Got SIGTERM, shutting down Homebridge...
[9/27/2022, 8:16:51 PM] [EufySecurity-2.1.0] INFO:  Finished shutdown!
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Found device T8210P0020333A59 Doorbell BATTERY_DOORBELL
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell UUID: a1586dc2-82f0-45c7-aa2a-156addac312a
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell has a battery, so append Battery characteristic to him.
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell Constructed Camera
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell config is: {
  name: 'Doorbell',
  enableButton: true,
  motionButton: true,
  rtsp: false,
  forcerefreshsnap: false,
  videoConfig: {},
  useCachedLocalLivestream: false,
  immediateRingNotificationWithoutSnapshot: false,
  delayCameraSnapshot: false,
  snapshotHandlingMethod: 3,
  talkback: false
}
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell has a camera
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] INFO:  Doorbell is set to handle snapshots with cloud images. Snapshots might be older than they appear.
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell trying to download latest cloud snapshot for future use from: ****
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell Audio sample rate set to 16 kHz.
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell enableButton config: true
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell has a isEnabled, so append switchEnabledService characteristic to him.
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell motionButton config: true
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell has a isMotionDetectionEnabled, so append switchMotionService characteristic to him.
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell Looks like not compatible with DeviceLight
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell Constructed Doorbell
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] INFO:  Updating accessory: Doorbell
[9/27/2022, 8:16:52 PM] [EufySecurity-2.1.0] DEBUG: Doorbell Stored cloud snapshot for future use.
[9/27/2022, 8:16:55 PM] [EufySecurity-2.1.0] DEBUG: Push Connected!
[27/09/2022, 8:16:56 pm] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[27/09/2022, 8:17:01 pm] [HB Supervisor] Restarting Homebridge...

config

{
            "username": "*****",
            "password": "*****",
            "country": "AU",
            "platform": "EufySecurity",
            "ignoreStations": [],
            "ignoreDevices": [],
            "cleanCache": true,
            "pollingIntervalMinutes": 30,
            "hkHome": 1,
            "hkAway": 0,
            "hkNight": 3,
            "hkOff": 63,
            "enableDetailedLogging": true,
            "CameraMaxLivestreamDuration": 30
        }
github-actions[bot] commented 2 years ago

Did you check this Common Issues pages ?

thieren commented 2 years ago

Hi @AndrewKite

Could you please open an issue in the eufy-security-client repo? The error seems to lie in this repos code.

You can use the eufy-log.log file from the plugins storage path to give further information there, since this contains the information for this library.

Please also mention the error message:

[27/09/2022, 8:16:51 pm] TypeError: Cannot read properties of null (reading 'forEach')
    at Lock.update (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:65:35)
    at Lock.initializeState (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:43:14)
    at Function.initialize (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/device.ts:1812:14)
    at EufySecurity.handleDevices (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:481:39)
    at HTTPApi.<anonymous> (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:147:63)
    at HTTPApi.emit (node:events:527:28)
    at HTTPApi.refreshDeviceData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/api.ts:545:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at HTTPApi.refreshAllData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/api.ts:561:9)
    at EufySecurity.refreshCloudData (/var/lib/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/eufysecurity.ts:540:9)

Thx!

AndrewKite commented 2 years ago

@thieren Just as I was about to, I noticed in the log file that it states US as my region. Updated that in the config file and all seems to be working now. I find this rather odd since I am located in AU, and have signed up both my personal, and guest eufy credentials as being based in AU.

Hopefully this comment can help others if they have issues with their setup.

thieren commented 2 years ago

Ok, glad it was solved for you.

Odd, since your config json clearly stated AU as country.