Page 7 of 9

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 11:16 am
by Different Computers
ok, and just like that, I found it.

I'm not sure what I was doing before that was not changing the CurrentCam variable, but when I used one of my old action groups to change CurrentCam, it worked and the errors stopped.

So never mind, I guess? Time to figure another way to get pics out of security spy for use in Indigo.

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 1:22 pm
by Different Computers
All right, with that issue behind me, now it's on to getting security spy images working with DRI.

I tried the base64 encoding of auth ala http://ip:port/++image?cameraNum=6&widt ... bleddygook trick, but I get "unauthorized."

When encoding, do encode *this whole thing as is*
Code: Select all
username:password


Or do I encode the username and the password separately and put a colon in between them? I've actually tried both and both get the same error.

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 1:45 pm
by jay (support)
jroach wrote:
Jay,

At the beginning of this thread you had talked about a solution that might work for me:

http://USERNAME:PASSWORD@localhost:8176/variable_url_redirect/redirect?name=VARIABLENAME


You mentioned that there might be a more secure method in 7.1+

I'm trying to create. control page that will display the camera selected without leaving the page (see image). Would the method above work and is it the best approach now?


It would only work if the URL you are redirecting to doesn't require authentication. The authentication above is for contacting the Indigo Web server (note that you also need to turn on HTTP Basic authentication for IWS).

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 1:48 pm
by matt (support)
Different Computers wrote:
When encoding, do encode *this whole thing as is*
Code: Select all
username:password


Or do I encode the username and the password separately and put a colon in between them? I've actually tried both and both get the same error.

I've never done it but based on this post from mundmc, the entire thing is base64 encoded. As an example he said durosity:test would become ZHVyb3NpdHk6dGVzdA==.

Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 2:00 pm
by mundmc
Different Computers wrote:
All right, with that issue behind me, now it's on to getting security spy images working with DRI.

I tried the base64 encoding of auth ala http://ip:port/++image?cameraNum=6&widt ... bleddygook trick, but I get "unauthorized."

When encoding, do encode *this whole thing as is*
Code: Select all
username:password


Or do I encode the username and the password separately and put a colon in between them? I've actually tried both and both get the same error.
Hmmmm, I think I got this working by inputting the string “username:pwd” (no quotes) into a base64 encoder. That worked for at least one other person. Hmmmm.

Mine looked like this:

Code: Select all
http://192.168.1.10:8000/++image?cameraNum=6&width=546&height=360page?auth=b2tleREDACTED9sZGVyOQ==

Re: Dynamic Refreshing Image URL

PostPosted: Fri Aug 21, 2020 7:30 am
by Different Computers
When I put the URL with the encoded username/pwd in a browser window, it does not work. I get the standard authorization popup. It also gives me either "No status line received - the server has closed the connection" or "unauthorized" when I try it in Indigo.

Time for more investigation.

Super oddly, when I put one of these URLs statically in a control page, it does work. Though in this case it's with the authentication in front of the URL.

Re: Dynamic Refreshing Image URL

PostPosted: Fri Aug 21, 2020 8:33 am
by jroach
Jay, thanks for the quick reply as always.

Let me rephrase my question.... What is the best way to create a control page where a button is pressed and it places the video from SS into an area that is not where the button is located (same page but different area)? I want to creat a button for each camera but only one area to display the image.

Advice appreciated.

Re: Dynamic Refreshing Image URL

PostPosted: Fri Aug 21, 2020 8:59 am
by jay (support)
jroach wrote:
Jay, thanks for the quick reply as always.

Let me rephrase my question.... What is the best way to create a control page where a button is pressed and it places the video from SS into an area that is not where the button is located (same page but different area)? I want to creat a button for each camera but only one area to display the image.

Advice appreciated.


To be perfectly honest and based on your mockup, I'd just create the control page, hardcode the SS url in a dynamic refreshing image URL element, the duplicate the page for each camera and hardcode the image URL. Then for each button, just have it switch to the correct page. So no trickeration with dynamic URLs or forwarding. The effect would be the same - click the button and the image changes - but is much easier to configure. Duplication is usually seen as wasteful, but because these things end up being static for years after initial implementation, it really is often the easiest approach.

Re: Dynamic Refreshing Image URL

PostPosted: Fri Aug 21, 2020 11:09 am
by jroach
Jay, thanks I'll give that a try.

So, if I have a dozen cameras I'll have a dozen pages... from what I know, that should be pretty straight forward to duplicate then change the camera number and button.

If I have other elements on that page (Lights, HVAC, Audio, etc), will those be preserved in the duplicating process ie: if a light shows as "on" for the primary page that the duplicate will also show as on?

I know....give it a try :)

Thanks again.

Re: Dynamic Refreshing Image URL

PostPosted: Fri Aug 21, 2020 11:26 am
by whmoorejr
jroach wrote:
will those be preserved in the duplicating process .
. Yes. All buttons, actions, images, etc are all preserved when duplicated.

Re: Dynamic Refreshing Image URL

PostPosted: Sun Aug 23, 2020 3:40 pm
by jroach
Jay,

I tried your idea of just making a new page for each camera ie: each camera has its own page and when you touch the camera name it switches pages.

Not certain if there is a way around this but I tried both "advance to control page" or "replace with control page" but its obvious its moving to a new page. I was hoping it would be like the +on and be seemless.

Thoughts appreciated.

Re: Dynamic Refreshing Image URL

PostPosted: Mon Aug 24, 2020 1:21 pm
by jay (support)
Yeah, I had forgotten about the flip transition when you use replace with control page. When viewing in a browser it does exactly as you'd like, just not in the iOS client.

Re: Dynamic Refreshing Image URL

PostPosted: Wed Jul 07, 2021 3:47 pm
by EagleDTW
Hi Jay,

I love the static image dynamic refresh feature - I'm running into an issue currently that the images are from pre-upgrade public folder and not currently what is in the public folder inside the 2021.1 folder of web server. Any help appreciated?

Thank you,
Daniel

Re: Dynamic Refreshing Image URL

PostPosted: Sat Jul 10, 2021 8:26 am
by Different Computers
Do you have any hard coded paths in whatever is serving the image? Probably a control page, and those paths need to be adjusted when the public folder path changes.

Re: Dynamic Refreshing Image URL

PostPosted: Mon Jul 12, 2021 7:03 pm
by EagleDTW
I have it dynamically linked to the server which should point to any new install:

http://username:password@localhost:8176 ... e=ImageURL

With the variable containing this:
http://localhost:8176/public/frames-0.png

It seems to all be dynamic and I’ve even deleted and emptied the trash of the old 7.5 install but still runs through the images from the day before the update to 2021.1.