Service Loop after Configure homebridge-ezviz Plugin
ahmadshaugi81 opened this issue · 5 comments
Describe the bug
- The Homebridge service are keep restarting every time homebridge-ezviz was configured. If the homebridge-ezviz configuration was removed, without removing the installed plugin, then Homebridge service will run normally and service loop was stopped.
- On plugin setting, serial number and verification code that was setup is the camera serial number and verification code, which is managed by NVR X5S. But somehow when Homebridge started, the first detected device was the NVR X5S instead of the camera C3WN or C6CN
Debug Output
[5/4/2022, 4:29:10 PM] Homebridge v1.4.1 (HAP v0.10.2) (Homebridge 5237) is running on port 51305.
[5/4/2022, 4:29:10 PM] [EZVIZ] New camera found: X5S(E01076328)
[5/4/2022, 4:29:10 PM] [EZVIZ] Configuring accessory X5SE01076328
[5/4/2022, 4:29:10 PM] TypeError: Cannot read properties of undefined (reading 'find')
at EZVIZPlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:88:44)
at /usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:134:14
at Array.forEach ()
at EZVIZPlatform. (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:114:13)
at Generator.next ()
at /usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:8:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:4:12)
at EZVIZPlatform.addCameras (/usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:86:16)
at EZVIZPlatform. (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:171:18)
[5/4/2022, 4:29:10 PM] Got SIGTERM, shutting down Homebridge...
Plugin Settings
{
"region": 245,
"email": "myemail",
"password": "mypassword",
"cameras": [
{
"serial": "myezvizserial",
"username": "myezvizusername",
"code": "myezvizverificationcode"
}
],
"options": {
"sleepSwitch": true,
"audioSwitch": true
},
"platform": "EZVIZ"
}
To Reproduce
Steps to reproduce the behavior:
- Reconfigure the homebridge-ezviz plugin
- Homebridge service will start looping or restarting
Expected behavior
Ezviz plugin run normally without making service looping.
Please answer these questions before submitting this issue:
On what device are you running homebridge: MacBook Pro
On what iOS version are you having issues: MacOS Monterrey
What camera types are having issues: C3WN, C6CN
Does this issue occur consistently or randomly: Consistent
If applicable, what was the last version that worked properly: First time used,
Describe the bug
Same behavior when run homebridge-ezviz on Ubuntu Server 18.04.
- The Homebridge service are keep restarting every time homebridge-ezviz was configured. If the homebridge-ezviz configuration was removed, without removing the installed plugin, then Homebridge service will run normally and service loop was stopped.
- On plugin setting, serial number and verification code that was setup is the camera serial number and verification code, which is managed by NVR X5S. But somehow when Homebridge started, the first detected device was the NVR X5S instead of the camera C3WN or C6CN
Debug Output
[5/5/2022, 6:36:00 PM] Homebridge v1.4.1 (HAP v0.10.2) (Homebridge 8AA2) is running on port 51286.
[5/5/2022, 6:36:00 PM] [EZVIZ] New camera found: X5S(E01076328)
[5/5/2022, 6:36:00 PM] [EZVIZ] Configuring accessory X5SE01076328
[5/5/2022, 6:36:00 PM] TypeError: Cannot read properties of undefined (reading 'find')
at EZVIZPlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:88:44)
at /usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:134:14
at Array.forEach ()
at EZVIZPlatform. (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:114:13)
at Generator.next ()
at /usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:8:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:4:12)
at EZVIZPlatform.addCameras (/usr/local/lib/node_modules/homebridge-ezviz/dist/index.js:86:16)
at EZVIZPlatform. (/usr/local/lib/node_modules/homebridge-ezviz/src/index.ts:171:18)
[5/5/2022, 6:36:00 PM] Got SIGTERM, shutting down Homebridge...
Plugin Settings
{
"region": 245,
"email": "myemail",
"password": "mypassword",
"cameras": [
{
"serial": "myezvizserial",
"username": "myezvizusername",
"code": "myezvizverificationcode"
}
],
"options": {
"sleepSwitch": true,
"audioSwitch": true
},
"platform": "EZVIZ"
}
To Reproduce
Steps to reproduce the behavior:
- Reconfigure the homebridge-ezviz plugin
- Homebridge service will start looping or restarting
Expected behavior
Ezviz plugin run normally without making service looping.
Please answer these questions before submitting this issue:
On what device are you running homebridge: Ubuntu Server 18.04
On what iOS version are you having issues:
What camera types are having issues: C3WN, C6CN
Does this issue occur consistently or randomly: Consistent
If applicable, what was the last version that worked properly: First time used,
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days
Up
Same problem here, Homebridge running on raspberry pi start restarting all of a sudden
After disabling the plugin and enabling it again, all is back to normal :)