Solved, as it take time for proper device to shop up in dashboard device list, just need to be patient and it has come up, device name for dashboard should be same as child device of Rule Engine Connectors, for example:
Can anybody tell me if this is the correct behavior? Seems odd....
Added two GVs, each with a connector. I added the first GV as a number (which is what I want) and then created a Variable connector. Second, I added another GV, but this time as a Decimal, and again created a Variable connector. In the first case, no connector shows up (see pic below) and it is not listed in the "Delete Connectors" drop down. HubConnect won't send it across to another hub either. The second GV shows up and functions as expected.
Makes sense, thanks. In fixing the prob, I now appear to have a couple orphaned connectors (variable deleted, but corresponding connector still shows up in device list under RM). Any way for me to clean that up (if it matters)?
I have setup a few apps with connector variables. I added them to a dashboard to help me debug an issue I am having with them, and I am seeing something strange...
One of the variables is a Boolean and was setup as a Presence connector. I expect that it will be "Not Present" when false and "Present" when true. However, I am not seeing it switch to false in the dashboard when I set it to "false" and then to "true" after a 5 second delay. (Note that in further tests, I was able to see it toggle when I set it to "not" it's value, so I don't understand what is going wrong...)
When I "Run Actions" on the code (below) and the first IF statement is true, the dashboard goes crazy (values change over and over again - see video below). This doesn't occur when the "Else" condition is triggered.
I have connector variables set up as well, for similar purposes. I am using every type and they all work except for the String variable. For me, it never updates in the dashboard.
Have you tried Variable String to display the variable in your Dashboard? That is the only one, of the few I tried, that Ā« worked Ā» for me. I just wish I knew why it is acting up... Other than that, it is such a great feature, isnāt it!?
I will debug further this weekend and contact support if I canāt resolve with the community.
Thanks @bravenel! I spent several hours working on this today. I am finding that the behavior seems inconsistant, which is odd. Further testing makes it look like there is some kind of feedback loop in the connector. It seems to be dependent on the delay between 2 runs.
I was able to isolate the cause of the issue. It only seems to occur when I have code that modifies the variable by adding %itself% to the new value or by executing a āReplaceā on it.
I can bypass the issue by writing to the variable only once at the end. Is that the way it is suppose to work? I stayed up way too late trying to figure this out last night, and my brain is mush today, so hopefully, I didnāt miss something obvious!
Another related issue I am encountering is with the Boolean variable ātestDoorMessageCompleteā that is setup as a Presence connector.
I am finding that when I set the variable to False at the beginning and then True at the end (even with a 5 second delay), the dashboard never shows āNot Presentā. The only way I could get it to change is by setting it to ānotā itself once either at the beginning or at the end of the rule. That seems odd to me...
Thank you very much for taking the time to look into this! I really appreciate it!
The variable string shows Unknown. It should be Echo - Office. It simply shows the last echo that was spoken to. I had created it just as an easy way to look at the variable.
This is a screen capture of the current variable value in RM.
The variable is set to unknown each time the RM rule is triggered, and then gets changed to the name of the last echo device spoken to. The variable and the rule are working fine, but the dashboard variable never changes from Unknown.
Odd... The setup seems to be exactly the same as I have for my test dashboard. I do have one Variable String as āUnknownā too, but that one is not linked to a variable. Is there some way that it might not be linked correctly?
These are purely internal to Rule Machine. Notice that you can use Global Variable Connectors (virtual devices tied to Global Variables), and these can be used in other apps.
They create virtual devices. Create one and look in your Devices list. They will be under "Rule Machine Connectors". As devices, they can be used in any context a device with that capability can be used.
It is. It supports a command: setVariable(string), and an attribute variable, also a string. So you can pass strings into and out of a rule to/from an app.
Perhaps if you show your use case instead of making assertions about what can and cannot be done, we could benefit from facts.
Variables are exposed indirectly through connector devices. That's how this feature works. It allows apps to fully interact with variables. Anything that can be done with a variable in a rule can be done with that same variable in an app, by using the connector device as the intermediary.
You can't use %on_state% in an app. You have to have the connector device selected so you can send commands to it. Instead of your input with %on_state& you would need this selector:
input "color1", "sensor", title: "Select connector for Color 1"
I am trying to create a variable named "BANNER" type string and assigned it to a Variable connector. It shows up in the Create Global Variables page, but there is no virtual device created.
The screens you show in the initial post are different than what I see, and I assume you made some updates to this area in a recent firmware update.