Dynamic Refreshing Image URL

Posted on
Tue May 01, 2018 3:05 pm
jay (support) offline
Site Admin
User avatar
Posts: 14400
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Here's how I have one scenario set up on my dev Mac:

ss178.png
ss178.png (198.15 KiB) Viewed 299 times


I have a Refreshing Image URL control page element that points to the DRI url, which itself points to a variable named "avatar_pict_url". That URL then points to a static image that I'm serving up from the public section of IWS (note no need for creds there) as shown by the Finder window in the lower right side.

Without picts, I can't really tell if this is what you were trying to do or not. If not, post screen caps of the relevant parts.

I'm also wondering why you're using the public folder mechanism here - there doesn't seem to really be a need, at least from what I can understand.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 3:53 pm
Different Computers offline
User avatar
Posts: 1805
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Yup, that's what I was trying to do--wrong. I think every DRI variable I tried had left out the port for images local to the Indigo Server.

I'll know for sure when I get off my own network tomorrow.

And thanks for pointing out to me that what I'm doing doesn't need to be in the public directory. That's an outmoded thought leftover from an earlier attempt than the python version I'm now using.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Tue May 01, 2018 4:06 pm
Different Computers offline
User avatar
Posts: 1805
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Still not getting something.

Tried moving stuff into /images and changing the url variable to
Code: Select all
http://localhost:8176/images/whatev.jpg

results in
Code: Select all
   WebServer                       http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: HTTP Error 401: Unauthorized

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Tue May 01, 2018 4:17 pm
jay (support) offline
Site Admin
User avatar
Posts: 14400
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Different Computers wrote:
Still not getting something.

Tried moving stuff into /images and changing the url variable to
Code: Select all
http://localhost:8176/images/whatev.jpg

results in
Code: Select all
   WebServer                       http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: HTTP Error 401: Unauthorized


I'm still trying to figure out what you're trying to do exactly.

When you moved it to the /images/ directory it became protected again. The DRI plugin doesn't handle HTTP authentication so that won't work.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 4:55 pm
Different Computers offline
User avatar
Posts: 1805
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

ok, let me step all the way back.

First, a reminder that my DSL connection is limited to 0.8 Mbps.

Because of that, it seems wise to me to, whenever possible, minimize travel outside the network for resources that are inside the network, while the viewing client is inside my network.

If I make every DRI URL variable that resides on my IWS (in the public folder, because no auth) start with https://myindigoname.indigodomo.net , then every time I pull up a control page, even if I'm home on my LAN and using the http://indigoservername.local address, then all the images, which are the large things in these pages, will have to go UP to the reflector and then back down to my router and then to my client computer that requested the page. Right?

But I see that since I can have my indigo server's control pages include entirely non-routing, non-resolvable LAN only addresses as DRI URL variables, it made me wonder if I could use a non-routable address for server-resident images too.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Wed May 02, 2018 9:18 am
jay (support) offline
Site Admin
User avatar
Posts: 14400
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Ok, I get it, thanks for the full description. To restate: you'd like to serve up static images via IWS locally over the network when the client is on the same network as the server, but also have the same image available via reflector when the client isn't local.

Using the DRI plugin with a variable that points to the IWS public folder served up by the local Indigo Server will work correctly in that scenario.

However, you can avoid the extra redirects, plugins, and public directory if you can just replace the image in the Indigo server's filesystem whenever it changes. Use a file:/// URL in the Refreshing Image URL control page element type and point it to the image. Maybe that's not possible in your scenario but I thought I'd mention it as an option.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 0 guests