Running your own Wii Forecast Channel: Difference between revisions

Jump to navigation Jump to search
No edit summary
 
We'll need to generate a certificate for the Forecast Channel's files, so just go to the root ForecastChannel folder and generate the certificate using openssl (you'll need to install it on Windows): <code>openssl genrsa -traditional -out Private.pem 2048</code>
 
Now for the more annoying part of this project... By default it has a HUGE <code>weather.xml</code> file with a ton of different countries that you very likely don't need. My advice is, backup the file, wipe out the original and replace it with an empty-ish version like this:
 
<syntaxhighlight lang="xml">
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<country>
<name jpn="アメリカ" eng="United States" de="Vereinigte Staaten" fr="Etats-Unis d’Amérique" es="Estados Unidos de América" it="Stati Uniti d'America" nl="Verenigde Staten" />
<city jpn="ワシントンD.C." eng="Washington D.C." de="Washington, D.C." fr="Washington" es="Washington D. C." it="Washington" nl="Washington D.C.">
<province jpn="コロンビア特別区" eng="District of Columbia" de="District of Columbia" fr="District Fédéral de Washington D.C." es="Distrito de Columbia" it="Distretto di Columbia" nl="District of Columbia" />
<longitude>-77.0361328125</longitude>
<latitude>38.8916015625</latitude>
<zoom1>8</zoom1>
<zoom2>3</zoom2>
</city>
</country>
<international>
<city>
<province jpn="東京都" eng="Tokyo" de="Tokio" fr="Tokyo" es="Tokio" it="Tokyo" nl="Tokio" />
<longitude>139.7625732421875</longitude>
<latitude>35.68359375</latitude>
<zoom1>9</zoom1>
<zoom2>3</zoom2>
<country jpn="日本" eng="Japan" de="Japan" fr="Japon" es="Japón" it="Giappone" nl="Japan" />
<name jpn="東京" eng="Tokyo" de="Tokio" fr="Tokyo" es="Tokio" it="Tokyo" nl="Tokio" />
</city>
</syntaxhighlight>
etc etc...
</pre>
 
and then copying your <code><country></code> tag from the backed up file, as well as the <code><international></code> and <code><conditions></code> tag. This will GREATLY speed up the process and will reduce the amount of API calls you use.
 
To add a location its pretty easy. Just copy and paste the <code><city></code> tag and fill out the information. If you put it in the international category, you won't be able to get UV index or a 5-day forecast due to a limitation in the Wii Forecast Channel.
 
Example of adding the The South Pole in Antarctica:
<syntaxhighlight lang="xml">
<city>
<province jpn="" eng="" de="" fr="" es="" it="" nl="" />
<longitude>0.0000</longitude>
<latitude>-90.0000</latitude>
<zoom1>9</zoom1>
<zoom2>3</zoom2>
<country jpn="南極大陸" eng="Antarctica" de="Antarctica" fr="Antarctica" es="Antarctica" it="Antarctica" nl="Antarctica" />
<name jpn="東京" eng="Tokyo" de="Tokio" fr="Tokyo" es="Tokio" it="Tokyo" nl="Tokio" />
</city>
</syntaxhighlight>
 
Bit of a breakdown of the above:
 
<syntaxhighlight lang="xml"><province jpn="" eng="" de="" fr="" es="" it="" nl="" /></syntaxhighlight>
 
This is the province (or state, or what have you) that will display when you wait a few seconds on the weather information screen. So if you were doing Atlanta, Georgia, USA, you'd put "Georgia" in the eng attribute. The different attributes (jpn, de, fr, es, it, nl) are for Japanese, German, French, Spanish, Italian and Dutch localizations. Personally I always just leave those blank because I only use the English version, but you can translate them if you want
 
<syntaxhighlight lang="xml"><longitude>0.0000</longitude></syntaxhighlight>
 
The Longitude of the location. You can get this from Geonames, Google Maps, etc
 
<syntaxhighlight lang="xml"><latitude>-90.0000</latitude></syntaxhighlight>
 
The Latitude of the location. Again you can get this from Geonames, Google Maps, and other places
 
<syntaxhighlight lang="xml"><zoom1>9</zoom1></syntaxhighlight>
 
This is how much you will have to zoom out of the map before you stop seeing the location. <code>9</code> means its visible at all times, even if you're fully zoomed out. <code>0</code> means you have to be fully zoomed in to see it. For local locations, I recommend making it 0, but for really important international locations, <code>9</code> is good. If you don't know what zoom to make it <code>4</code> is usually a good compromise.
 
<syntaxhighlight lang="xml"><zoom2>3</zoom2></syntaxhighlight>
 
Honestly, I have no idea. It seems to be always set at "3" though so I just leave it.

Navigation menu