Interface Asset - Local Weather

    Description

    The Local Weather Interface Asset (IA) is an off-the-shelf component of IntuiFace that displays local weather information for a city of your choice.

    This IA is based on the public REST-based Web Service API offered by World Weather Online.

    Using the Local Weather Interface Asset

    Any IntuiFace user can modify the default visual representation of the Local Weather IA. Your visual representation - specified by a data template - can access and manipulate any of the properties listed later in this article.

    In order to understand how you can use the Local Weather Interface Asset, watch the video below:

    How to refresh weather data

    The Weather IA will not automatically refresh its data. To refresh it, use any trigger such as a timer to call the Weather IA's Refresh action.

    Your refresh frequency shouldn't be shorter than every 10 seconds. In addition, as noted below, there is a limit to how many calls can be made per day for a given account with World Weather Online. This limit will be shared by all devices using the same API key.

    TimerWeather.jpg

    Properties, Triggers & Actions

    Properties

    To configure your weather feed, there are five properties exposed in Composer's Properties panel for the Local Weather IA.

    • Location   Name of the city for which you would like to know the weather
    • Language   Determines both language used in the weather feed and data formats
    • API key   Optional API key for creating personal weather feeds. See this section below for more information.
    • Number of days   Specifies the number of days in the future retrieved for a forecast
    • Forecast interval   Specifies the intervals used for each day in the forecast

    World Weather Online shares a rich set of weather information. Using the Local Weather IA you have access to:

    • 27 properties as per the chart below (you can click on it to see the hi-def image):

      Weather_Prop.jpg

    Actions

    • Set API key   changing the API key using IntuiFace Composer: NOTE: Use of this action risks exposure of your API key to others. Take care of its use.
    • Set forecast interval   specify the forecast interval
    • Set language   specify the language
    • Set location   string containing the city name passed to the REST Web Service
    • Set number of days   number of days to display
    • Refresh   updates weather information

    Weather-refresh.jpg

    Accessing additional information through the Weather IA

    If you'd like more than a 5 day forecast or if you need to support a large number of requests/day - more than 100/day shared by all of your Players - you need to get your own API key.

    To get your own API key, go to World Weather Online and select the appropriate plan. There is no free API key.

    Once you have your own API key, enter it in the API Key property of the Local Weather IA (see screenshot below):

    Weather-Properties.png