Hub Variables / In use by

Platform Version 2.3.3.135

From Settings -> Hub Variables, I used to be able to click on a variable name and be given a list of where that variable is used. Currently, nothing happens if I click on any variable.

Also, I have one Connector (which I don't use) of type Variable on the same page. If I click on it, I get:

Device 2091 does not exist on this hub.

It was most likely deleted at some point. Please update your links.

I've tried Backup / Soft Reset / Restore but no change.

Is this a known issue or is it just me? If it's me, any suggestions on how to fix?

2 Likes

This is a bug just inadvertently introduced, and it will be fixed in the next release, probably today.

3 Likes

I'm experiencing this issue on v2.3.5.152

Clicking on Temperature under the Connector column leads to:

image

A hub reboot does not resolve this issue.

So probably you should take the error message at face value, and the Connector device was deleted somehow without that updating Hub Variables. I'd suggest removing that Hub Variable completely and redoing it.

Also, what you're pointing out is not related to Hub Variables In use by, but something else completely.

The Connector Device that I intentionally deleted was listed as In Use By a rule which wasn't using it - an In Use By bug.

In hindsight, I should have posted about that In Use By issue before deleting the Device but, in my experience, In Use By has been unreliable, so I just deleted it - assuming the associated Hub Variable would recognize that the Connector Device no longer existed and remove the entry from the Connector column of the Hub Variables page.

Is there a 'Swap Apps Variable' feature similar to 'Swap Apps Device'?

If not, replacing the offending variable in all of the Apps that use it is going to be a lot of work...

I just tried renaming the existing 'backyardTempAvg' and received this:

Then upon returning to the Hub Variables page:

The rename is 'successful'

I removed backyardTempAvg.old from 'Temp & Trend Backyard v2' but it is still listed as In Use By:

image

Interestingly, removing the backyardTempAvg.old Hub Variable from Dashboards (.Weather and Temperature) results in those Dashboards not longer being listed as In Use By:

image

But the same cannot be said for Rules: 'Variable Set outSideTempAvg & in-outTempDelta' is no longer using the backyardTempAvg.old Hub Variable and has been renamed.

Therefore it appears there is an issue with In Use By and RM.

Only do this if you want to fix it.

Here's another Hub Variable In Use By bug:

image

What you're pointing out is that a disabled action still counts for In Use By, as it should. If you don't want it to, delete that action.

Incorrect.

The disabled Action in the screenshot above is referencing in-outTempDelta

The Hub Variables page is listing outsideTempAvg as In Use By.

in-outTempDelta

and

outsideTempAvg

are not the same variable.

Maybe I'm mistaken but I don't see where outsideTempAvg is In Use By the Variable Set in-outTempDelta rule I pasted above.

Most likely it was used previously. What I have seen, once in while when variable was/is
removed from a rule it still listed as "used by". The same happens with removed devices.
I am used to it.

1 Like

Correct, In Use By has a bug.

I guess the bug in the rule cleanup routine. "In Use By" simply displays what is in the DB.

This may or may not be the case. You'd have to show reproducible steps that have this result. It's very important to note that Connectors In-Use is entirely different than Hub Variables In-Use, and determined by entirely different means in the hub. Just showing what you've shown does not include the steps that led to that state, nor the build that was used previously when a Hub Variable was removed from a rule, nor the steps involved. There had been missing elements in previous builds, that might have resulted in the state you show, but it would be virtually impossible to reproduce that just from the final outcome. If you can reproduce this failure, I'd certainly undertake to find the root cause.

For the DEVICES when I am using "swap app devices" built-in function occasionally
old an already definitely unused device still could be listed "In Use By" in one or few rules.
The same goes with unused and removed variables except variables always removed manually.

This is not possible. There is some other source for whatever you think you are reporting. Swap Apps Device only exchanges device id's, nothing else -- so the original device still exists, and the database links for In-Use-By are not touched, and rely on the device id, not the name of the device.

If you remove a variable without hitting Done or Update in the rule, then it will result in an orphaned In-Use By link.

My golden rule is - ALWAYS click on Update and Done (even though any one is enough) at the end of making any changes. So, I am sorry but yours stament is not a case.

It is what it is. I am used to this behavior but not considering this as a problem. Yes it is very annoying but not a big deal.