WURadar.png blank

Posted on
Sun Oct 08, 2017 7:42 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

WURadar.png blank

I'd upload it, but I'm getting a " Image file type mismatch: expected extension gif but extension png given." error here on the forum. Which is odd, since as far as I know it's png all the way and opens fine on my Mac.

I've put in my zip code as listed for one of the location options, but the downloaded file is blank, with just the WU icon in the bottom right.

Turning on logging says
Code: Select all
Getting weather data for location: 12345
   WUnderground Debug              [Bloomsky Forecast download: 00.278615 seconds]
   WUnderground Debug              Adding weather data for 12345 to Master Weather Dictionary.
   WUnderground Debug                382 callsLeft = (500 - 118)
   WUnderground Debug              Parse weather data for device: cheesy weather gif downloader
   WUnderground Debug              Parse weather data for device: Current Conditions
   WUnderground Debug                Location already in master weather dictionary.
   WUnderground Debug              Fixed corrupted data. Returning: -99.0, --
   WUnderground Debug              Fixed corrupted data. Returning: -99.0, --
   WUnderground Debug              Can not format uiTemperature. This is likely normal.
   WUnderground Debug              Fixed corrupted data. Returning: -99.0, --
   WUnderground Debug              Can not format uiTemperature. This is likely normal.

and some other stuff that seems unrelated.

This has been happening for quite a while, and frankly I just remembered I had this configured while looking at something else weather related.

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
Sun Oct 08, 2017 8:23 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

I think what's happening is that the image file is being served to you as a GIF but you're saving it as a PNG. Indigo and the plugin should be able to handle this no problem (and I can confirm that it's working for me.) The forum is clearly identifying the file as a GIF file and says that the extension is wrong which is likely correct. I can't upload my radar image to the forums with the PNG extension, but when I switch it to GIF, it uploads no problem.

The issue of the blank radar image is likely on WU's side (I've seen this happen in the past). You might try entering another location to see if that will work. You might also try setting up a WUnderground Radar device and see if that works for you (I am assuming that you're using the Radar Image Downloader device type. I don't think I've made any changes to that part of the code in a long time, so I suspect it's something external to the plugin.

If you're still having trouble, please let me know.

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

[My Plugins] - [My Forums]

Posted on
Sun Oct 08, 2017 9:04 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: WURadar.png blank

DaveL17 wrote:
You might also try setting up a WUnderground Radar device


That's what's having the problem. Looks like by naming the image file just "WUradar" the OS assigns .png to it, even though the file is a gif. But having named it WUradar.gif, in the static directory I see it is now named "WUradar.gif.png"

I don't see any options for setting the file type. When I turn off the option for it to be animated, there's no change to the blank file generated.

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
Sun Oct 08, 2017 9:08 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: WURadar.png blank

Deleted the radar device and added a new one. Still blank, mostly. I manually changed the .png to .gif to get it to upload here.

Do I need to pick a Zip code that has a radar station in it?
Attachments
WUradar.gif
WUradar.gif (2.38 KiB) Viewed 4501 times

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
Sun Oct 08, 2017 2:42 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

PM me the URL that you're trying to use and I'll take a look.

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

[My Plugins] - [My Forums]

Posted on
Sun Oct 08, 2017 3:19 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: WURadar.png blank

URL??? I don't see anywhere in the Radar device to specify a URL.
Attachments
wu.png
wu.png (329.81 KiB) Viewed 4459 times

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
Sun Oct 08, 2017 5:49 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

Sorry, I presumed that you were using the Image Downloader device, but you aren't. The image you posted is enough for me to go on. I believe that it's a problem with the WUnderground API. I will dig deeper when I have a chance, but in the interim you might try the bounding box location type. I can confirm that (for my location) a ZIP code doesn't work right now but a bounding box does.

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 5:16 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

Turns out there was more than one thing going on here which made isolating the issue a little tricky. There was a small bug in my code for devices that use location (as opposed to bounding box or radius types) which I have now fixed. A new version of the plugin is available via Github (link in my signature below).

However, there is also a bug in the WUnderground API that's used to generate the images. I have found through testing that using a ZIP code, location name, or 'autoip' will work, but does not work all of the time and the resulting image is inconsistent. I have no way of controlling for this. If you want more consistent behavior (at least until WU fix their side), I suggest using bounding box or radius image types.

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 8:23 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: WURadar.png blank

Thanks very much for looking in to this.

I'll try again with the bounding box, but my past attempts at it failed, perhaps because while I know my lat/lon, I don't know what are reasonable values to enter.

Just tried the bounding box and instead of a blank white box, I now get a muddy green box.

Edit: Ok, I pulled reasonable values from https://www.mapsofworld.com/usa/states/ ... ng-map.jpg and now I get a file that Preview can't open.

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 Oct 09, 2017 10:08 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

Try the radius location setting and see if that works for you. The control can pull the lat/long from your Indigo server so all you need to set is the radius (or you could leave it at the default setting). Please let me know if that works for you.

I can confirm that my location, bounding box and radius settings are all working in my area, so this may still be a WUnderground API gremlin. Or I might just be lucky. :)

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:32 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: WURadar.png blank

Many thanks. I had some memory of having tried the radius some months ago and not getting any good results, but with a bit of tweaking (probably due to where my ISP thinks I am) I got a radius map displaying properly.

Awesome plugin! Thanks very much.

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 Oct 09, 2017 11:34 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: WURadar.png blank

Glad to hear it's working for you. Let me know if you have any other questions.


Sent from my iPhone using Tapatalk

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

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest