Automatic changing Control Page every 5 minutes

Posted on
Fri Nov 28, 2014 7:49 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Automatic changing Control Page every 5 minutes

Hello,

I want to make a Controlpage which automatic changed every 5 minutes on an iPad at the wall.
(for example 5 minutes a page with Control buttons and 5 minutes wonderful plots from IndigoPlotD,)
(and this circulation prevents screen burn, even with an iPad).

So, the question is; How can I make a Controlpage which can switch the content every 5 minutes?

Thanks for the help and greetings,

John

Posted on
Fri Nov 28, 2014 8:47 am
wysinawyg offline
Posts: 45
Joined: Oct 11, 2013

Re: Automatic changing Control Page every 5 minutes

Create a Variable "PlotDisplay"

Create a Trigger so that every time the Variable changes a 5 minute counter is started and toggles it between "On" and "Off".

Then use image heuristics tied to that Variable so for each plot you want to make you have Plot+ which is a 1x1 pixel and Plot+On which is your full size plot.

Make sure that image is at the front of the order for display and set an action to it so that tapping it sets your Variable to "Off".

Get the placing of the images right (not sure if top corner of where you want the plot or centred) and that should mean that every 5 minutes your little pixels explode into giant plots which then all disappear again as soon as the screen is touched.

Posted on
Fri Nov 28, 2014 9:31 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Automatic changing Control Page every 5 minutes

Thanks for the fast reply!
The plots are 4 images, so that's doable.
But automatic back after 5 minutes to the "Home live screen page", with more than 100 Devices, Variables and images,
how is that possible?

Greetings,

John

Posted on
Fri Nov 28, 2014 9:40 am
wysinawyg offline
Posts: 45
Joined: Oct 11, 2013

Re: Automatic changing Control Page every 5 minutes

If you set the Trigger up so that the Variable toggles every 5 minutes automatically then as soon as 5 minutes are up it will change to "Off" and your plots will revert back to being 1x1 background coloured pixels.

You never leave the home page (I don't think Indigo would support doing so) you just cover it up with the plots and have them disappear again by getting the variable to change (either by touching them or expiry of the 5 minutes on the Trigger toggle).

Posted on
Fri Nov 28, 2014 1:45 pm
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Automatic changing Control Page every 5 minutes

Thank you very much for the explanation. That's a very smart (and a bit complex) solution but doable.
I have something to do this weekend :-)
Greetings,
John

Posted on
Fri Nov 28, 2014 2:09 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Automatic changing Control Page every 5 minutes

Perhaps something that will become easier with indigo touch 2, eh Matt & Jay? ;)

Computer says no.

Posted on
Fri Nov 28, 2014 2:20 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Automatic changing Control Page every 5 minutes

HousePad is going to have this ability very shortly, or at least a feature that could implement it -- the server will be able to trigger a Control Page swap on a client device (such as a wall mounted tablet) if the client is setup to allow this. You could setup a schedule once that is in place to switch it every 5 minutes (in my particular case I am wanting wall tablets to be able to, say, pull up a security page upon a motion detection or show call log on phone calls received).

BUT, probably too late if you are already trying to do that in iOS. Though Google has some Nexus sales going on today... #JustSayin' :-)

Adam

Posted on
Fri Nov 28, 2014 2:45 pm
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Automatic changing Control Page every 5 minutes

It works!
But I have a problem with the location of the Plot files.
They are in the documents/IndigoPlotD folder.
So I made an alias of a plotEnergy.png file in this folder and placed this alias in the
IndigoWebserver/images/controls/variables folder.
That doen't work....
(when I place the original plotEnergy.png file in this Variables folder, it works perfect but that's not the location where IndigoPlotD writes his data.

How can I solve this?

Thanks for the help,

Greetings.

John

Posted on
Fri Nov 28, 2014 3:21 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Automatic changing Control Page every 5 minutes

You could try a symbolic link to the plot directory.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 28, 2014 3:37 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Automatic changing Control Page every 5 minutes

You could also setup a copy script to copy the file you like to show to the display directory Run it every 5 minutes. I can post a script that does that later.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 28, 2014 4:19 pm
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Automatic changing Control Page every 5 minutes

Thanks Karl,
The most beautiful solution is a "live" link to the Plot directory with an Alias or so.
When there are no other solutions to display the Plots at the iPad (thanks for the input Adam but I'm an Apple fan since 1980 :-) ) , maybe the copy script will work. But that copy time must be almost the same as or equal to the Trigger time to change from Control Page to Plot.. Otherwise there is for example almost 10 minutes difference...

Posted on
Fri Nov 28, 2014 5:26 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Automatic changing Control Page every 5 minutes

We can do a copy script that syncs with other triggers.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 28, 2014 10:38 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Automatic changing Control Page every 5 minutes

this script should do it
it rotates the files listed in "source" and copies them to destination every time is is called.

put this into scheduled action / action /= server=execute script
click on compile to see if its drama is correct
then replace
sourceDir
source
destination with your settings

execute the schedule every 5 minutes
put the destination string into your touch page.

then every 5 minutes the png file will change.

hope this helps
Karl
there is very little error checking done, i.e. if source an destination exists...

Code: Select all
##  2014/11/24
##  Karl Wachs
##  this script will rotate files copied to a destiantion file each time it is executed
##  it uses a variable  "fileCopySequence" to store the sequence number
##   it is usefull if you like to eg roatate a png file on your itouch page.
##  copy this into a scheduled action
##    and replace the source and destination directories and files to be rotated with your settings
##  you should set the repeat time in the schedule and also conditions to enable / disbale in the schedule setup
##
import shutil
sourceDir="/Users/karlwachs/Documents/INDIGOplotD/"  # this is the source directory f the files to like to rotate
source=[
 "new device-minute-S2.png"      ## these are the files that should be rotated
,"new device-minute-S1.png"
,"new device-day-S2.png"
,"new device-day-S1.png"
]

destination= "/Users/karlwachs/Documents/INDIGOplotD/FileToShow.png" ## this is the destination filename use this in your itouch page
try:
   seqNumber=0   
   indigo.variable.create("fileCopySequence")
except:
   try:
      seqNumber = int(indigo.variables["fileCopySequence"].value)
   except:
      seqNumber=0   

if seqNumber <len(source)-1: seqNumber+=1   
else: seqNumber=0
indigo.variable.updateValue("fileCopySequence",str(seqNumber))

shutil.copyfile(sourceDir+source[seqNumber], destination)

Posted on
Mon Mar 09, 2020 10:00 pm
mgolden50 offline
User avatar
Posts: 247
Joined: Jan 29, 2007
Location: Chandler, AZ

Re: Automatic changing Control Page every 5 minutes

Is there currently a way to change the control page displayed on Indigo Touch or the web programmatically without direct user interaction?
I haven't been able to find any advice in the forums.

Thanks,

Mike

Posted on
Tue Mar 10, 2020 7:51 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Automatic changing Control Page every 5 minutes

Nothing built-in to Indigo.

I wonder if there's some way to run timed shortcuts in iOS - that could be one option since you can use the Indigo Touch URLs to load a control page.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 1 guest