Question on animated Radar image and request for upgrade

Posted on
Mon Oct 09, 2017 6:51 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Question on animated Radar image and request for upgrade

Hi, Dave, I decided to give the WUnderground radar image a shot today - it is working fine. When I configure it for animated I can only get it to work on the browser preview not on a control page on my IPAD.

Is this a limitation of the IPAD SW or should it be working. I read the docs and no mention of animation not working (that I could find). And there is not any examples for radar (or sat) setup and usage on your" how to's" post. If you get a second pies let me know. O - I almost forgot - in the animation setting one value (the 50) has asterisk next to it but I could find no mention of its significance / meaning referenced anywhere?

For my update request / suggestion - since I'm limited to 500 API calls would it be possible to add in a dead time period. A starting time and ending time that specifies a period that no calls are made. For me, that would be the time I'm sleeping and not seeing any information anyway. This would allow me to get updates more often when I'm using the information during the day.

If someone did not want to block they could just leave the fields empty (or the function disabled)

Thanks again for a great plug-in

_______
Norm

Posted on
Mon Oct 09, 2017 7:19 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Hi Norm - thanks for giving the WURadar device a try.

When I configure it for animated I can only get it to work on the browser preview not on a control page on my IPAD.

Is this a limitation of the IPAD SW or should it be working. I read the docs and no mention of animation not working (that I could find).

I suspect that you're speaking of using Indigo Touch on the iPad. As far as I recall, IT2 doesn't support animated image display on control pages within the app. You can confirm this by opening the control page in Safari on your iPad. I just did this on my iPhone and the behavior is as I'd suspect. Please let me know if that's not the case for you.

And there is not any examples for radar (or sat) setup and usage on your" how to's" post. If you get a second pies let me know. O - I almost forgot - in the animation setting one value (the 50) has asterisk next to it but I could find no mention of its significance / meaning referenced anywhere?

There is always room for improvement where the documentation is concerned. :) I will add that to my to-do list. But moreover, if I've done things correctly, you shouldn't need a how-to to get the device set up. If you hover over a field with your cursor, you should see a help bubble with information on that particular setting.

Within all of my plugins, it's my intention to signify the default setting for a control with an asterisk. In other words, this is the "out of the tin" setting.

For my update request / suggestion - since I'm limited to 500 API calls would it be possible to add in a dead time period. A starting time and ending time that specifies a period that no calls are made. For me, that would be the time I'm sleeping and not seeing any information anyway. This would allow me to get updates more often when I'm using the information during the day. If someone did not want to block they could just leave the fields empty (or the function disabled)

This is a super idea and I'll add it to the list of future enhancements. I agree that there's not necessarily a reason to update the data in the middle of the night when no one is watching. For my setup, I do capture certain weather data for charts -- and want 24 hour coverage -- but I can easily see why not everyone would need that. Your suggestion is a great way to preserve API calls.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Oct 09, 2017 7:54 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

Yes, I was talking about Indigo touch - I just wanted to make sure you were not doing something like swapping the image animation frames and fooling touch to display want appears to be an animation but is just a bunch of static images in rotation - I not sure that would work -- but just wanted to check because the animations are about a million times cooler than a single static image.

Now that I have had some time to look at it it does not seem to work with Indigo touch at all - I'm selecting a static image - it shows up once but it never gets updated - I think Indigo touch will not update images unless I manually flush the queue. If I reopen the web view it shows the updated image and if I flush the queue on touch it pulls in the newer image - O well....

_______
Norm

Posted on
Mon Oct 09, 2017 10:05 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Here's my complete logic in how this device works.

  • Weather Underground serves either GIF or SWF. I hard coded GIF. The image is saved as a single file (GIF file with a PNG extension).
  • I save the image with a PNG extension so that it appears in the control page designer as a static image in the drop down list. As far as I can tell, GIFs will not appear in the list for this control. My understanding is that Indigo Touch won't display a new image because the name (state) of the image didn't change. In my experience, control pages displayed directly in Safari will refresh when the page is refreshed (and with animation).
  • The alternative would be to ask the user to input a refreshing image URL into the control page designer which, while not terribly difficult, requires more manual configuration. You can of course still do this if you choose to.
I had to make compromises and I chose my method because--regardless of the method used--Indigo Touch won't display the animated image and Safari will. I went with what seemed the easiest for the user. My logic could be faulty so if there is a way to make this more functional without increasing user burden, I'm happy to take a look at that.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Oct 09, 2017 11:54 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

Thanks Dave - If I'm understanding you - I can use the refreshing URL feature to make this work on my IPAD with touch.

I'm not sure of the best way to do this - I logged on to the actual MAC running indigo, I right clicked on the file WUradar.png image and selected open with Safari - copied the address and tried plugging that into the URL spot inside the control page designer. See below

file:///Library/Application%20Support/Perceptive%20Automation/Indigo%207/IndigoWebServer/images/controls/static/WUradar.png

When I hit save, I see this in the log - Am I understanding you correctly? - Should I post about this in a different section of the forum?

Code: Select all
Error (client)                  control page image URL failed to load: file:///Library/Application%20Support/Perceptive%20Automation/Indigo%207/IndigoWebServer/images/controls/static/WUradar.png

_______
Norm

Posted on
Mon Oct 09, 2017 2:47 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

When I load a control page editor with the following path information:
Code: Select all
file:///Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/images/controls/static/WUradar.gif

I get the following message in the Indigo event log:
Code: Select all
Error (client)                  control page image URL invalid: file:///Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/images/controls/static/WUradar.gif
But the page loads and the image displays as I would expect it to. I'm not exactly sure what the log message is regarding.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Oct 09, 2017 4:52 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

Thx, Dave, I'll mess with this more tomorrow - maybe it worked for me - not sure - once I saw the error I did not futz with it too much more - I just assumed it was not working...

_______
Norm

Posted on
Tue Oct 10, 2017 1:04 am
mclass offline
Posts: 312
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Question on animated Radar image and request for upgrade

Pardon me "dipping my oar" but I too am wrestling with this!

Have tried the suggested alternatives, and whilst I can get animation in browser previews, I have not been successful in getting an animation to display on Indigo Touch
I watch with interest ..



Sent from my iPhone using Tapatalk

Posted on
Tue Oct 10, 2017 3:50 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Apologies if my previous replies were unclear. I'm afraid I don't know of a way to get animated images to display in Indigo Touch.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Oct 10, 2017 5:32 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

Hi, Dave, I just wanted to check back in with you and let you know it is working fine now. I think I had a problem because of the way I was modifying the control page (long story). I do want to understand (or confirm) you specified a .gif when you used the refreshing URL function. Is that because you are saving (or checked) the animated image feature (so you save as a .gif). I don't have that enabled so I end up with a .png file and I must specify a .png when I fill in the URL.

Only asking because I don't get any error when I use.png and it works fine. I do see the error in the log when I try to use .gif (but I also don't get the display). Wondering if your error was a result of pointing to a .gif and I did not get the error when I point to a .png. Is this just a strange artifact of Indigo touch?

One last quick question, yesterday at ~4 AM I had 51 API calls - today with the Radar device (at about the same time, 4 AM) I had over 200. I also noticed it looks like I must have reached my limit yesterday about 9 PM since that was the last time stamp on the radar image. The only difference was the radar device. So wondering if I need to count an API hit times the number of Underground devices times the time I have specified in the configuration dialog or if something else is driving up my API calls - the math does not work to account for the difference so trying to understand how I should imagine it works to keep me under my call limit.

Thanks again for the plug-in and help...

_______
Norm

Posted on
Tue Oct 10, 2017 5:42 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Hi Norm - regarding the GIF vs. PNG question, I'll need to delve a bit deeper. Thanks for providing details on what you've seen -- it will help me home in on the spots to look. Regarding the number of API calls, I'll have to look at the code, because it shouldn't cause that large of a difference. But something to bear in mind:

  • For weather devices, I track the location information used in an attempt to minimize API calls. In other words, if you have a Weather device and a 10-Day Forecast device with the same location information, that will use only one API call. If you have a city name for one and 'autoip' for another, it will count as two API calls--even if the data is returned for the same location. Does that make sense?
  • The Radar device uses an entirely different API and will count as a separate API call regardless of other data already downloaded for a single refresh cycle.
I'll let you know what I find.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Oct 10, 2017 6:00 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

OK, thx, Dave.

One other bit of info (that is making my head hurt) - about an hour ago when I checked my API calls it was over 200 (like I mentioned) - after reading your most recent reply I figured I would do a quick check since it has been about an hour.

When I looked at the count it was 2. That count was not what I was expecting to see. I'm not sure when my API counter is reset by Weather Underground but in any case it does not add up. I plan to check the count as the day progresses to get some sense of what is happening - maybe yesterday at 4AM my coffee had not kicked in or I'm not remembering it correctly (I did not write it down).

Thanks for the info on how you handle the API calls - right now I should be making 2 calls every 15 min (with my current configuration and device setup) - I'll contrast and compare that to the count(s) today and let you know if I gleam anything over the observation period.

_______
Norm

Posted on
Tue Oct 10, 2017 6:11 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Thanks Norm. I don't know if WU says when the count is reset (I have a call in to tech support on that) but I had always presumed that it was 00:00 their time.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Oct 10, 2017 8:15 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Question on animated Radar image and request for upgrade

It looks like the plug-in is not updating even though it should be. I have logging on - here is a bit of the log after I hit refresh all data (manually). Before I did the manual refresh I had 2 API calls (and it had not pulled in new data for several hours). After the manual refresh it had 4 calls (as expected).

Not sure what to do except a plug-in reload - devices show green but for some reason it does not (has not) updated.

WUnderground Debug refreshWeatherData() method called.
WUnderground Debug callDay() method called.
WUnderground Debug callDay: 2017-10-10
WUnderground Debug dailyCallLimitReached: False
WUnderground Debug Is todays_date: 2017-10-10 greater than dailyCallDay: 2017-10-10?
WUnderground Debug Today is not a new day.
WUnderground Debug The daily call limit has not been reached.
WUnderground Debug Parse weather data for device: Radar
WUnderground Debug getSatelliteImage() method called.
WUnderground Debug callCount() method called.
WUnderground Debug 498 callsLeft = (500 - 2)

_______
Norm

Posted on
Tue Oct 10, 2017 10:52 am
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Question on animated Radar image and request for upgrade

Please do restart the plugin and see if that solves your issue. I checked on my production server and it's been running fine (at least since rebooted 3 days ago for a Drobo update). I fired up my development version and that is updating fine, too. I'd like to help you with your issue but I can't reproduce it here.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 2 guests

cron