Since the release of Homey firmware v7.4.1, the Heimdall app is regularly crashing because of this error:
TypeError: Cannot use 'in' operator to search for 'alarm_motion' in null at Heimdall.checkDeviceState (/app.js:831:29) at Heimdall.checkDevicesState (/app.js:818:18) at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is the relevant code:
As you can see on line 826 there is a check if the device is ready. I would assumed the device.capabilitiesObj would return {} and not null.
I've reported this on Slack, Jeroen Wink asked me to report it here.
For now I've 'fixed' this by replacing line 826 with line 827:
Device Update events may come in separately so the correct way is to always check if capabilitiesObj actually is an object, e.g. device.capabilitiesObj?.onoff.
Since the release of Homey firmware v7.4.1, the Heimdall app is regularly crashing because of this error:
TypeError: Cannot use 'in' operator to search for 'alarm_motion' in null at Heimdall.checkDeviceState (/app.js:831:29) at Heimdall.checkDevicesState (/app.js:818:18) at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is the relevant code:
As you can see on line 826 there is a check if the device is ready. I would assumed the
device.capabilitiesObj
would return{}
and notnull
. I've reported this on Slack, Jeroen Wink asked me to report it here.For now I've 'fixed' this by replacing line 826 with line 827:
(btw. there is an older issue opened bij Robert Klep that may be related: https://github.com/athombv/homey-web-api-issues/issues/3)