Weather Channel APi change

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
thica Offline
Member
Posts: 86
Joined: Jan 2011
Reputation: 1
Location: Germany
Post: #1
Hello all,

I have got the message thyt the weather channel api will change and that the existing interface will stop working mid of November. Even if Eden got a feature freeze, this is something, that should be covered in Eden (or even in Dharma?)


Quote:Dear Registrant:

We are writing to you because our records indicate that you are a registered user of the weather.com XML Data Feed (http://xoap.weather.com.)

As a valued subscriber, we want to let you know that our data feed service offerings are changing. Beginning the week of October 10th, 2011, we will be launching a new subscription service, The Weather Channel API.

The Weather Channel API is a subscription offering created by The Weather Channel specifically to provide developers with access to an easy to use weather data feed that they can use to power commercial applications across a variety of technology platforms.

Key Features include:
• access to the most comprehensive global forecast set available anywhere
• white label solution (no logo; no links)
• weather data provided by weather.com
• data may be accessed in either XML or JSON format
• leverages a world class cloud-based Infrastructure
• product support for the world wide web, the mobile web, downloadable web / PC applications, and downloadable mobile phone / smart phone applications
• multi-language support for English, Spanish, French, German, & Portuguese

What this means to you:
In order to have access to an XML data feed from The Weather Channel, you will need to subscribe to The Weather Channel API. This letter serves as formal notice to you that your access to the weather.com XML Data Feed will terminate at midnight Eastern time on November 15, 2011. To evaluate The Weather Channel API as an alternative to the weather.com XML Data Feed, please go to http://portal.theweatherchannel.com.

If you have questions concerning this notice, you can call The Weather Channel at (770) 226-2329 or e-mail us at theweatherchannelapi@weather.com.


We look forward to continuing our relationship with you.

Best Regards,

Scott H. Zucker
Director, Revenue Management & Optimization
The Weather Channel, LLC
Phone: (770) 226-2329
Facsimile: (770) 226-2966
E-mail: theweatherchannelapi@weather.com
Web: http://portal.theweatherchannel.com

___________________________________
Panasonic TH50PZ70E -Denon AVS1909
Octagon 1018-Logitech Harmony 885
HTPC Asus / XBMC
Focal Suspense-JBL SUB 175 - T&A Pulsar TAV 500 - T&A Pulsar TAR 400 E
Unraid NAS 15 TB Net
find quote
spiff Offline
Retired Developer
Posts: 12,386
Joined: Nov 2003
Post: #2
finally the nudge we need to remove the internal backend support i think, and only rely on addons.
find quote
jimk72 Offline
Senior Member
Posts: 151
Joined: Jan 2005
Reputation: 0
Post: #3
I got the same thing like 2 days after I finished my touchscreen program to control xbmc and my entertainment system. Was not happy. Spent many days coding that. Anyway I am looking into accuweather more for private use though as there is a limit on the number of requests an account can have per day. Is there one that is more open to unlimited requests?

The weatherchannel API is like $60 a month for access!
find quote
Aenima99x Offline
Donor
Posts: 1,128
Joined: Aug 2007
Reputation: 8
Location: California
Post: #4
Looks like The Weather Channel may have shut it down already? Sad
Code:
12:19:45 T:140207391745792   ERROR: WEATHER: Unable to get data: Invalid License Key.
find quote
nemulate Offline
Senior Member
Posts: 146
Joined: Jul 2009
Reputation: 1
Post: #5
Aenima99x Wrote:Looks like The Weather Channel may have shut it down already? Sad
Code:
12:19:45 T:140207391745792   ERROR: WEATHER: Unable to get data: Invalid License Key.

Yep in-built weather not working here either!
find quote
Jackie78 Offline
Senior Member
Posts: 240
Joined: Oct 2005
Reputation: 0
Post: #6
Hi,

is there any solution or update for XBMC 10.1 "stable" available or planned?
find quote
ReducedToZero Offline
Senior Member
Posts: 104
Joined: Jun 2011
Reputation: 4
Rainbow   
Post: #7
Jackie78 Wrote:is there any solution or update for XBMC 10.1 "stable" available or planned?

Apologies to the Devs (as we shouldn't really be posting in Dev for support).

@Jackie78, see here.

HTH

'Zero

-----
XBMC Dharma | Windows Vista | Aeon Nox 1.7
-----
On a long enough timeline. The survival rate for everyone drops to zero.
find quote
Sranshaft Offline
Posting Freak
Posts: 1,424
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #8
jimk72 Wrote:Anyway I am looking into accuweather more for private use though as there is a limit on the number of requests an account can have per day. Is there one that is more open to unlimited requests?

Google has a weather API that works extremely well - I've used it in the past. Some great things about it are:
  • Picks up nearly any city you can think of
  • Offers translated forecasts directly from Google
  • Very simple to pull info
  • Generous per-day request (my program gets somewhere in the neighbourhood of 10k unique requests a day)

Obviously, Team-XBMC would see a fairly significant increase in the per-day requests but it shouldn't be too much of a problem.

Here's the C# code I made to tap in the Google Weather API just to show how easy it is.

Code:
namespace GoogleWeatherAPI
{
    class Weather
    {
        /// <summary>
        /// The function that returns the current conditions for the specified location.
        /// </summary>
        /// <param name="location">City or ZIP code</param>
        /// <returns></returns>
        public static Conditions GetCurrentConditions(string location)
        {
            Conditions conditions = new Conditions();

            using (StreamReader reader = new StreamReader(WebRequest.Create(string.Format("http://www.google.com/ig/api?weather={0}&hl={1}", location, GetLanguageCode())).GetResponse().GetResponseStream(), Encoding.Default, true))
            {
                XmlDocument xmlConditions = new XmlDocument();
                xmlConditions.Load(reader);

                if (xmlConditions.SelectSingleNode("xml_api_reply/weather/problem_cause") != null)
                {
                    conditions = null;
                }
                else
                {
                    try
                    {
                        conditions.City = xmlConditions.SelectSingleNode("/xml_api_reply/weather/forecast_information/city").Attributes["data"].InnerText;

                        if (conditions.City.Contains(',') && conditions.City.Length > 20)
                            conditions.City = conditions.City.Substring(0, conditions.City.IndexOf(','));

                        conditions.Time = xmlConditions.SelectSingleNode("/xml_api_reply/weather/forecast_information/current_date_time").Attributes["data"].InnerText;
                        conditions.Units = xmlConditions.SelectSingleNode("/xml_api_reply/weather/forecast_information/unit_system").Attributes["data"].InnerText;
                        conditions.Condition = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/condition").Attributes["data"].InnerText;
                        conditions.TempC = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/temp_c").Attributes["data"].InnerText;
                        conditions.TempF = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/temp_f").Attributes["data"].InnerText;
                        conditions.Humidity = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/humidity").Attributes["data"].InnerText;
                        conditions.Wind = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/wind_condition").Attributes["data"].InnerText;
                        conditions.Icon = xmlConditions.SelectSingleNode("/xml_api_reply/weather/current_conditions/icon").Attributes["data"].InnerText;
                    }
                    catch { }

                }

                reader.Close();
                reader.Dispose();
            }

            return conditions;
        }

        /// <summary>
        /// The function that gets the forecast for the next four days.
        /// </summary>
        /// <param name="location">City or ZIP code</param>
        /// <returns></returns>
        public static List<Conditions> GetForecast(string location)
        {
            List<Conditions> conditions = new List<Conditions>();

            using (StreamReader reader = new StreamReader(WebRequest.Create(string.Format("http://www.google.com/ig/api?weather={0}&hl={1}", location, GetLanguageCode())).GetResponse().GetResponseStream(), Encoding.Default, true))
            {
                XmlDocument xmlConditions = new XmlDocument();
                xmlConditions.Load(reader);

                if (xmlConditions.SelectSingleNode("xml_api_reply/weather/problem_cause") != null)
                {
                    conditions = null;
                }
                else
                {
                    foreach (XmlNode node in xmlConditions.SelectNodes("/xml_api_reply/weather/forecast_conditions"))
                    {
                        Conditions condition = new Conditions();
                        condition.City = xmlConditions.SelectSingleNode("/xml_api_reply/weather/forecast_information/city").Attributes["data"].InnerText;
                        condition.Units = xmlConditions.SelectSingleNode("/xml_api_reply/weather/forecast_information/unit_system").Attributes["data"].InnerText;
                        
                        if (condition.City.Contains(',') && condition.City.Length > 20)
                            condition.City = condition.City.Substring(0, condition.City.IndexOf(','));

                        condition.Condition = node.SelectSingleNode("condition").Attributes["data"].InnerText;
                        condition.High = node.SelectSingleNode("high").Attributes["data"].InnerText;
                        condition.Low = node.SelectSingleNode("low").Attributes["data"].InnerText;
                        condition.DayOfWeek = node.SelectSingleNode("day_of_week").Attributes["data"].InnerText;
                        condition.Icon = node.SelectSingleNode("icon").Attributes["data"].InnerText;
                        conditions.Add(condition);
                    }
                }

                reader.Close();
                reader.Dispose();
            }

            return conditions;
        }

        private static string GetLanguageCode()
        {
            return System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
        }
    }

    public class Conditions
    {
        string city = "No Data";
        string time = DateTime.Now.ToString();
        string units = "US";
        string dayOfWeek = DateTime.Now.DayOfWeek.ToString();
        string condition = "No Data";
        string tempF = "No Data";
        string tempC = "No Data";
        string humidity = "No Data";
        string wind = "No Data";
        string high = "No Data";
        string low = "No Data";
        string icon = string.Empty;

        public string City
        {
            get { return city; }
            set { city = value; }
        }

        public string Time
        {
            get { return time; }
            set { time = value; }
        }

        public string Units
        {
            get { return units; }
            set { units = value; }
        }

        public string Condition
        {
            get { return condition; }
            set { condition = value; }
        }

        public string TempF
        {
            get { return tempF; }
            set { tempF = value; }
        }

        public string TempC
        {
            get { return tempC; }
            set { tempC = value; }
        }

        public string Humidity
        {
            get { return humidity; }
            set { humidity = value; }
        }

        public string Wind
        {
            get { return wind; }
            set { wind = value; }
        }

        public string DayOfWeek
        {
            get { return dayOfWeek; }
            set { dayOfWeek = value; }
        }

        public string High
        {
            get { return high; }
            set { high = value; }
        }

        public string Low
        {
            get { return low; }
            set { low = value; }
        }

        public string Icon
        {
            get { return icon; }
            set { icon = value; }
        }
    }


}

[Image: all-thin-fanart.jpg]
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,478
Joined: Feb 2008
Reputation: 64
Post: #9
nice but xbmc is not programmed in C# Smile


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
Sranshaft Offline
Posting Freak
Posts: 1,424
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #10
davilla Wrote:nice but xbmc is not programmed in C# Smile

Oh, I fully realize that. Just giving an example of how easy it is to grab the info from Google. I'm sure someone with a little more knowledge in C++ wouldn't have any trouble at all converting it. Smile

[Image: all-thin-fanart.jpg]
(This post was last modified: 2011-11-06 03:06 by Sranshaft.)
find quote
Palvarez Offline
Junior Member
Posts: 3
Joined: Nov 2011
Reputation: 0
Post: #11
Can you use Yahoo's Api?

http://developer.yahoo.com/weather/#terms
find quote
Sranshaft Offline
Posting Freak
Posts: 1,424
Joined: Dec 2008
Reputation: 24
Location: Melbourne, Australia
Post: #12
Palvarez Wrote:Can you use Yahoo's Api?

http://developer.yahoo.com/weather/#terms

Sure could and this is really where, as Spiff suggested, removing weather from the main core of XBMC and moving it to addons would shine. That way XBMC, as a whole, isn't tied to one specific weather source and the user can choose where to fetch the information depending on what they feel offers the best forecasts for their particular location.

[Image: all-thin-fanart.jpg]
(This post was last modified: 2011-11-07 00:01 by Sranshaft.)
find quote
jimk72 Offline
Senior Member
Posts: 151
Joined: Jan 2005
Reputation: 0
Post: #13
Sranshaft Wrote:Oh, I fully realize that. Just giving an example of how easy it is to grab the info from Google. I'm sure someone with a little more knowledge in C++ wouldn't have any trouble at all converting it. Smile

I will def look into it. I have all the code inplace for weather.com so it should be just a matter of adjusting to the new file downloaded.

Thanks!
find quote
PatrickBateman Offline
Posting Freak
Posts: 1,677
Joined: Mar 2011
Reputation: 17
Location: Another Earth
Post: #14
@spiff

Is there any indication as to when this will be removed from xbmc or in the mean time is there any known workaround to allow users to disable the weather from sending requests as it's currently searching for requests causing "busy" to appear and those requests are obviously using the old non Functioning Api.

Because of this network activity I receive a small but annoying amount of slowdown when navigating the home screen.

Are there any work arounds I could use form the time being..

If this is a skin related issue, just ignore this as I have also posted a request in the skin thread regarding removal of weather too.

Thanks in advance,

Win7
Xbmc pre Eden nighties 5th nov
Default weather plugin
find quote
locomot1f Offline
Posting Freak
Posts: 922
Joined: Mar 2011
Reputation: 8
Location: ohio
Post: #15
or even accuweather.com

yeah, lots of choices!
find quote
Post Reply