Error: Not found: Device with ID

Anyone knows why this is happening? My app crashes some times on this (not very often), But I don’t understand why the device is not found when I’m calling its method setStoreValue, clearly it exists as I’m using its method…

Error: Not Found: Device with ID 0e26fcfe-d875-49af-b3dc-27c90e6aa36c
at Remote Process
at HomeyClient.emit (/node_modules/@athombv/homey-apps-sdk-v3/lib/HomeyClient.js:44:23)
at Object.emit (/node_modules/@athombv/homey-apps-sdk-v3/manager/drivers.js:78:54)
at Object.emit (/node_modules/@athombv/homey-apps-sdk-v3/lib/Driver.js:126:50)
at MyDevice.setStoreValue

This usually happens when you update a device (in your case using setStoreValue()) from a timer (setInterval/setTimeout) or event handler when the device was deleted by the user (in which case any timers and event listeners should be removed to prevent the issue from happening).

The device instance will still exist (hence the ability to call setStoreValue), but any underlying SDK methods will likely fail.

1 Like

This is very logical, also why I’m not seeing this a lot. Thanks!