Possible to display frequently updated animated weather radar image in Titan? - oldtvwatcher - 2015-12-28
I would like to be able to display an animated gif image in Titan that is frequently refreshed. To give you an example:
http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirFL_.gif
Please don't bother to mention the maps in OpenWeatherMap addon, first of all they suck (not enough detail or contrast, in fact they are about the most useless weather maps I have ever seen) and second of all if I let it download maps then often I cannot quit Kodi properly.
I can think of a few ways that such an image could be displayed:
1) In a submenu under Weather - in the dropdown there would be an option for Local Weather Map and if you selected it, it would immediately grab the image from the server and display it. The advantage would be that it would only grab the image when you actually want to see it.
2) Put it in the weather tile in the main window display. But that would require resizing, and periodic refreshing while Kodi is running.
3) Put it on the main screen next to the temperature, and on other screens where the temperature is displayed in that manner. Also would require resizing, and periodic refreshing while Kodi is running.
4) If none of the above are possible then as a separate main menu item, or failing that as a picture in the pictures section, although I have no idea how you could use dynamic content from a web address as a picture.
I THINK these maps are normally refreshed about every 15 minutes but I don't know that. At this point I'm not asking for anything new, I would just like to know if any of these are possible now (I'm assuming my #2 and #3 are not), and if so how you would set it up. Thank you.
RE: Possible to display frequently updated animated weather radar image in Titan? - User 224999 - 2015-12-28By default it won't be possible because of the simple fact that Kodi will cache all images. So, you will be able to load that picture into Kodi but then it will just show the same image all the time untill the cache is cleared.
I *think* but others can correct me if I'm wrong that the only solution would be to create a small addon that will pull the latest map from the internet and show it.
You might want to ask this question on the general Kodi forums because there might already be someone who created this.
If there is nothing available I can write you something for this, should be an easy fix.
RE: Possible to display frequently updated animated weather radar image in Titan? - oldtvwatcher - 2015-12-28Okay, I posted in the addons section, will see if I get any response there. Thanks!
RE: Possible to display frequently updated animated weather radar image in Titan? - Martijn - 2015-12-28(2015-12-28, 22:22)marcelveldt Wrote: By default it won't be possible because of the simple fact that Kodi will cache all images. So, you will be able to load that picture into Kodi but then it will just show the same image all the time untill the cache is cleared.I *think* but others can correct me if I'm wrong that the only solution would be to create a small addon that will pull the latest map from the internet and show it.
You might want to ask this question on the general Kodi forums because there might already be someone who created this.
If there is nothing available I can write you something for this, should be an easy fix.
wrong. well partially
http://mirrors.kodi.tv/docs/python-docs/15.x-isengard/xbmcgui.html#ControlImage-setImage
RE: Possible to display frequently updated animated weather radar image in Titan? - User 224999 - 2015-12-28(2015-12-28, 22:48)Martijn Wrote: wrong. well partiallyhttp://mirrors.kodi.tv/docs/python-docs/15.x-isengard/xbmcgui.html#ControlImage-setImage
hehe, thanks Martijn ;-)
@xbmclinuxuser
So, Kodi scripts can choose to override the Kodi cache.
Good news because that will make things easier. Again, a custom addon/script is needed for this to work so let's hope you get a response from someone who already created it. If not, I can add this to the skinhelper addon or a small custom script for you.
Just FYI I have received two replies already but neither of them answered the question of whether there are any existing addons that do this. I suspect they were responding to your statement that Kodi will cache all images, but I don't know - I am not a programmer and I have no idea what I'm looking at. "Martijn" posted a link to http://mirrors.kodi.tv/docs/python-docs/15.x-isengard/xbmcgui.html#ControlImage-setImage and "spoyser" posted:
(2015-12-28, 22:47)spoyser Wrote:I really have no idea what any of that means, do you?Code:
setImage(filename, useCache=False)
Think the useCache parameter was added in Gotham
Edit: I had the cached page still up in my browser and didn't see that Martijn had already posted here. Oops!
Edit (another one): Then "ronie" added this:
(2015-12-29, 00:16)ronie Wrote: it's indeed quite annoying kodi is caching images this way.RE: Possible to display frequently updated animated weather radar image in Titan? - oldtvwatcher - 2015-12-30weather addons pass the image url to the skins as a window property,
so using setImage(filename, useCache=False) doesn't apply here.the only alternative is to first download the image and then pass the local path of the image to the skin.
(2015-12-28, 22:22)marcelveldt Wrote: If there is nothing available I can write you something for this, should be an easy fix.
Thanks. So far I've not had any replies suggesting anything else so if you'd care to take a shot at it, I'd much appreciate it, assuming it's possible.RE: Possible to display frequently updated animated weather radar image in Titan? - User 224999 - 2016-01-01
I can add something into the skinhelper script to grab the latest weather radar image map for the location setup in Kodi.
Where did you find out the location of the images ? I need to know what URL I need to grab for each weather location.
As far as I can tell there is a separate one (or more) for each U.S. state. The general URL format is:
http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasir###.gif
Where ### is replaced by the two letter state code followed by an underscore in most cases, for example
New York: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirNY_.gif
But in at least a couple of states (the largest ones in the continental US) the underscore is replaced by an additional directional designator:
Northern California: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasircan.gif
Central California: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasircac.gif
Southern California: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasircas.gif
Eastern Texas: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirTXe.gif
Western Texas: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirTXw.gif
Southern Texas: http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirTXs.gif
Not all of them follow this general rule, for example:
Alaska: http://sirocco.accuweather.com/nx_mosaic_640x480c/re/inmareak_.gif
Hawaii: http://sirocco.accuweather.com/nx_mosaic_640x480c/re/inmarehi_.gif
There is a national USA map at
http://sirocco.accuweather.com/nx_mosaic_640x480_public/sir/inmasirus_.gif
The way to find the link for any location is to go to http://www.accuweather.com/, type the city and state in the search box, and click GO. Then click the button that says "Satellite" (a little below the search box). Ignore the image that comes up and scroll down and click on "Classic Radar" (under the image). This will bring up a static map, now click "Play" above the image to get the animated version. Now you might think you can just right click on the image and copy the image link but that won't work. What you need to do now is view the page source and search for the string 640x480 on the page, you will then see a link to http://sirocco.accuweather.com/ + something and that is the one you want.
This only seems to work for US States. I tried it for Puerto Rico (a US territory) and Toronto, Ontario, Canada and it did not work because no "Classic Radar" is available for those locations. There MAY be other places that such maps could be obtained (such as Environment Canada for Canadians) but I don't know about those.
RE: Possible to display frequently updated animated weather radar image in Titan? - oldtvwatcher - 2016-01-02Another, perhaps simpler possibility would be to use Intellicast maps. The general format for those is:
http://images.intellicast.com/WxImages/RadarLoop/###_None_anim.gif
Where ### is a location code. The national radar is at:
http://images.intellicast.com/WxImages/RadarLoop/usa_None_anim.gif
The three letter location codes for the areas covered are:
"lit" = AR - Little Rock
"prc" = AZ - Prescott
"bfl" = CA - Bakersfield
"den" = CO - Denver
"hfd" = CT - Hartford
"eyw" = FL - Key West
"pie" = FL - Saint Petersburg
"csg" = GA - Columbus
"dsm" = IA - Des Moines
"myl" = ID - McCall
"spi" = IL - Springfield
"sln" = KS - Salina
"bwg" = KY - Bowling Green
"msy" = LA - New Orleans
"cad" = MI - Cadillac
"stc" = MN - Saint Cloud
"jef" = MO - Jefferson City
"tvr" = MS - Vicksburg
"lwt" = MT - Lewistown
"clt" = NC - Charlotte
"bis" = ND - Bismarck
"lbf" = NE - North Platte
"bml" = NH - Berlin
"row" = NM - Roswell
"rno" = NV - Reno
"bgm" = NY - Binghamton
"day" = OH - Dayton
"law" = OK - Lawton
"rdm" = OR - Redmond
"pir" = SD - Pierre
"bro" = TX - Brownsville
"sat" = TX - San Antonio
"pvu" = UT - Provo
"fcx" = VA - Roanoke
"shd" = VA - Staunton
"tiw" = WA - Tacoma
"riw" = WY - Riverton
So for example,
http://images.intellicast.com/WxImages/RadarLoop/tiw_None_anim.gif
Is Tacoma, Washington, which also shows parts of Oregon and Idaho.
Note that most of these radars include parts of multiple states.
Unfortunately their maps only seem to cover the continental US and near-border areas of Canada and Mexico.
RE: Possible to display frequently updated animated weather radar image in Titan? - ronie - 2016-01-02to save you some time getting it to work, please be aware that it's currently *not* possible to display animated gif weather maps in kodi.
Ace is looking into the issue, so you might want to keep an eye on: https://github.com/xbmc/xbmc/pull/8731
i have no idea if/when it will be fixed and whether or not it will make it into kodi jarvis.
in case the devs can get it fixed, i will add support for animated weathermaps in the wunderground weather addon.
they provide decent maps and are available for every location. example: https://github.com/xbmc/xbmc/pull/8188#issuecomment-167374459
Thanks for the info Ronie. Saves me some time trying to get it to work.
I guess the best is to wait for your animated weathermaps in the wunderground addon.
Since it's been nine months since I last asked about this, and since the Krypton beta is out now, I just wondered if this situation has changed at all, and if there's any possibility of adding this now?
RE: Possible to display frequently updated animated weather radar image in Titan? - User 224999 - 2016-09-03I'll look into it. Might be added to the weather underground addon in the meanwhile as Ronie stated