dgreif / homebridge-hatch-baby-rest

A homebridge plugin for Hatch Baby Rest night light
MIT License
74 stars 19 forks source link

Plugin crashing and restarting loop #74

Closed kasper79 closed 2 years ago

kasper79 commented 2 years ago

Updated to new release today (3.3.0) and getting this now: [5/10/2022, 10:50:00 AM] [HatchBabyRest] Configuring 0 Rest, 1 Rest+, 0 Rest Mini, 0 Rest 2nd Gens, and 1 Restore Devices [5/10/2022, 10:50:01 AM] TypeError: Cannot read properties of undefined (reading 'playing') at /usr/lib/node_modules/homebridge-hatch-baby-rest/lib/restore.js:10:101 at /usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/operators/map.ts:58:33 at OperatorSubscriber._this._next (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Subscriber.next (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at /usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/operators/filter.ts:72:109 at OperatorSubscriber._this._next (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts:70:13) at OperatorSubscriber.Subscriber.next (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/Subscriber.ts:75:12) at /usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/Subject.ts:68:20 at Object.errorContext (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/util/errorContext.ts:29:5) at BehaviorSubject.Subject.next (/usr/lib/node_modules/homebridge-hatch-baby-rest/node_modules/rxjs/src/internal/Subject.ts:61:5) [5/10/2022, 10:50:01 AM] Got SIGTERM, shutting down Homebridge...

kasper79 commented 2 years ago

Disabling plugin works and HB starts fine. It must be the Restore rev2? Not sure, if I roll back it works fine...

dgreif commented 2 years ago

I'm guessing it's the restore v2. I didn't realize they had a new version of that out already 😅. It must have a different data structure, which I won't be able to support immediately. I'll try to get an update out soon that at least blocks that device type and prevents the restart loop

dgreif commented 2 years ago

@kasper79 I released an update that should prevent the plugin from crashing with the restore v2. It's not actually supported by the plugin yet, but you should at least be able to use the latest version now