Action Group - Increment Variable Problem?

Posted on
Sat Sep 28, 2013 6:37 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Action Group - Increment Variable Problem?

I have set up an Action Group to do what I call a "Mild Temperature Boost" with a number of actions which indigo displays as:
Code: Select all
set value of "t01_targettemperature" to the value of "t01_lastrecordedtemperature"
increment variable T01_TargetTemperature by 1
set variable T00_ThermostatToProcess to 1

Typically the value of the variable "T01_LastRecordedTemperature" might be "19.5".

The problem is that the 1st and 3rd statement gets processed OK but the 2nd statement (increment variable) doesn't seem to get processed. So in this case the variable gets left at 19.5 when I actually want it to be 20.5.

I also note that in the list of actions that the 1st statement is all in lower case variable names but the subsequent ones aren't (the alteration of this 1st statement was done by Indigo - I don't know if it makes any difference)?

I may be missing something obvious but I can't see it for the moment :)

Posted on
Sat Sep 28, 2013 7:01 am
durosity offline
User avatar
Posts: 4334
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Action Group - Increment Variable Problem?

How about simplifying it by doing something like:

Code: Select all
set value of variable "test" to the (value of variable "test123") + 1


which is effectively line 1 and 2 rolled into one.

Computer says no.

Posted on
Sat Sep 28, 2013 7:09 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Action Group - Increment Variable Problem?

durosity wrote:
How about simplifying it by doing something like:

Code: Select all
set value of variable "test" to the (value of variable "test123") + 1


which is effectively line 1 and 2 rolled into one.
I don't think I can do that as Indigo doesn't give you the option (AFAIK) when you do an action type of "Set Variable to Variable (Variable Actions)". I was trying to avoid doing yet another script :wink:

Posted on
Sat Sep 28, 2013 7:45 am
durosity offline
User avatar
Posts: 4334
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Action Group - Increment Variable Problem?

Ah I see, I thought it was a script (but it would work as a script, I tested it before posting)! In that case for similar issues I've set a 1 second delay between the different actions, my guess is as they all fire at once it ends up overwriting the incremental figure

Computer says no.

Posted on
Sat Sep 28, 2013 8:32 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Action Group - Increment Variable Problem?

durosity wrote:
Ah I see, I thought it was a script (but it would work as a script, I tested it before posting)! In that case for similar issues I've set a 1 second delay between the different actions, my guess is as they all fire at once it ends up overwriting the incremental figure

Seems like a good guess :D

I put a two second delay on the 2nd statement and a four second delay on the 3rd and it works :!: I guess the actions are fired off asynchronously and therefore can execute in any order - not something that appears to be obvious (especially as you have got arrow commands to alter the order of the actions in the list - must be for cosmetic reasons only :?: )

Thanks so much for your help :)

I have almost got my scripts working now - just need to await the arrival of some more Stella-Zs early next week to complete the multi-thermostat testing. For the longer term I am looking to create a plug-in but I have a bit of self-education to do first :wink:

Posted on
Sat Sep 28, 2013 9:26 am
durosity offline
User avatar
Posts: 4334
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Action Group - Increment Variable Problem?

autolog wrote:
I have almost got my scripts working now - just need to await the arrival of some more Stella-Zs early next week to complete the multi-thermostat testing. For the longer term I am looking to create a plug-in but I have a bit of self-education to do first :wink:


No problem! My hope is by next winter (as in end 2014) to have got Stella-Zs or something like them for all 12 radiators.. i’d love to get them this year but no way will I have enough free money.. I think christmas dinner this year will be a tin of baked beans (Thanks to Barratts setting our move in date as the 17th December…) Hey.. hopefully by then you might have a plugin to make the whole process easier ;)

Computer says no.

Posted on
Sat Sep 28, 2013 2:07 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Action Group - Increment Variable Problem?

Possibly a case of RTFM :oops:

I have just found this in the documentation:
While you can order the actions in any order you like, Indigo will attempt to execute all actions in parallel. It's not always possible for various reasons, but that's the intent. If you want to order the execution, then you'll need to add delays which will delay the action's execution from the time of the event. So, if you have 3 actions and you want the first to execute immediately, the second to execute a minute after the event, and the third to execute two minutes after the event, then add a one minute delay to the second and a two minute delay after the third.

In my defense, I am not sure it is obvious from the dialogue displayed.

In addition, it would be nice to have the ability to request Indigo to execute the statements serially - it would save sxtraneous schedules getting generated :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 19 guests