[ANSWERED]Execute script when control page opens?

Posted on
Sat Nov 07, 2015 1:20 pm
stevemac00 offline
Posts: 79
Joined: Sep 02, 2013

[ANSWERED]Execute script when control page opens?

Am I missing something that should be obvious?

Otherwise any hack to do this? I tried the server status but it has to be clicked to execute a script.

Why? I need to initialize some indigo variables.

Posted on
Sat Nov 07, 2015 1:25 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Execute script when control page opens?

you could do it on the calling page in "Edit actions"

Posted on
Sat Nov 07, 2015 3:08 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Execute script when control page opens?

Not at the moment. Remember, however, that control pages can be opened by multiple devices at the same time. So if you're holding some kind of state for the page it could get rather messy... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Apr 28, 2017 5:56 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: [ANSWERED]Execute script when control page opens?

Even though more than one user can in principal have a control page open, in practice a control page intended to configure profiles or sequences of actions may beneficially open with some of the variables represented by input boxes being set to null strings, to ensure they don't contain invalid values

However, under Indigo 7 it seems that the Server action/Edit Actions segment of a control page object does not run if there is a Client action set to move to another control page. I did have this working under Indigo 6, e.g on pressing a control page object first running the Client Action and then the Edit Action, so there seems to have been a change?

Any suggestions as to how to get around this? :shock:

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Posted on
Fri Apr 28, 2017 6:05 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]Execute script when control page opens?

Is this from Indigo Touch or from a browser? If I remember correctly, this is browser dependent (I think Indigo Touch should handle the case correctly). I don't recall which browsers it was, but some of them let the JavaScript call back to the server complete (which starts the server action) before they navigate away from the page, but others don't. It is possible a browser version update changed the behavior as well but I don't believe anything changed on Indigo's web server side from 6 to 7 that would explain the behavior changing.

Image

Posted on
Fri Apr 28, 2017 7:21 am
RedYuriPrime offline
Posts: 58
Joined: Oct 14, 2014
Location: Oxford

Re: [ANSWERED]Execute script when control page opens?

OK, I think you have got it spot on. :oops:

During development I tend to look at everything in a browser on the Mac running Indigo - under these circumstances it is not running the Edit Actions. However in Indigo Touch it is (at least some of the time, not entirely certain it is consistent when the connection is flakey). At least since I now understand what is going on, so it should avoid me going mad!

Many thanks! :D

Z-wave system with 80+ devices, Indigo7 on a dedicated MacMini
Controlling lighting, heating, hotwater, security; but still a lot to learn ... :shock:

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests