RM 5.0: Wait for Condition/Event Variable?

@bravenel

Recreating a Rule from Legacy in RM5. I have the following statement in my old rule:

This does not seem possible in RM5. The list of capabilities doesn't include Variable any more. In this I'm trying to reference a Hub Variable so I can create a Connector, but this doesn't seem logical, especially for local variables.

Is this part of performance increate using Hub Variables?

Alan

2nd issue, just tried to "Set Variable" for a Hub Variable and they don't show up.

A Wait for Conditions doesn't allow a Variable because Hub Variables do not create events when they change values, so the Wait would not end. If you want that functionality, you have to use a Connector for the variable, and test the Connector in the Wait for Conditions.

A Connector is a device (virtual), so it does generate events when it changes values. It's linked directly to the variable, so when the variable changes value, so does the connector. In Rule Machine Legacy, it effectively generated 'events' for Global Variables, so Global Variables were allowed directly in this context.

Thanks for the confirmation on Hub Variables, but what about specifying local variables?

Well, you can't very well have a local variable in a Wait for Conditions, since no other rule can set one and this rule is waiting so it can't set it either. You could use a connector of a local variable, as its just a device and anything can set the device.

Duh!

I am trying to migrate Legacy Rules to R5.

A Legacy Rule Triggers on when a Global variable changes and then takes the content of the variable and publishes to screens/devices around the house them after a few minutes wipes the variable.

In R5 I have created the Hub Variable Alert-Message, I have checked the Connector, a Device called Alert-Message is created.

The Alert-Message device contains the Variable Text.

In R5 then What Capability should I select for a New Trigger Event on a change in the Alert-Message device?

I have tried a few options to no avail as they do not show the device in the list that follows the selection.

Any insight would be helpful, thanks

1 Like

For variable text, you will need to use Custom Attribute. That will offer you the content of the connector.

2 Likes