Weather addons: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 25: Line 25:


=Things you need to know!=
=Things you need to know!=
there's a few things (quirks) you need to be aware of when creating a weather addon...
There's a few things (quirks) you need to be aware of when creating a weather addon...
* Kodi will automatically run a weather addon when the skins asks to display one of the weather specific infolabels (Weather.Conditions / Weather.Temperature / Weather.Location)
* Kodi will automatically run a weather addon when the skins asks to display one of the weather specific infolabels  
:* Weather.Conditions
:* Weather.Temperature
:* Weather.Location
* Kodi will run the weather addon at a 30 min interval (as long the current skin window displays one of the specific weather infolabels mentioned before)
* Kodi will run the weather addon at a 30 min interval (as long the current skin window displays one of the specific weather infolabels mentioned before)
* In the weather window, kodi will automatically try to translate all the weather strings
* In the weather window, kodi will automatically try to translate all the weather strings

Revision as of 01:39, 4 December 2016

addon.xml

Weather addons use the 'xbmc.python.weather' extension point. The basic layout of the addon.xml of a weather addon will look like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="weather.name" name="My Weather" version="1.2.3" provider-name="me">
	<requires>
		<import addon="xbmc.python" version=""/>
	</requires>
	<extension point="xbmc.python.weather" library=""/>
	<extension point="xbmc.addon.metadata">
		<summary lang="en"></summary>
		<description lang="en"></description>
		<language></language>
		<platform></platform>
		<license></license>
		<forum></forum>
		<website></website>
		<email></email>
		<source></source>
	</extension>
</addon>

Things you need to know!

There's a few things (quirks) you need to be aware of when creating a weather addon...

  • Kodi will automatically run a weather addon when the skins asks to display one of the weather specific infolabels
  • Weather.Conditions
  • Weather.Temperature
  • Weather.Location
  • Kodi will run the weather addon at a 30 min interval (as long the current skin window displays one of the specific weather infolabels mentioned before)
  • In the weather window, kodi will automatically try to translate all the weather strings
  • Kodi will also handle transformations between units (for instance, Celsius to Fahrenheit, km/h to mph)

Weather Codes

0 	tornado
1 	tropical storm
2 	hurricane
3 	severe thunderstorms
4 	thunderstorms
5 	mixed rain and snow
6 	mixed rain and sleet
7 	mixed snow and sleet
8 	freezing drizzle
9 	drizzle
10 	freezing rain
11 	showers
12 	showers
13 	snow flurries
14 	light snow showers
15 	blowing snow
16 	snow
17 	hail
18 	sleet
19 	dust
20 	foggy
21 	haze
22 	smoky
23 	blustery
24 	windy
25 	cold
26 	cloudy
27 	mostly cloudy (night)
28 	mostly cloudy (day)
29 	partly cloudy (night)
30 	partly cloudy (day)
31 	clear (night)
32 	sunny
33 	fair (night)
34 	fair (day)
35 	mixed rain and hail
36 	hot
37 	isolated thunderstorms
38 	scattered thunderstorms
39 	scattered thunderstorms
40 	scattered showers
41 	heavy snow
42 	scattered snow showers
43 	heavy snow
44 	partly cloudy
45 	thundershowers
46 	snow showers
47 	isolated thundershowers
na 	not available