Dynamic Refreshing Image URL

Posted on
Tue Mar 06, 2018 11:15 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Dynamic Refreshing Image URL

matt (support) wrote:
Yeah, the variable redirect doesn't support authentication currently.

You could also write the URL to fire something else that does allow authentication via the URL, such as a PHP file served on the same mac with Apache or something. This is making a little issue highly complicated but it can be done if you think outside the box.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Tue Mar 06, 2018 7:27 pm
jrickmd offline
Posts: 109
Joined: Jun 01, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

Thanks for the response, guys. Don't think the image in front of another will solve my ultimate issue, which is having a log file filled with 404 error messages when a camera is not connected... WiFi cameras are NOT my friends. Trying to find ways to wire all my cameras is my next solution...

Thanks again,

Rick

Posted on
Sun Apr 29, 2018 7:48 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

So here's a new one.

Using basic auth on a new camera. This URL works fine in a browser:

http://user:pwd@192.168.0.999/cgi-bin/currentpic.cgi

It gives me a snapshot and nothing else, which is just what we want.

But when I try to make it a variable for a DRI URL, I get this error:

Code: Select all
http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: nonnumeric port: 'pwd@192.168.0.999'


EDIT: I tried this on another computer, and I'm presented with a login window instead of the image when I use Safari. So it seems this URL scheme is not correct.

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
Mon Apr 30, 2018 9:43 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

That IP address is invalid (999 as the last part isn't valid)... :wink:

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 30, 2018 10:07 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

well yeah.

I do that for the same reason I put the username as USER and the password as PWD. No reason to show anyone what my LAN is like.

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
Mon Apr 30, 2018 10:48 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Um, ok.

I have no idea where that error is coming from then.

[EDIT] - yes I do (I think): viewtopic.php?p=145341#p145341

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 30, 2018 12:29 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Yeah, I think that's the problem.

Just thought I'd mention that authentication does work if it comes after the host in the dynamic URL. I can pull from foscam cameras with http://192.168.0.999:88/cgi-bin/CGIProx ... apPicture2
but http://user:pwd@192.168.0.999/cgi-bin/currentpic.cgi does not work.

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
Mon Apr 30, 2018 12:48 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Right - if the authentication isn't HTTP-based auth (basic or digest which goes before the hostname) then it should work fine since the plugin just passes the GET data along.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 9:10 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

I'm fiddling about with the first locally saved image in the IWS/public folder, and wondering what the URL I should specify is. While https://myindigoname.indigodomo.net/etcEtc/whatev.jpg works, if I understand the way the reflector works, that's making a BIG trip outside my LAN to get the image. Seeing as I have only 0.8 Mbps upload speed, this has the chance of slowing down things a lot.

Can I specify http://localhost? http://192.168.(indigo server IP)? What's best practice?

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 May 01, 2018 10:03 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Are you talking about the IWS plugin that will serve up an image from a URL specified in a variable, or are you talking about the unprotected public directory that IWS serves up (yes, I just added that post after realizing that we never documented it beyond the README.txt file we put in that directory :oops: )? Those are two different things.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 10:43 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Some of both actually. I’m using the IWS plug-in to specify file in the public folder.

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 May 01, 2018 11:16 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

So, did that post answer your question? If not, can you rephrase?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 11:38 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

I think it does answer my question. I'll experiment and see.

Thing is I can access dynamic URLs that are on my LAN and not routed to the WAN if they're in a control page. So I would expect that a dynamic URL that is set to http://INDIGOSERVERIP/public/README.txt should work too.

But it doesn't.

I get
Code: Select all
 WebServer                       http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: <urlopen error [Errno 61] Connection refused>


So I'm missing some understanding of how this all goes together. Because I have Dynamic URL variable values that are straight out of a camera that CANNOT reach the internet, and they work.

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 May 01, 2018 1:46 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

Sorry, I'm still not sure where you're going with this. This plugin does a simple HTTP redirect. So, when you hit the plugin's URL:

Code: Select all
http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam


(for which you must specify authentication creds assuming you have auth turned on for IWS), it gets the URL from the specified variable and does a standard HTTP Redirect.

I'm unclear what this means:

Different Computers wrote:
Thing is I can access dynamic URLs that are on my LAN and not routed to the WAN if they're in a control page. So I would expect that a dynamic URL that is set to http://INDIGOSERVERIP/public/README.txt should work too.


Since README.txt isn't an image. I also don't know what this means:

Different Computers wrote:
So I'm missing some understanding of how this all goes together. Because I have Dynamic URL variable values that are straight out of a camera that CANNOT reach the internet, and they work.


without more clear explanation.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue May 01, 2018 1:54 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

Maybe I'm not understanding what you're asking. So here are two examples. Remember that every single one of my cameras is blocked at the router from reaching the internet.

When the variable for the dynamic URL is set to http://192.168.0.999/tmpfs/auto.jpg?usr=USER&pwd=PWD the DRI URL plugin works, and the image is displayed in a Control Page as it should.

When the variable for the dynamic URL is set to http://INDIGOSERVERLANIP/public/whatev.jpg I get the error
Code: Select all
 WebServer                       http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: <urlopen error [Errno 61] Connection refused>


I note that both of these image URLs are internal LAN addresses, but one of them can be displayed in a control page viewed from the internet via the reflector, and the other cannot. And I don't understand the reason why or if there's a workaround.

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.

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

Who is online

Users browsing this forum: No registered users and 13 guests