Error that sometimes occurs to me when installing a new version of the driver when it has devices already connected:
Let’s see if I explain myself well, is too long.
There are times when you make a change in the driver, package, publish and install it in the hub:
- The devices that are installed in the driver seem to continue to work, it does not show offline or searching, but it does not work.
- No activity is seen in the logcat.
- You think, I have done something wrong with the changes. Undo the changes you have made in the driver code, package, publish and install.
- There is still no activity in logcat and connected devices are not working.
This is no longer resolved until you uninstall the Driver from Hub and reinstall it. Then it works again.
- If you have several devices connected to this driver, the App or the CLI will not allow you to uninstall the driver from the Hub until all the devices have been removed from the driver. All Preferences, automations, scenes … lost in all devices removed.
- If you have another driver compatible with the installed devices in your Hub, you can change the driver on all devices for another driver with the App.
- Then Remove the driver in the App
- Reinstall the driver in the Hub with App or with CLI.
- In devices, with the App, change the driver for the original one and it works. Preferences are not lost, they are stored in the cache, and automations, scenes … since devices keeps its network ID.
If this is happening to me from time to time and I think I have not done anything wrong, it could be the case that when new versions are updated in the official smartthings channels or in channels of other developers or users, they will be automatically installed in the enrolled hubs and in some cases they could leave some users with inoperative devices connected to the updated driver.
Not all users will have compatible drivers installed in their Hub to make the change and will have to uninstall and reinstall their devices.
If the cause of the error is not found, a possible solution would be, which I don’t know if it will be technically possible, that App allow change the device driver, showing a warning, by a generic driver, which shows the device as a thing, but which will keep the preferences in cache and they will not be lost automations and scenes.
Has this error happened to anyone else?