Selectable image source in a single Refreshing Image URL

Posted on
Tue Aug 16, 2016 8:31 am
citysnaps offline
Posts: 28
Joined: Jul 13, 2016

Selectable image source in a single Refreshing Image URL

Hi...

I've been using Indigo for about a month and am extremely pleased. In my phone's Indigo Touch control page I have a variety of light controls, motion sensor reporting, and four IP camera streams. It all works great and am very happy.

Currently each IP camera periodically refreshes four separate Refreshing Image URL fields, using:

//localhost:8000/++image?cameraNum=0&width=1080&height=607&quality=60
//localhost:8000/++image?cameraNum=1&width=1080&height=607&quality=60
//localhost:8000/++image?cameraNum=2&width=1080&height=607&quality=60
//localhost:8000/++image?cameraNum=3&width=1080&height=607&quality=60

As that's wasteful on bandwidth and phone screen real estate, I'd like to instead have just a single Refreshing Image URL container on my control page. And then,, depending on the state of a variable that is updated from a button taking on values of 0, 1, 2, or 3, put one of the above four URL's into the URL field for the single image container.

I can handle managing and incrementing the variable from successive button pushes in Indigo. But need to select and put one of the above four URLs into the control page's refreshing image URLs based on the value of that button variable.

I suspect that feature is not built-in. But have a feeling there is something I can do with a bit of external code. Can someone point me in the right direction?

Thanks!

...........................
Brad
Urban photoblog: www.citysnaps.net

Posted on
Tue Aug 16, 2016 8:57 am
jay (support) offline
Site Admin
User avatar
Posts: 13269
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Selectable image source in a single Refreshing Image URL

Pretty sure you could write an IWS plugin that would look at the variable value then redirect to the appropriate URL. IWS plugins are legacy but should continue to work in Indigo 7.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Aug 16, 2016 9:10 am
citysnaps offline
Posts: 28
Joined: Jul 13, 2016

Re: Selectable image source in a single Refreshing Image URL

Thanks for the speedy reply - appreciate it!

Will check out IWS Plugins.

...........................
Brad
Urban photoblog: www.citysnaps.net

Posted on
Tue Aug 16, 2016 9:55 am
johnpolasek offline
Posts: 738
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Selectable image source in a single Refreshing Image URL

I set up a different control page for each camera, kept in a floder labeled "Cameras". I have always assumed that until I activated a page, it did not actually load anything... Is that an erroneous assumption?

Posted on
Tue Aug 16, 2016 11:47 pm
bkmar1192 offline
Posts: 269
Joined: Sep 12, 2015

Re: Selectable image source in a single Refreshing Image URL

I have done this by using symbolic links. I have directions on how I did it over here:

viewtopic.php?f=133&t=1506&p=121610#p121610

Basically you have a symbolic link that points to your video file and then issue a unix command via Apple Script to refresh the symbolic link. In the example above I loop through each of my cameras. However, using the same technique, I have a different page that has a small versions of my cameras and clicking on them displays the camera in a bigger screen. Works great.

Posted on
Fri Jul 28, 2017 10:49 am
jay (support) offline
Site Admin
User avatar
Posts: 13269
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Selectable image source in a single Refreshing Image URL

Just as a followup: viewtopic.php?f=134&t=18729

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests