Page 5 of 9

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 01, 2018 3:05 pm
by jay (support)
Here's how I have one scenario set up on my dev Mac:

ss178.png
ss178.png (198.15 KiB) Viewed 10536 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.

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 01, 2018 3:53 pm
by Different Computers
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.

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 01, 2018 4:06 pm
by Different Computers
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

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 01, 2018 4:17 pm
by jay (support)
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.

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 01, 2018 4:55 pm
by Different Computers
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.

Re: Dynamic Refreshing Image URL

PostPosted: Wed May 02, 2018 9:18 am
by jay (support)
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.

Re: Dynamic Refreshing Image URL

PostPosted: Tue Dec 24, 2019 7:50 pm
by durosity
So I don’t suppose there’s been any more thought on making this work with authenticated sources.. namely directly from SecuritySpy? The reason I ask is I’ve been playing with this as a way to get Indigo to show an error image if SecuritySpy isn’t available or the camera is down or whatever rather than ending up with literally thousands of 404 errors in the activity log (several tablets running indigo touch with 11 cameras refreshing every second sure makes for a lot of entries the second SS quits!). Now I can get my way of doing it to work but it’s quite janky.. I have to get SS to copy an image to an ftp server or to the reflector public folder*, then get it to use that url, but as you can imagine that takes a heck of a lot more effort and it results in the refresh period for images often going to 2-3 seconds rather than the 1 I want. Or is anyone aware of a way of getting SS5 to allow unauthenticated access local on the sever?

*also I’d suspect this would be the bane of M&Js existence... reflector being uploaded with new images every second and read by multiple devices over and over and over again.. not to mention the fact I want to keep it all local with little or no cloud reliance and also the fact anyone could potentially access those images if they could work out the file names..

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 10:39 am
by mundmc
My Christmas gift to you is trying to remember how I got dynamic url’s to work with security spy!

IIRC, when I did it, I just needed to base64 encode my username and password (there are websites that will convert for you) and I passed it along in the url: https://www.base64decode.org

The schema is something like:
http://ip:port/++image?cameraNum=6&widt ... bleddygook

That last part after “auth=“ is, a base64 encoding of user and password using the format “username:password” (no quotes).

Example:
durosity:test is encoded as:
ZHVyb3NpdHk6dGVzdA==
(Decode it for yourself at above site)

Hope this works for you!

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 10:59 am
by durosity
Ooooh handy! If that works you’re officially Santa Claus! I’ll try it out soon!

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 1:13 pm
by norcoscia
I'm too lazy to read the entire post above but I use SS camera inputs on my control pages - lots of them - I use the format below to insert a refreshing URL. Hope that helps and happy holiday!!!!!

http://username:password@IPaddress:Port ... height=365

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 1:47 pm
by mundmc
durosity wrote:
Ooooh handy! If that works you’re officially Santa Claus! I’ll try it out soon!


Ho ho ho- it did for me!

This is officially the second time I have been helpful to a regular here!

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 8:02 pm
by durosity
If you want to be helpful again feel free to send lots of money to...

Re: Dynamic Refreshing Image URL

PostPosted: Wed Dec 25, 2019 8:02 pm
by durosity
norcoscia wrote:
I'm too lazy to read the entire post above but I use SS camera inputs on my control pages - lots of them - I use the format below to insert a refreshing URL. Hope that helps and happy holiday!!!!!

http://username:password@IPaddress:Port ... height=365


Oddly enough that’s exactly where I started with it but it didn’t work what SS version are you running?

Re: Dynamic Refreshing Image URL

PostPosted: Thu Dec 26, 2019 8:54 am
by norcoscia
The latest v5 but I put all the URLs in place under SS v4 and that worked great -- I'm running SS and Indigo on the same machine but doubt that would make any difference. The only issue is -- if I try to push a really large sized image I will get an error stating it was to big that rolls in my log until I exit the CP with that image - but the image does work (and update) anyway. There is a setting in SS you need to enable (I think) to allow web access, other that that it was straight forward . I got the idea after Matt posted the solution a long time ago while he was helping another user...

Re: Dynamic Refreshing Image URL

PostPosted: Sat Dec 28, 2019 4:07 am
by durosity
norcoscia wrote:
The latest v5 but I put all the URLs in place under SS v4 and that worked great -- I'm running SS and Indigo on the same machine but doubt that would make any difference. The only issue is -- if I try to push a really large sized image I will get an error stating it was to big that rolls in my log until I exit the CP with that image - but the image does work (and update) anyway. There is a setting in SS you need to enable (I think) to allow web access, other that that it was straight forward . I got the idea after Matt posted the solution a long time ago while he was helping another user...


Alas still no joy. However mundmc's base64 encoding worked so it's now up and running! Thanks both of ya!