Weather Channel APi change
#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 [email protected].


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: [email protected]
Web: http://portal.theweatherchannel.com
___________________________________
No Backup, No Mercy
Reply
#2
finally the nudge we need to remove the internal backend support i think, and only rely on addons.
Reply
#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!
Reply
#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.
Reply
#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!
Reply
#6
Hi,

is there any solution or update for XBMC 10.1 "stable" available or planned?
Reply
#7
Rainbow 
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.
Reply
#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; }
        }
    }


}
Reply
#9
nice but xbmc is not programmed in C# Smile
Reply
#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
Reply
#11
Can you use Yahoo's Api?

http://developer.yahoo.com/weather/#terms
Reply
#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.
Reply
#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!
Reply
#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
Reply
#15
or even accuweather.com

yeah, lots of choices!
Linux Mint 18 LTS 64-bit - Kodi 17 Beta6
Odroid-C2 - Libreelec v7.90.009
Reply

Logout Mark Read Team Forum Stats Members Help
Weather Channel APi change0