aficustree / homebridge-alarmdecoder-platform

Homebridge plugin for the AlarmDecoder interface for Honeywell and DSC Alarm Systems. Exposes the security system and all zones (via Contact Sensors and Motion Sensors) to Apple's Homekit. Control your alarm through Siri.
Apache License 2.0
18 stars 11 forks source link

Plugin causing system to crash #30

Closed arthurmosh closed 3 years ago

arthurmosh commented 3 years ago

This is the only plugin I have installed on my hoobs, and every 24 hours, it causes the system to crash and I have to power cycle the unit to get it back up. Any help would be greatly appreciated. Here's the log.

6/12/2021, 7:32:02 AM HOOBS listening on port 80. 6/12/2021, 7:32:04 AM Initializing HAP-NodeJS v0.9.3... 6/12/2021, 7:32:05 AM Loaded plugin 'homebridge-alarmdecoder-platform' 6/12/2021, 7:32:06 AM [6/12/2021, 5:32:05 AM] Registering platform 'homebridge-alarmdecoder-platform.alarmdecoder-platform' 6/12/2021, 7:32:06 AM Loading 1 platforms... 6/12/2021, 7:32:06 AM [alarmdecoder-platform] Initializing alarmdecoder-platform platform... 6/12/2021, 7:32:06 AM [alarmdecoder-platform] no system specified, assuming Honeywell, please add platformType variable to your config.json 6/12/2021, 7:32:06 AM [alarmdecoder-platform] Cached Accessories Loaded 6/12/2021, 7:32:06 AM [alarmdecoder-platform] initalizing platform 6/12/2021, 7:32:06 AM [alarmdecoder-platform] adding security system accessory 6/12/2021, 7:32:06 AM [alarmdecoder-platform] listening on port undefined 6/12/2021, 7:32:06 AM Preparing Advertiser for 'HOOBS ACF3' using bonjour-hap backend! 6/12/2021, 7:32:06 AM Starting to advertise 'HOOBS ACF3' using bonjour-hap backend! 6/12/2021, 7:32:06 AM Bridge is running on port 51826. 6/12/2021, 7:32:06 AM (node:612) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined 6/12/2021, 7:32:06 AM at Hash.update (internal/crypto/hash.js:84:11) 6/12/2021, 7:32:06 AM at Object.generate (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/src/lib/util/uuid.ts:11:11) 6/12/2021, 7:32:06 AM at AlarmdecoderPlatform.initPlatform (/home/hoobs/.hoobs/node_modules/homebridge-alarmdecoder-platform/index.js:151:32) 6/12/2021, 7:32:06 AM at HomebridgeAPI. (/home/hoobs/.hoobs/node_modules/homebridge-alarmdecoder-platform/index.js:41:22) 6/12/2021, 7:32:06 AM at HomebridgeAPI.emit (events.js:376:20) 6/12/2021, 7:32:06 AM at HomebridgeAPI.signalFinished (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/homebridge/src/api.ts:275:10) 6/12/2021, 7:32:06 AM at Server.start (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:156:18) 6/12/2021, 7:32:06 AM at /usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:94:16 6/12/2021, 7:32:06 AM at processTicksAndRejections (internal/process/task_queues.js:95:5) 6/12/2021, 7:32:06 AM (Use node --trace-warnings ... to show where the warning was created) 6/12/2021, 7:32:06 AM (node:612) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) 6/12/2021, 7:32:06 AM (node:612) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

aficustree commented 3 years ago

going to need the community to help on this one, the line causing the fail is

let uuid = UUIDGen.generate(this.name)

which is a call to the underlying home bridge platform (and a straightforward one) so I can't see any reason that would fail. Can you spin up something to clean-sheet it and see if that persists.

arthurmosh commented 3 years ago

I reached out to the HOOBS team and looks like this is a known issue and requires a flash. Thanks for your responses!