Multi-Line & Column Array?


1) Give a description of the problem
The piston below works fine. I apologize for what may be a silly question, but I cannot find how to do this. I’m looking for a way to do a multi-line/column array (not sure I’m asking that correctly). I’m not even sure that WC allows multi-line arrays.

2) What is the expected behavior?
I’d like to set up a multi-line/column array so that I don’t have to have each mode change ‘block’ in the piston set the variable the way I’m currently doing it. In the define section, I’d like to set a Dynamic List something like this:
ArrayList[0] = “Away”; {@AwayHeatSP}; {@AwayCoolSP}
ArrayList[1] = “Vacation”; {@VacHeatSP}; {@VacCoolSP}
ArrayList[2] = “Home”; {@HomeHeatSP}; {@HomeCoolSP}

Then, In each Mode Change Block, I could just set the index number and then in the Change and Confirm Block, address the proper array elements to set and confirm the location mode and thermostat’s setpoints - ArrayIndex{index#],1, etc…

3) What is happening/not happening?
Again, the piston works as is. Just trying to use a multi-line/column array.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
Not needed for this discussion.

None of that may be clear, so ask away if needed. Thanks!



After a little thinking and some program rewriting, I modified the piston above to the one below. I wanted to set up a 3x3 array but still don’t know how to do that. To create the piston below, I used a single line array with (9) elements. Each mode setting has (3) components Mode Name, Heat Setpoint and Cool Setpoint. So, when the mode is selected, it sets the index starting point and I can calculate the index position of all three needed components for that particular mode using the repeat until loop. Essentially, I created three groups of three components. Its almost the same as using a 3x3 array. I’d still like to learn how to set up and address a multi-row/column array, but this works for now. I’ll still take responses if such arrays are possible or if anyone has comments :grinning::


Did you ever figure out how to do dimensional arrays, ie 3X3 (in HE webcore) ?


Nope. I left it in SmartThings as it was written - at least as far as the pseudo array issue is concerned, and it works there. As far as HE is concerned, I have the HE hub ready to go but haven’t moved from SmartThings yet. My guess is that when ST takes away my ability to use WebCoRE, I’ll be doing the conversion to HE so I can continue to use WebCoRE there.