[SOLVED]"Timer is active" state not correct on indigo touch

Posted on
Wed Dec 25, 2013 4:08 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

[SOLVED]"Timer is active" state not correct on indigo touch

I have a bunch of battery operated devices whose up-status is monitored using timers that are reset every time a heartbeat or status update is received. In order to reduce control page clutter, I am using the "timer is active" option to update a bicolor image on a control page. Makes for an easy "is it working" at a glance.

I don't think the actual iPhone control page heuristics are working. I have two instances now where the timer is stopped - battery died - and yet the iPhone's control page bicolor image remains green. I just checked it with the control page browser preview, and the image is properly red, so the preview and CP are discrepant. Thoughts?

Posted on
Thu Dec 26, 2013 11:19 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: "Timer is active" state not correct on indigo touch page

How specifically do you have all of the images named, and what are all (specific) variable values possible?

Image

Posted on
Thu Dec 26, 2013 11:42 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: "Timer is active" state not correct on indigo touch page

The images are RG-BiColor-16.PNG and RG-BiColor-16+true.PNG. The variable values are from the timer status itself, "active" or "inactive".

Posted on
Thu Dec 26, 2013 11:45 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: "Timer is active" state not correct on indigo touch page

If the variable values are active and inactive, then you need images named the following:

RG-BiColor-16+.PNG
RG-BiColor-16+active.PNG
RG-BiColor-16+inactive.PNG

The first image is just a placeholder that will be used if the variable value doesn't match the other two. It is required though, because the + tells Indigo to use the more advanced image file look-up heuristics.

Image

Posted on
Thu Dec 26, 2013 9:58 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: "Timer is active" state not correct on indigo touch page

Got it. That worked -- thanks! Curious as to why it would be correct on the web server page but not IndigoTouch?

Posted on
Thu Dec 26, 2013 10:32 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: "Timer is active" state not correct on indigo touch page

Indigo Touch users a custom renderer (not HTML/CSS/JS based) so it works a bit differently. The fact that they are inconsistent is just because the code is unintentionally different in Indigo Touch in this case. In the future they will likely have more identical behavior, but having the files named as I listed above is the correct solution that should work going forward...

Image

Posted on
Fri Dec 27, 2013 7:27 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: "Timer is active" state not correct on indigo touch page

Thanks for the excellent explanation!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 14 guests