Cannot delete device in 2.3.3.122 (iPad UI problem)

Hi @bravenel, it is my understanding that in 2.3.3.122 there is a bug in RM where the local variable list is not updated on the main rule page. I had a device in a RM rule which I took out of the rule and replaced with another device. On the main rule page, the old device still appears in the local variables chart. Is this why I am not able to delete the “old” non-used device from the Device page? When I try to delete the device from the device page, it keeps referring me to the app from which the device has already be removed (except for it showing up as %device% on the local variables list). My assumption is that this will be corrected when the local variable problem is corrected in the next release? Thanks for your input (no apparent functional problem, I just wanted to clean up my device list of unused devices).

First, that bug was a UI display issue only, and had nothing to do with any devices. If what you're saying is that when you go to delete the device, and it says that it is in use by a rule, but you think you've already removed it from that rule, then just remove the device.

Thats the problem I am running into. I am obviously doing something wrong but when I go to the device page, click on the device and go to the bottom of the page and click on the remove device button, a pop-up window appears that directs me to the rule it was originally associated with. I had already removed it from the rule (but I still see it appearing on the local variable list . . .I understand that it is only a UI thing that will be corrected). Because the remove device button keeps referring me to the rule from which it was previously removed, I cannot get the device to be removed from the device page. What am I missing (its probably something simple but I am at a loss). TIA for a solution.

Devices don't appear on the Local Variable list. Not sure what you're talking about. Perhaps if show screenshots. Do you have a Local Variable with the same name as the device?

Perhaps these screenshots will make things more clear:

This is the rule with the [-Hubitat Ping - Balcony Xmas Switch] removed and replaced with [-Hubitat Ping - Kitchen Table Lights]. Note that [-Hubitat Ping - Balcony Xmas Switch] appears as a %device% in the Local Variables list. It was never added as a local variable to begin with when the rule was originally written but somehow shows up anyway (could it be associated with the community Hubitat Ping driver?). After I removed the device from the rule, I saved the new version of the rule by clicking done.

After the device was removed from the rule, this is what still happens when I click on the remove device button at the bottom of the [-Hubitat Ping - Balcony Xmas Switch] device page:

When I click on the pop-up, it opens the Rule 5.1 rule (from which the device was already removed). Because of this, I am stuck in a loop.

Note that I never set up a local variable that used the old device as a local variable (it just showed up). Perhaps this is related to how the community driver works?

Can you ignore the 'Remove device?' pop up and click the red Remove Device button again

First thing I tried. The red Remove Device button does nothing as long as the pop-up is up. In addition, you cannot back out of the pop-up (only way to exit the pop-up is to click on it which takes you to the indicated app).

1 Like

What's showing in the Local Variables is %device%, that this was the last device to trigger the rule.

Which OS and browser are you using?

I am on iOS on a iPad using the Hubitat App. However, I also tried this connecting to the hub on both the Safari browser and Chrome browser. Same results.

I finally just “broke down” and set up another rule from scratch (luckily the device was only used in this one rule as it was used as a http ping device to alert me to the status of my wifi network so this was not too much of a hassle as the rule itself is very simple). I then deleted the old app (the one from which I had already deleted the device). Afterwards (after deleting the old app), I was able to go into the device page and removed the device via the red Remove Device button.

Although I solved my specific immediate issue/problem, I wanted to bring this to your attention as it could possibly be a much larger hassle for those that wish to get rid of a device that is used as a trigger in several apps should they wish to change the trigger and then delete the device.

Out of curiosity I just wanted to get to the root of the problem to better understand why this occurred. As @bravenel mentioned, the old device still showed up as the last trigger of the rule in the local variable list. Could this be why the rule thought that the device was still in use, thus preventing it from being deleted from the device list?

No, that's not how %device% works. More likely, the device is still selected in an app setting where you removed something higher without first removing the device from a device selector. You wouldn't see it in the app anymore, but it would still be there for the purposes of In Use By. Look at the Settings for the app on its App Status page, and see if you see the device anywhere there -- that's where it would come from.

@bravenel , thanks for the insights but unfortunately, as I mentioned to @gopher.ny , I just went ahead and deleted the app and started over in order to be able to delete the device, so I can’t go back to check this on the app status page. At any rate, thank you for everyone’s time to review this thread and to offer suggestions on how to resolve the issue. As always, I appreciate all the help you all provide.

Just so I understand better, are you referring to removing any instances of the device in the Manage Conditions box IN ADDITION to removing it from the rule itself (either as in a Trigger or Action) in order to make sure it does not persist in the In Use By? In the past versions of RM I do not remember ever having done this when swapping out no longer used devices and then deleting them from my device list.

Remove a device from every setting that has it selected. RM is supposed to track all of those down if you remove something higher up, but things can fall in cracks. If you can reproduce this, I'd look to find what crack it fell in.

Thank you as always. This seems to be a likely reason this occurred. I will watch for this in the future when doing similar “replacements” of devices.

Can you PM me the hub id on which this happened? I'd like to go through the engineering logs for potential clues.

Done, thanks

@gopher.ny, I think I’ve seen this before and forgot to report it. The pop-up is scrollable, so it appears as if the button to remove the device is not in the pop-up, but it is actually hidden as there is more text than can be displayed on the pop-up, but this requires scrolling. (On the iPad / Safari, this can be done with a finger on the pop-up. I suspect the scroll wheel would work on the PC.)

Here’s a couple of screenshots to help show the issue.

The first one shows what appears:

The second one shows what happens when you scroll within the pop-up:

@moh, can you see if you are able to scroll within the pop-up?

1 Like

Hi @Sebastien, I checked on another test device and I cannot scroll within the pop-up when accessed through the Hubitat App. I am accessing on an iPad using iOS. This may indeed be part of the problem. @bravenel and @gopher.ny ? Any fix for this or is it solely a limitation of iOS or the app? Looks like a bug to me? Thanks for pointing this out @Sebastien .

1 Like

It’s unfortunate that you’re not able to scroll… But it might indeed be an iPad issue.

Here is a short video of a test I just did where I was able to scroll:

image

2 Likes