homebridge-hatch-baby-rest
homebridge-hatch-baby-rest copied to clipboard
Plugin crash after latest Rest updates
Overview
It seems this plugin is crashing after Hatch released their latest updates to the Hatch app (or at least the start of the crash corresponds to the launch of the new features). When trying to turn on the Rest 2nd Gen, homebridge crashes and completely restarts.
Turning off does seem to still function properly.
Details
Logs
[1/28/2024, 12:14:54 PM] [HatchBabyRest] Turning on first favorite for Sleep Pod
[1/28/2024, 12:14:54 PM] TypeError: Cannot read properties of undefined (reading 'id')
at RestIot.<anonymous> (C:\Users\comp\AppData\Roaming\npm\node_modules\homebridge-hatch-baby-rest\lib\homebridge-hatch-baby-rest\rest-iot.js:38:56)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\comp\AppData\Roaming\npm\node_modules\homebridge-hatch-baby-rest\lib\homebridge-hatch-baby-rest\rest-iot.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Thanks for the heads up! I haven't upgraded my app yet, but will take a look when I get a chance. Might not be till this weekend
I ran into this as well while setting up the plugin for the first time. My Hatch Rest+ is using the latest update. It appears to be an issue setting the current favorite when an empty array is returned from fetching all favorites. I added an early return to the method to resolve the error but no routine or favorite is set when turning on the device from Homebridge or HomeKit. Not sure what Hatch changed to this data.
This is fixed in v4.1.0