I’m making a new app (based on an old app) I’m using to controlling may Wiz Connected devices. When I’m testing the new app everything is normal when it comes to detecting the device, and I can see the device in the phone app. When I try to use the device I get the error message: Could not get the device by id (on top of the phone screen). No error message when I’m compiling the app or when I’m detecting the device. The descriptor returned from the driver are:
The devices has changed names and new functionality (flows) are added. The app is new (other name), and the “data” is the same, but “id” is also added to “settings”. The old app (another name on the app and devices) is running, but not on the same device.
Sorry, I had a long weekend off. Yes, the app name / id are changed (old: no.jib.WizBulbs - new: no.jib.WizDevice). All the devices has new names. The device (smartplug) I’m testing has been deleted from the old app, but the old app is still running. I have also tested smartplugs that never been in the old app (same result).
I started seeing the same error with my app that is in development. The error is thrown when doing an operation/action on a device, either through a flow or through the app or web interface.
My app was working fine in rc.78, but as soon as the upgrade to rc.90 took place automatically, it started throwing the same error. (I was on holiday, and the app was working fine for a couple of days until the error path in my flow started triggering almost the minute after the upgrade.
Also, interestingly enough, under ‘homey app run’ the app runs fine without any errors, while after a ‘homey app install’ it throws the error.
I have reported the issue to athom, since based on the above I believe this is most likely a bug/regression on their side. Not only because a firmware upgrade triggered it, but also because ‘homey app run’ does not show the behaviour (and hence making it quite hard to diagnose).
Turns out that in my case the error was caused by a missing library (in my case node-fetch), that I did not have installed using npm, but somehow was available by default in rc.78 and in the docker container that is used for ‘homey app run’. My app should never have worked, and that it did work was a bug that was ‘fixed’ in rc90.
Once I found the ‘homey app run --remote’ command, the issue was quickly identified and resolved. The problem was that due to the missing dependency, the driver could not instantiate the device.
No, unfortunately I don’t have that. First I wanted to replace an old app with a new one (all the old drivers were out of date). Then problems arose. Now I am trying to create a new version of the old one where the old drivers are set to “deprecated”. I’m a bit unsure if I should take the chance to test as I have to replace the app. I will post here when/if I solve the problem.
Solved: When I moved the device drivers from the new to the old app and set existing drivers in the old app to “deprecated”. Then everything worked as it should. I’m not sure what the problem is, but it seems to me that Homey Pro doesn’t accept two apps that access the same type of device (and use the same API) at the same time. So now I’m testing my app as a new version of the old one and everything seems to work normally.