Weather Channel APi change

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
thica Offline
Member
Posts: 83
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
Grumpy Bastard Developer
Posts: 12,185
Joined: Nov 2003
Reputation: 82
Post: #2
finally the nudge we need to remove the internal backend support i think, and only rely on addons.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
jimk72 Offline
Senior Member
Posts: 148
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
Member+
Posts: 1,030
Joined: Aug 2007
Reputation: 7
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: 143
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: 198
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
Member
Posts: 88
Joined: Jun 2011
Reputation: 3
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 Online
Posting Freak
Posts: 1,335
Joined: Dec 2008
Reputation: 19
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: watched-fanart.jpg]
find quote
davilla Offline
Team-XBMC Developer
Posts: 10,399
Joined: Feb 2008
Reputation: 58
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 Online
Posting Freak
Posts: 1,335
Joined: Dec 2008
Reputation: 19
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: watched-fanart.jpg]
(This post was last modified: 2011-11-06 03:06 by Sranshaft.)
find quote
Post Reply