Table of Contents
NOTE: Darksky was purchased by Apple recently and the API that drives this plugin has been shut down. This plugin will no longer function. If there is another weather service with a free, or at least a free developer API, that you would like a plugin for please let me know.
The Darksky Plugin is officially Deprecated and will be removed from a future XTension version
The Darksky Weather plugin connects to their excellent and very complete API. Since this is not a commercial product it follows in the tradition of other similar home automation weather system plugins that it requires you to register for your own developer ID at dark sky. You can do that for free as long as you keep your daily updates to their system to under 1000. If you wish to have several plugins updating for several locations and want fairly quick updates you may exceed that. The charges for using the API are very low. The first 1000 each day are free and after that they charge a dollar per 10000 additional hits. I’m not sure if that is billed per day or per month or when you reach 10k or what so if you decide to open a billing account please do keep track of your usage and understand the billing rules.
You can register for a developer key here: here.
Each instance of the plugin can query for only one location but you can create multiple instances to load the weather for multiple locations. Keep in mind that depending on your refresh frequency this may take you into billable numbers of API hits. DarkSky will lock your API key if you go over 1000 hits a day and have no billing information on file.
The DarkSky plugin creates many reports that can be dragged into an XTension View or placed on a Web Interface page. It also creates many unit types for getting specific information into XTension so you can plan actions or irrigation schedules and such based on upcoming chance of rain or other items of information.
Update Settings: Enter the interval in minutes that you want the forecast to update. The minimum settings is every 2 minutes as performing an update more often than that will exceed your free 1000 hits a day. The default it to update every 5 minutes.
Location: You will need to translate your location into Latitude and Longitude. The easiest way to do that is to visit google maps and let it center on you. Then click anywhere not on existing map pin. A small info window will appear at the bottom of the map showing the address and also the lat/lon info that you should copy into these 2 fields.
Language: Darksky can produce the text parts of forecasts and units in many different languages. Including Pig Latin which is just hilarious.
Units: Select the type of units you wish the data formatted as. In addition to the obvious Imperial and Metric options there are options for “Metric with speeds in km/h” as well as “Metric with speed sin MPH”
Dark Sky API Settings: Enter your API key into this field. This is required as Dark Sky will not process any queries without it
To display a text forecast display create a new Unit and assign it’s interface to your DarkSky plugin instance. Select “Forecast Display” from the Device or Unit Type popup. Once the Unit is configured drag it into a View or create a new control in a View or a Web Interface of type “Unit Description as HTML.“
You must assign the unit an address All Units that are not Pseudos in XTension must have an address. In this case the address doesn’t actually matter. Start by placing just a “0” into the address field. If you create more forecast units assigned to this interface you can just increment the address number so that each one assigned to the same interface is unique. If you have multiple plugin instances then each one is a separate address space.
Format As: The plugin can format the display either as human readable text or in a table layout. See the examples below. Note: there is a bug in the current alpha of the plugin and these 2 selections seem to be reversed. So select “Text” to create a table display and vice versa. This will be fixed in a future update.
Font Size: Since there are so many options for display and so many options for how you might wish to display this information you can set a font size here to make it readable or fit properly in whatever interface you put it.
Days to include: Forecast data is available up to 8 days in the future. You can choose how many days to include in this output.
Data To Include: There is a lot of data available in the darksky forecast output. You can choose which data points you’re interested in for this particular display.
Precipitation Graph By The Minute
Darksky provides estimates for Chance Of Precipitation and Precipitation Intensity in every minute for the next hour. Note: Every non-pseudo Unit in XTension must have an address. Though the address is not used for this report unit it must still be present and must be unique. Just entering a “0” in the Address field is enough. If you wish to create multiple Next Hour Data Displays then just increment the number for each new one you create.
To display a graph of any time up to the next hour create a new Unit and assign it to the Darksky Interface. Select “Next Hour Data Display” from the Device/Unit type popup. Once the Unit is configured either drag it onto a View or create a new View or Web Interface control with the type set to “Unit Description As HTML.” Apologies that this screen shot example is not very interesting as there is no chance of rain here in the next hour. I will update that as soon as there is.
Data To Show: A minutely report can display either “Chance Of Precipitation” or “Precipitation Intensity”
How many datapoints to include Enter the number of minutes to include in the report. Data is available for up to 61 minutes.
Draw Timestamp: Toggles the drawing of the timestamp in the graph on or off. Normally the time at the start, middle and end of the graph is displayed.
Several more data points are available for graphing over the next 48 hours. They can be used to create graphs such as this chance of precipitation over the next 24 hours. Note: All Units in XTension must have an Address. Though this field is not used in these report Units it is still necessary for it to be filled in and be unique among all other report displays of the same type on the same interface. Please enter just a “0” as the address for the first hourly report you create and if you wish to create more then increment their count.
To create an hourly report Unit select “Next 24 Hours Data Display” from the Device type popup after creating a new Unit.
Data To Show: For hourly reports you can choose to display from the following: “Chance Of Precipitation”, “Precipitation Intensity”, “Humidity”, and “Cloud Cover” Alpha Note: there is additional data that is available here in the API such as Temperature. These other graph types will be available in a future build of the plugin.
How many datapoints to include (1-49): Hourly forecast data is available up to 49 hours from now. The best accuracy is in the next 24 hours.
Draw Timestamp: Whether the graph should include timestamps at the top of the graph.
This entry is a work in progress. The above is only a tiny portion of the available data types, reports and units. More will be added as soon as the current hurricane has passed over me…