Driver Update Lost Device

This echoes my thread in the Inovelli forum documenting the issue.

https://community.inovelli.com/t/driver-update-lost-device/3148

Just a few days ago I performed a routine driver update by going to the Driver Code page, clicking on the already installed and in-use driver for the LZW31-SN, clicking import, ok, then save once the updated code was pulled from GitHub. The driver in use is the latest LZW31-SN official Inovelli driver from their GitHub (https://github.com/InovelliUSA/Hubitat/blob/master/Drivers/inovelli-dimmer-red-series-lzw31-sn.src/inovelli-dimmer-red-series-lzw31-sn.groovy). I had already been using that driver since first jumping onto the Inovelli bandwagon a few weeks ago.

Now something very strange has happened. All of my LZW31-SN dimmers have vanished from the edit/create dropdowns from all scenes, rules, groups, etc. If I do edit a rule, group, or scene and then save/click done — even without making any changes to the rule, group, or scene — all LZW31-SN dimmers are dropped from that particular app without error, warning, or notification! Worse yet I cannot get them back without a restore from backup. I cannot make new rules, groups, or scenes using those devices as no device of the type will appear on any of the appropriate dropdowns to add them. No amount of reboots nor cache emptying nor even switching browsers gets me the device back. All I can do is restore from backup. Driver code updates will corrupt every rule I have spent weeks building and adjusting so I am in a bit of panic. Driver code updates should be routine and reliable.

I have posted to the Inovelli forum and @ericm has been trying to sort it out. It seems that he cannot recreate the exact failure on his hub. I am including @support_team on this matter. Hopefully we can figure this out soon.

If helpful, my system particulars:
MacOS 10.15.4, Safari 13.1, Hubitat 2.2.0.128 on Hardware C-4

Thanks,
Richard

I just repeated your exact steps, C4 hub(external dongle), inovelli dimmer w/scene driver from your link, everything works. Now the only difference is I was using the inovelli driver(12/19/19) initially, not the Hubitat driver. My rule compiled and I am able to execute the action.
I'm sorry I wasn't able to help, I was really hoping I'd have the same failure.
Good news is, Inovelli is involved, and I trust them to get it sorted out.

@Rxich I too was using the Inovelli driver initially since the very first LZW31-SN was installed I had the GitHub driver installed on my system and picked for the devices.

@support_team I just tried a different sort of test.

I edited the driver code by simply adding some "TEST" comment text. My goal was to determine if the issue is with my hub, something more universal to Hubitat, or something with this code. In the screenshot you'll see the change I made is obvious but innocuous.

Screen Shot 2020-05-08 at 12.28.48 PM

I can confirm that this test does not cause the missing device problem. Importing the updated Inovelli driver (using the import button on the Driver Code page) from GitHub causes the same failure I described originally. Copy-pasting the driver code from GitHub also causes the same failure. So then is this a driver issue or is it a driver update issue where changing some portion of code works but replacing the entirety of the driver code fails? Why does it work for some but not me yet editing some portion of the code causes no issue?

silly question but did you hit "configure" on the device page after changing driver?

If you still have a problem, you could try re-pairing the device to HE.
I know you have a lot of rules, you could use a virtual device as a placeholder in your rules, while you re-pair the switch

PS- not sure if it makes a difference, but I copied the raw driver version and pasted it into my drivers section, although should not make any difference

Can you show a screen capture of the two drivers list of "Capabilties" in the metadata section of the code? Those capabilities are what determines if/how they are presented for user selection in an App like Rule Machine, Simple Automations, etc...

UPDATE: I just installed the driver you linked in the first post, and used it to create a virtual device. I had to pre-load the switch and level attributes with data, but then I was able to create a new RM rule with it as a trigger.

This device appears to create child devices...are those the ones that are missing in RM? Or the main Parent device?

Thanks again to this community and the Inovelli community for helping me fix this. There are many overlapping members which comes as no surprise as both of these communities are awesome as are the products produced by both companies.

@Rxich not sure what difference pushing Configure would make but I did try it both ways. I still get the same result. I can confirm the same about the copy-paste from GitHub — no difference that route vs using the import feature. Going through an exclude/include cycle is something I would want to delay until the last possible moment. By "using a virtual device as a placeholder" do you mean creating a new virtual device, rebuilding my rules to use that instead, then once this is sorted rebuild those rules again to point back to the "real" device? This is one of my primary points of criticism with Hubitat in general — ZWave-Replace or in general Device-Replace has to be a feature in the future.

@ogiewon As far as I can tell from the driver code page list, the capabilities nearly are identical for both the May 5th and older driver I have been using. However looking at the code it does seem there are some more differences though only in commented-out lines. I have no child devices at all. What disappears are the main devices. Their device pages still exist (and are completely controllable including advanced features) but they disappear from all app device lists. Editing an existing rule in which a device is used will silently corrupt the rule with any devices that use the updated driver being dropped from the rule on opening. At that point the only way to recover the rule is a restore from backup.

Drivers Code Page Both Inovelli LZW31-SN

LZW31-SN Capabilities 2020-03-27

LZW31-SN Capabilities 2020-05-05

I performed another test as suggested by a user on the Inovelli forum. I had been wanting to do something like this for the last few days but just didn't have the time.

I added to the end of the name of the old driver a suffix of "-no updates" and added something to that effect at the top of the driver in the comments too. Saving this caused no issues with any existing device/app nor did it prevent me from creating a group with any LZW31-SN devices present. That's all to be expected and solid.

Next I created a new "blank" driver, copy-pasted the driver code from the raw GitHub link as of the last update (May 5th), then saved it and confirmed the save was complete. I then changed the driver for one LZW31-SN device in my system to use the new driver and low and behold it did not work, the exact same sort of problems appeared per my original post.

Any device that I switched to use that updated driver would vanish from all places in all apps and corrupt existing apps in which it appeared. I still could control the device but I could not see it in any apps. If I swap back to the "no-updates" driver the device reappears in all the apps list.

@support_team So the May 5th driver update is a major problem for my Hub. What else can we do? It seems that all signs point to this driver update. Perhaps the cause is something specific about it that I am using? Custom Commands/Actions perhaps? Notifications? Perhaps there is something unique about my database?

1 Like

Wow. Thanks for the update. That is pretty strange. Good luck getting it sorted out.

Updates to all here! My driver situation has been resolved. The issue was caused by "capability ColorControl" being added to the 2020-05-05 updated that Inovelli pushed. See the thread in the other forum for more details:

If you are having issues, either comment out that particular line near the top of the driver or by now it may already be fixed witihn Inovelli's GitHub.

I am very happy that I did not have to perform any sort of reset on my hub. Wow that would have been painful. Not sure what others do to prevent Rule loss/corruption in the case of a complete rebuild and in fact I would ask here or on another thread about catastrophic recovery. For example — if one of us has to replace their hub completely or migrate to a new one (an upgrade perhaps) then what do we do to bring forward all our rules, devices, etc? Is it possible to restore from backup to at least be able to read the old rules then pair devices and rebuild?

2 Likes

Yes, the hub does a nightly backup automatically. You can download the backup to your PC. I have done a backup, then soft reset my hub, when it reboots all devices are gone as are all rules, but restoring the backup brings in all the devices and rules.
Although not sure this backup would restore everything on a totally new hub or there's some other restriction I can't recall at the moment.

Check this:

1 Like