Trying to delete a virtual device

Trying to delete a virtual device I no longer need. I removed it from the rule that made reference to it but it still shows on the device that the rule has it assigned. If I go into the rule and click on the gear icon I do still see references there but they are not being used. Must I actually rewrite the rule to delete the device? If so that's really frustrating.

This was a rule created on 4.0 as a copy of another rule which is why this device is listed in there to begin with. There are also a few other referenced devices that I can see via the status view but they are not used but this rule either. Seems like if it's not being defined on the main rule flow it should be gone, period.

Has the device been deleted on the Devices page? If not, open up the device, hit Remove Device at the bottom of the page. If so, then itā€™s a bug, merely cosmetic, in Rule machine. Itā€™s been reported before. If it bothers you, Re-create the Rule from scratch, or export/import.

1 Like

The device is still on the devices page. I was going to delete it but at the bottom it shows the warning that it's in use by this rule so I was reluctant to remove it.

This happens sometimes with Rule Machine, especially if you clone a rule (but even if you remove actions without un-selecting devices first and probably other ways you can run into this problem). If you aren't actually using the device in the Rule, you should be good to remove it. But it's always a good idea to follow the "In use by section" first whenever you can, so that's definitely a good instinct. :smiley:

3 Likes

Has it been removed from the Rule? If so, ignore the warning and delete the device. If you want to be safe, export the Rule, delete the Rule, import the saved Rule.

Yes it's totally not showing on the rule unless you click the GEAR icon and it does show it there.

I'll try what you are suggesting when I get a moment. Thanks.

The exported rule still had references to it. I'm just leery of deleting the device since it thinks it's still in use by that rule. Guess I'll manually recreate the rule. Some kind of clean up routine that could just go out and rebuild that as part of nightly maintenance would sure do a lot for avoiding things like this.

There is some post by Bruce Ravenel (@bravenel) in the past month or so, when someone had a similar issue, saying that what you are requesting is not possible or extremely difficult with the current design. Rule Machineā€™s User Interface isnā€™t editable/parseable code. It has evolved over many years since its origins.

You can just delete the device. It just appearing on the App Status page doesn't really matter. If you are worried about the rule, remove it from wherever it is used in the rule. If it isn't used, just delete it.

1 Like