Dynamic Refreshing Image URL

Posted on
Tue Aug 22, 2017 8:01 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Ah, so your cameras are Indigo devices? How do you do that? I can imagine a couple different ways.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue Aug 22, 2017 9:22 am
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

Ah!

Well I do use Security Spy; so I'm assuming that helps???!??? :lol:

Posted on
Tue Sep 19, 2017 8:51 pm
Vig offline
Posts: 111
Joined: Oct 06, 2015

Re: Dynamic Refreshing Image URL

jay (support) wrote:
As I said above, the plugin doesn't handle file URLs (URL's that point to local files on your disk). It only handles http/https URLs.
If you camera images are coming from a network source, then just insert that URL into the variable.
Otherwise, you'll need to write a script to swap out the image pointed to by the Refreshing Image URL (not using the plugin at all).


Getting errors when pointing to local image file through URL (the URL works when typed directly into the browser address field), below is the variable assignment, the URL and the error messages:

Try #1:

NuVo_Bsmt_Album_URL = http://172.16.32.3:8176/images/controls ... ntrols.png
http://user:pass@172.16.32.3:8176/varia ... _Album_URL

Log error:
WebServer http://172.16.32.3:8176/variable_url_re ... _Album_URL load error: HTTP Error 401: Unauthorized

------
Try #2: this time I added username/password to the variable:

NuVo_Bsmt_Album_URL = http://user:pass@172.16.32.3:8176/image ... ntrols.png
http://user:pass@172.16.32.3:8176/varia ... _Album_URL

Log error:
WebServer http://172.16.32.3:8176/variable_url_re ... _Album_URL load error: <urlopen error [Errno 8] nodename nor servname provided, or not known>
------

If I type the URL (http://user:pass@172.16.32.3:8176/varia ... _Album_URL) in the browser address, it works just fine. Any idea?
Thanks

Posted on
Wed Sep 20, 2017 10:14 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

The variable redirect plugin doesn't support authentication in the URL that's stored in the variable value. But you don't need to use the plugin right (or even the refreshing image URL)? If the file is already in the IWS directories you can just point to it directly.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 20, 2017 10:45 am
Vig offline
Posts: 111
Joined: Oct 06, 2015

Re: Dynamic Refreshing Image URL

jay (support) wrote:
The variable redirect plugin doesn't support authentication in the URL that's stored in the variable value. But you don't need to use the plugin right (or even the refreshing image URL)? If the file is already in the IWS directories you can just point to it directly.


Hi Jay, I can definitely point directly, but the logic is to change the URL variable depending on what button I click on the control page. All buttons point to some URLs hosted on a NuVo player displaying an album art and your plugin works just fine, but for one specific button on that page I just need to direct it to a static picture :) Is there a directory on IWS that doesn't require authentication where I could place the static images? thanks.

Posted on
Wed Sep 20, 2017 3:07 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Funny you should ask - in Indigo 7.1 (due very soon) there will be a new folder in the IndigoWebServer folder which will serve out unprotected files:

/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/public/


So you can add any files there (in subfolders if you choose) and those will be served up:

https://YOURREFLECTORHERE.indigodomo.net/public/README.txt


but will not require any authentication (this also serves as a warning to be careful what you put there).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Nov 09, 2017 8:25 pm
kwijibo007 offline
Posts: 325
Joined: Sep 27, 2013
Location: Melbourne, Australia

Re: Dynamic Refreshing Image URL

Awesome plugin Jay, thanks!

I'm using this to create a scene button that changes based on the time of day. Really handy. I'm placing my static images in the new public folder - works really well!

jay (support) wrote:
I should note that the downside is that your Indigo Server password is stored in the clear (in your Indigo DB) since you have to specify it on the URL, so it's a bit of a security risk. I believe we have a more secure way of doing it coming in v7.1.


Any update on this since 7.1? As you point out, I'd prefer to not store my username and password in in the URL string.

Pete

Posted on
Sat Nov 11, 2017 10:35 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

No - still looking at it but no ETA.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jan 29, 2018 9:16 am
george99 offline
Posts: 224
Joined: May 27, 2015

Re: Dynamic Refreshing Image URL

Hi, any way to add the width and size to this? I would like to be able to resize the image depending on the variable.
Maybe let indigo use 100% width and height and let the image server determine the size.
Or a variable to show/hide the image.
Or even a z-index setting in the variable to at least put the image in the back and hide it.

Basically my goal is to show my front door camera view when there is motion at the front door, and hide it when no motion.
The way I have tried to set it up is with the camera URL and a 1x1 pixel transparent gif. But the problem is that it is stretching the 1x1 image and it is covering up the controls under it.

Posted on
Mon Jan 29, 2018 10:04 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Image sizing would require a server change - the plugin can't really do anything.

What most others do is to create an image of the same size but that is completely transparent. So when they want it to not show they just set it to the transparent image.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jan 29, 2018 10:05 am
george99 offline
Posts: 224
Joined: May 27, 2015

Re: Dynamic Refreshing Image URL

Yeah but the transparent image is still there and doesn't allow me to click/touch anything that is under it.

Posted on
Mon Jan 29, 2018 10:26 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

You can move it to the back, but it will always then allow whatever controls you have on top of it to be active (though those controls could have a script for the actions and wouldn't do anything if the transparent image is what's currently being shown).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Feb 24, 2018 4:16 pm
jrickmd offline
Posts: 109
Joined: Jun 01, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

I'm excited about using this for when my Security Spy cameras lose connection, but have gotten a little confused.

The variable redirect plugin doesn't support authentication in the URL that's stored in the variable value.


But earlier in the thread Matt suggests using Security Spy server to
stuff into the variable value
the url:

http://ss_username:ss_password@192.168.0.4:8000/++image?cameraNum=1&width=320&height=240


Doesn't that require authentication?

I'm getting the same error that Vig did
Code: Select all
load error: <urlopen error [Errno 8] nodename nor servname provided, or not known>
using my SS server url. What am I missing?

Rick

Rick

Posted on
Sat Mar 03, 2018 9:52 am
jrickmd offline
Posts: 109
Joined: Jun 01, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

I'm trying to accomplish:

1) a "disconnected" image showing when my SecuritySpy camera is disconnected

2) my Security Spy camera image showing when connected

#2 works by putting the following URL directly in a refreshing image control:

Code: Select all
http://SS_user:SS_password@mac-mini-server.local:8100/++image?cameraNum=5&imageSize=0


When I load this plug in, I can successfully have #1 happen by altering the URL in appropriate variable to point to a URL with a disconnected image (yay!); however, #2 goal doesn't work as I get an error when I put the above URL into that same variable when the camera is connected. The error is the same that user Vig documents:

load error: <urlopen error [Errno 8] nodename nor servname provided, or not known>


I assume this has to do with the fact that the plug in doesn't do authentication as Jay remarks.

Is there a way to accomplish my goals with this plug in and Security Spy without putting an undue additional load on my system? It would be neat to accomplish, but not necessarily worth a great deal of overhead.

Thanks!

Rick

Posted on
Tue Mar 06, 2018 11:12 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

Yeah, the variable redirect doesn't support authentication currently.

I think your options are to somehow copy (script) the camera image file to your local hard drive and use a file:// URL with no authentication, or use 2 Control Page controls. One would be the refreshing image (with authentication), then on top have the variable image which you would have point to a 100% transparent image once SS is connected.

Image

Page 3 of 9 1, 2, 3, 4, 5, 6 ... 9

Who is online

Users browsing this forum: No registered users and 6 guests