Page 6 of 9

Re: Dynamic Refreshing Image URL

PostPosted: Mon Dec 30, 2019 10:41 am
by mundmc
Huzzah!

Re: Dynamic Refreshing Image URL

PostPosted: Mon May 25, 2020 8:24 am
by pocster
It's an old Bump but...

Somethings changed as this now fails.

Error (client) control page image URL failed to load: http://USER:PASSWORD@localhost:8176/var ... RA_CURRENT
Error (client) The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

Re: Dynamic Refreshing Image URL

PostPosted: Mon May 25, 2020 11:56 am
by matt (support)
What is the value of the Indigo Variable CAMERA_CURRENT?

When do you get this error? Where are you accessing the Control Page from (control page editor in Indigo macOS client, Safari on your Mac, Indigo Touch on iOS, etc.)?

Re: Dynamic Refreshing Image URL

PostPosted: Mon May 25, 2020 12:53 pm
by pocster
Hey Matt

This use to work just fine. Haven't used it for a while so indigo/OS have undoubtedly been updated.
Tried all the variations I could think of for:

CURRENT_CAM is being assigned this.
"http://ss_username:ss_password@192.168.0.4:8000/++image?cameraNum=1&width=320&height=240"

The error occurs when that variable is attempted to be placed in the refreshing URL code of a control page:

"http://localhost:8176/variable_url_redirect/redirect?name=CURRENT_CAM"

I'm guessing (hoping) there's a newer better way to achieve this.

Re: Dynamic Refreshing Image URL

PostPosted: Mon May 25, 2020 4:51 pm
by matt (support)
Duplicate the Control Page then change the URL to be the current value (http://ss_username:ss_password@192.168. ... height=240), then test that duplicate Control Page. Does that give an error? That is, I'm wondering if the problem is specific to using variable_url_redirect.

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 26, 2020 4:11 am
by pocster
Hi Matt

"http://SS_USER:SS_PASS@127.0.0.1:8000/++image?cameraNum=1&width=480&height=480"

Works perfectly. So the problem would appear with the variable_url_redirect

Cheers

Re: Dynamic Refreshing Image URL

PostPosted: Tue May 26, 2020 4:03 pm
by jay (support)
That's really odd that it ever worked: the variable_url_redirect plugin doesn't support authentication before the hostname (as mentioned in the very first post on this topic)...

Re: Dynamic Refreshing Image URL

PostPosted: Wed May 27, 2020 1:52 am
by pocster
jay (support) wrote:
That's really odd that it ever worked: the variable_url_redirect plugin doesn't support authentication before the hostname (as mentioned in the very first post on this topic)...
Hey

So there’s no way of having a variable with authentication in it and using variable_url_redirect ? . The original post was about cycling ip camera images . So it can’t be done ??

Re: Dynamic Refreshing Image URL

PostPosted: Wed May 27, 2020 1:55 am
by pocster
matt (support) wrote:
Instead of having SS upload an image, I'd suggest just directly accessing SS's built-in Web server. An example URL that you would stuff into the variable value would look like:

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

(assuming you have authentication enabled on SS you can pass in the username/password as shown above)
This isn’t possible then as a variable ????? ( though it did work )

Re: Dynamic Refreshing Image URL

PostPosted: Wed May 27, 2020 1:23 pm
by jay (support)
pocster wrote:
The original post was about cycling ip camera images . So it can’t be done ??


Well, no, the original post was about the IWS plugin that would load an image from a URL in a variable...

pocster wrote:
matt (support) wrote:
Instead of having SS upload an image, I'd suggest just directly accessing SS's built-in Web server. An example URL that you would stuff into the variable value would look like:

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

(assuming you have authentication enabled on SS you can pass in the username/password as shown above)
This isn’t possible then as a variable ????? ( though it did work )


That particular post wasn't referring to using the plugin, but rather a direct reply about using SecuritySpy since that's what your post that directly preceded it was about.

You can have a separate solution which saves off the SS image to a location, then use the refreshing image URL page element to periodically reload the image. But that has nothing to do with this IWS plugin.

Re: Dynamic Refreshing Image URL

PostPosted: Sun Jul 26, 2020 11:12 am
by hamw
See if taking off width and height works.

http://ss_username:ss_password@192.168. ... ameraNum=1

Re: Dynamic Refreshing Image URL

PostPosted: Tue Aug 18, 2020 11:14 am
by whmoorejr
Different use I thought I'd share and ask a trigger question....

I'm working this in as a way to put a NOAA weather icon on a control page... why do it this way? On some pages I want a really small icon. On some pages I want a really big weather icon. This lets me resize the icon for a control page without re-editing the 281 weather .png files.

Where I'm stuck is finding a good action that will trigger my script. I didn't find any weather triggers, so right now I'm triggering off anytime outside temp changes.

So I put a copy of all my NOAA images into a folder "NOAA256" in the IWS Public folder.

First action is to insert the NOAAplus device state "icon" into a variable. Then after a brief delay (2 seconds), it runs the following embedded python:
Code: Select all
NOAAicon = indigo.variables[1596524366].value

MyLink = '%s%s%s' % ("MyReflector.indigodomo.net/public/NOAA256/NOAA%20256%2B", NOAAicon, ".png")

indigo.variable.updateValue(1373139711, value=MyLink)


An now I have a re-sizeable weather icon for control pages.

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 10:36 am
by Different Computers
All right, I fully confess this is a problem of my own making. Still, I need some help to understand what this log is saying to fix it.

I'm experimenting with SecuritySpy and tried to pull images from it into some control pages using DRIUs.

My CurrentCam variable successfully opens an image if I paste it into a browser.

I can change CurrentCam away from one of the experimental SecuritySpy URLs to one that's known good.

I've restarted Indigo, even.

But still, my log is just a continuous stream of
Code: Select all
WebServer                       http://localhost:8176/variable_url_redirect/redirect?name=CurrentCam load error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>


I don't understand what's happening here. I get that something, somewhere, seems to be asking for an image that the Indigo Web Server can't get because there's some certificate problem, but when I've manually set CurrentCam to something different and known good, when I've restarted Indigo, and I still get it, well, like I said, I'm not understanding part of what's going on.

I understand that I might have tried to get DRIU to do something it can't, but I don't understand why I can't stop this error.

Can someone provide insight? I'm not even talking about the images displaying properly. I just want to get rid of the error.

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 10:42 am
by jroach
DC,
Similar issue but maybe unrelated to your issue. I have noticed that while my control page shows the update I've made that sometimes I go back to edit and the changes weren't saved. I had this happen to me twice, make changes, verify changes...go to browser view and fails, pull the event log for detail but the the error doesn't match what I've entered into control pages...cycle the HW and sometimes it fixes the issue. Still trying to narrow down the issue to see if it's me or something else going on.

Re: Dynamic Refreshing Image URL

PostPosted: Thu Aug 20, 2020 10:58 am
by jroach
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?