What are planed changes regarding Weather
#1
Devs,

what is the plan / what skinning changes are planned regarding Weather.

Is weather going to become one of the program add-ons or?
My skins:

Amber
Quartz

Reply
#2
see dev forums. and no, weather always had, and still has, a separate extension point. a skinner won't be able to tell the difference.
Reply
#3
I had but I guess I'm not smart enough Smile

So we skin it like we used to?
My skins:

Amber
Quartz

Reply
#4
Nothing to see, move along.
Reply
#5
yes, all that changes is how the info is fetched. you're just presenting it, and is none the wiser.

Hitcher; actually that's just for the add-on authors, i used the term info label, i meant property. the code constructs a 'wind' property properly localized from the two inputs. skinners change nothing.
Reply
#6
OK, thanks.
Reply
#7
Great, thanks.
My skins:

Amber
Quartz

Reply
#8
ok, we have our weather stuff sorted.

spiff has commited the needed core changes today
and amet just pushed the first compatible weather addon to our repo.


there's a few things skinners should note:
  • first (minor issue): the worldweatheronline addon does not set the $INFO[Window(Weather).Property(DewPoint)], $INFO[Window(Weather).Property(UVIndex)] and $INFO[Window(Weather).Property(FeelsLike)] infolabels, simply because the site does not provide this info.
  • second (too bad): worldweatheronline does not provide separate weather codes for day/night conditions. we use those codes to set our weather icons and weather fanart code. so don't be surprised if you spot some sunshiny icons in the middle of the night.
  • third (important!): we kindly request all skinners to add a weather credits label to their skin. this is required by worldweatheronline in order to use their api for free.
so please add something like:
Code:
Weather provided by: $INFO[Window(Weather).Property(WeatherProvider)]
the weather addon will fill in the "WeatherProvider" property of course.


if you have any skin related questions regarding the weather addon, feel free to ask.

for all other questions, there's a support thread here:
http://forum.xbmc.org/showthread.php?tid=114637
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
ronie Wrote:second (too bad): worldweatheronline does not provide separate weather codes for day/night conditions. we use those codes to set our weather icons and weather fanart code. so don't be surprised if you spot some sunshiny icons in the middle of the night.

Couldn't this be overcome by the addon checking the system time?
Reply
#10
@ronie: Just be careful about using World Weather Online. They have a limit on how many requests per hour they'll allow before blocking. I use them in my program and have had some trouble in the past.

From the usage policy:

Quote:We are flexible on request limit, so if at any point you feel you are going to exceed 500 requests per hour then please do let us know.

Might I suggest, to be on the safe side, using something like Google's Weather API? It's free and allows for a lot more than 500 requests per hour. I posted a sample code in C# to pull info from their server in the Weather API thread if you'd like to take a look.

Also, World Weather Online does allow for checking Day / Night. This is in C# but you'll be able to convert it to Python.

Code:
string timeURL = string.Format("http://www.worldweatheronline.com/feed/tz.ashx?q={0}&format=xml&key={API KEY}", location);

string timeData = Encoding.Default.GetString(client.DownloadData(timeURL));

     using (MemoryStream timeStream = new MemoryStream(Encoding.Default.GetBytes(timeData)))
     {
          xmlConditions.Load(timeStream);

          currentConditions.UTC = xmlConditions.SelectSingleNode("/data/time_zone/utcOffset").InnerText;
          currentConditions.LocalTime = xmlConditions.SelectSingleNode("/data/time_zone/localtime").InnerText;
     }
Reply
#11
Hitcher Wrote:Couldn't this be overcome by the addon checking the system time?

i was thinking the same. will chat with amet what he thinks about it.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#12
Sranshaft Wrote:@ronie: Just be careful about using World Weather Online. They have a limit on how many requests per hour they'll allow before blocking. I use them in my program and have had some trouble in the past.

thanx for the heads-up !
we will contact them to avoid getting caught by surprise again.

Sranshaft Wrote:Might I suggest, to be on the safe side, using something like Google's Weather API? It's free and allows for a lot more than 500 requests per hour. I posted a sample code in C# to pull info from their server in the Weather API thread if you'd like to take a look.

Also, World Weather Online does allow for checking Day / Night. This is in C# but you'll be able to convert it to Python.

Code:
string timeURL = string.Format("http://www.worldweatheronline.com/feed/tz.ashx?q={0}&format=xml&key={API KEY}", location);

string timeData = Encoding.Default.GetString(client.DownloadData(timeURL));

     using (MemoryStream timeStream = new MemoryStream(Encoding.Default.GetBytes(timeData)))
     {
          xmlConditions.Load(timeStream);

          currentConditions.UTC = xmlConditions.SelectSingleNode("/data/time_zone/utcOffset").InnerText;
          currentConditions.LocalTime = xmlConditions.SelectSingleNode("/data/time_zone/localtime").InnerText;
     }

i have looked into several free weather api's over the past week...
there aren't too many around though, and each has their own disadvantage.

yahoo weather, for instance, only provide a 2 day forecast.

and google doesn't provide any api docs, at least i couldn't find them using their search engine.
downside of the google api is they don't provide weather codes, and we need those for our weather icons / weather fanart pack.
in case you have a complete list of all the icons they use, we can possibly work around this issue.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#13
@ronie

Maybe a strange idea but would it be possible to use several API in one add-on?
This way they can compensate each others short commings and maybe as serve as backup should one fail.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#14
ronie Wrote:and google doesn't provide any api docs, at least i couldn't find them using their search engine.
downside of the google api is they don't provide weather codes, and we need those for our weather icons / weather fanart pack.
in case you have a complete list of all the icons they use, we can possibly work around this issue.

i do have a complete list of weather codes and I'll get those to you as soon as i can. Google uses a text based image naming format instead of a number based system so the old images would have to be updated if you decide to go that way.

The API is undocumented unfortunately but I've been able find some resources and through my own testing it's a fairly straight forward process of pulling the information via xml format. it's not as feature rich as something like Accuweather's APi but it does offer at least the same amount of data as the original Weather.com source.
Reply
#15
I'd like to point out that spiff and amet (and me to a lesser extent) have already fixed weather in the main git the only difference is its off by default and needs you to download an addon
Image
Reply

Logout Mark Read Team Forum Stats Members Help
What are planed changes regarding Weather0