Dynamic Refreshing Image URL

Posted on
Mon Dec 30, 2019 10:41 am
mundmc offline
User avatar
Posts: 1060
Joined: Sep 14, 2012

Re: Dynamic Refreshing Image URL

Huzzah!

Posted on
Mon May 25, 2020 8:24 am
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

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.

Posted on
Mon May 25, 2020 11:56 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

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.)?

Image

Posted on
Mon May 25, 2020 12:53 pm
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

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.

Posted on
Mon May 25, 2020 4:51 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Dynamic Refreshing Image URL

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.

Image

Posted on
Tue May 26, 2020 4:11 am
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

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

Posted on
Tue May 26, 2020 4:03 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

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)...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed May 27, 2020 1:52 am
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

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 ??

Posted on
Wed May 27, 2020 1:55 am
pocster offline
User avatar
Posts: 276
Joined: Nov 15, 2014

Re: Dynamic Refreshing Image URL

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 )

Posted on
Wed May 27, 2020 1:23 pm
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Dynamic Refreshing Image URL

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Jul 26, 2020 11:12 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Dynamic Refreshing Image URL

See if taking off width and height works.

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

Posted on
Tue Aug 18, 2020 11:14 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Dynamic Refreshing Image URL

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.

Bill
My Plugin: My People

Posted on
Thu Aug 20, 2020 10:36 am
Different Computers offline
User avatar
Posts: 2541
Joined: Jan 02, 2016
Location: East Coast

Re: Dynamic Refreshing Image URL

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.

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
Thu Aug 20, 2020 10:42 am
jroach offline
Posts: 254
Joined: Oct 29, 2010

Re: Dynamic Refreshing Image URL

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.

Posted on
Thu Aug 20, 2020 10:58 am
jroach offline
Posts: 254
Joined: Oct 29, 2010

Re: Dynamic Refreshing Image URL

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?
Attachments
Screen Shot 2020-08-20 at 9.53.43 AM.png
Screen Shot 2020-08-20 at 9.53.43 AM.png (33.18 KiB) Viewed 7929 times

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

Who is online

Users browsing this forum: No registered users and 15 guests