Possible webcore error with Hub variables

setVariable() is the command that the connector uses to update the value for the variable, so while it is resolved behind the scenes it does add a little confusion to the equation.

I just did this myself and noticed that as well. It looks a bit weird but as you noted it works.

So this form seems to be using hub variable connectors.

Bruce states in the future connectors will go away.

It is possible for webcore to use the new 2.2.8 and later hub local variables directly.

The questions I have to webcore folks:

  1. Do you want to use local hub variables directly?
  2. What syntax would you like to access them
  • it likely would be easiest to replace global variables to be hub - ie @variablename would reference the hub variable 'variablename'
  • another choice would be to have another 'indicator' that a variable is a hub variable (vs using the '@' for this).
  • another choice is use the @@ syntax, which in webcore means super variable that is shared

thoughts?

Don't use them often, but would seem to be desirable

My Vote -> replace global variables to be hub - ie @variablename would reference the hub variable 'variablename'

1 Like

Yes, I have started using them lately.

Yes!

Guys, I've been twirling around in place for a couple of hours now, trying to figure out (what I believe is) a very basic maneuver in WC, namely assigning the value of a Device Attribute (in this case, the 'Button Pressed' attribute of a Buttons device called 'pw_buttons') to a declared piston variable (i.e. not a Hub variable).

Here's how far I've come...


..and when I click the +add a new statement block (circled in red), thinking that's where I create a statement such as:

buttonPressed := pw_Buttons(Pressed); /* ha, ha, pseudocode here */

My options seem limited! I know I don't want IF-THEN, DO, WHILE, etc., so the closest match appears to be ACTION, so I click that. But all of ACTION's sub-options involve Devices and Location.

I'm basically going bonkers trying to wend my way to wherever VARIABLES live, and I don't recall ever having hit this roadblock before.

FYI, I'm using WC rev. v0.3.114.20220917_HE under HE f/w 2.3.3.112

THOUGHTS? Thanks!

  • Libra the n00b (99.9% of my workflows live in RM, but this project needs arrays, lookups, text-matching, CASE statements, etc.) :slight_smile:

Use the DO option, Set Variable...

1 Like

Yeah, not exactly intuitive, but you got there. Good!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.