@bravenel I thought I had done this but I was looking at my Hub this morning and I realized that I can't access the values of my Hub Variable connectors on other hubs in RM5.
Screenshot below is a Decimal Hub Variable that stores the current KWH cost. The drop down should show device attribute hubMeshdisabled and Variable. As it does in RM Legacy, see next screenshot
I have three hubs, KWHCost is a Hub Variable on the House C7 and I cannot use it's value in RM5 on either of my other two hubs, I can use them in Dashboards and in RM legacy. Anyone Else?
So you're saying this is a device connected by Hub Mesh and it isn't showing its attributes on shared hub? Please show the device page of the shared device (not the original one).
Would you begin a rule in Rule 5.0, and select Custom Attribute for a Trigger Event, select that device, and see if it shows any attribute available, like this:
What is the type of the variables you are trying to set above, Tempvar, and temphold?
But 'variable' is a string, and you can't just cram a string into a decimal. If the variable attribute is the string representation of a decimal value, put it into a string variable first, then use the string conversion into a number operation.
Well I could/still can in Legacy RM.
KWHCost on the House C7 hub is a decimal hub variable. So I can only share strings across hubs?
Ok, That worked, I just didn't have to do that before. Now I know.
Yes, and in some cases it will throw a number format error. So, in Rule 5.0, type checking has been introduced to prevent that.
You can share any type of connector. It's just that a connector that is 'variable' is a string. You can create a decimal connector, e.g. 'temperature'.
1 Like
Full disclosure: I did find a bug with respect to setting a Number or Decimal value from a String variable. Fixed for the next release.
1 Like
Was it using a the variable numeric string slider? Because if I turn that on and select the variable it throws an error. If I use the variable between two % signs with the slider off then it works.
If that is not the issue, then what is the purpose of the slider?
I'm talking about the 2 step approach I described above, of first setting the 'variable' attribute into a String variable, and then using the 'string' operation for setting a Decimal variable to that value. The latter has a bug.
I think we are talking about the same thing. Below is what I ended up with and it works. When setting up the second line of the rule in the screen shot below there is a slider that can be used called "variable numeric string". If you use that slider you can just select the string variable(TmpString) instead of putting it between %%. However, that method throws an error in the log and will not execute.
