PegLeg recently posted a nice command for those who use Kodi, if you prefer to see a pop-up view of your local weather rather than having VC read aloud the forecast to you. (
http://voxcommando.com/forum/index.php?topic=2046)
His efforts inspired me to play with something I've been meaning to try for a while (thanks PegLeg
). The following is a pure VC pop-up weather widget, for those of us who don't use Kodi that much.
This requires enabling the Wunder plugin and the RoboB plugin.
The Wunder plugin provides a ton of special weather variables, so you could really customize this to your liking. I'm simply using their weather icon pictograph plus today's forecast.
You should format your WUnder forecasts the way you like them in the plugin settings, if you haven't already.
In my version, I am using the forecast format: Weather for {T0.title}: {T0.fcttext_metric} {T1.fcttext_metric}
You'll need to
put the attached wunder.html template in your VC directory. You can format the web page however you like. The attached screen capture shows its current layout.
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.3.8-->
<commandGroup open="True" name="RoboB pop-up weather widget" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="312" name="weather pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Enable last action if you want the forecast read aloud as well.
">
<action>
<cmdType>RoboB.Select</cmdType>
<params>
<param>wunder</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>WUnder.GetCustom</cmdType>
<params>
<param>{T0.icon_url}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>img</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>WUnder.GetForecast</cmdType>
<params>
<param>0</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>forecast</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Read</cmdType>
<params>
<param>wunder.html</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>(src=").*?(">)</param>
<param>$1{var.img}$2</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>(<div><p>).*?(</p></div>)</param>
<param>$1{var.forecast}$2</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Write</cmdType>
<params>
<param>wunder.html</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Navigate</cmdType>
<params>
<param>{Path.VC}\wunder.html</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Wait</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Show</cmdType>
<params>
<param>True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.ShowFrame</cmdType>
<params>
<param>False</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.SetWinSize</cmdType>
<params>
<param>650</param>
<param>250</param>
<param>0</param>
<param>0</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>{var.forecast}</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<phrase>Show today's weather</phrase>
</command>
<command id="385" name="hide weather pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>RoboB.Select</cmdType>
<params>
<param>wunder</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Dispose</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>hide the weather pop-up</phrase>
</command>
</commandGroup>
Version 2 (using slightly less lazy html, though still old-school ... 'cuz I'm old -- wunder2.html attached):
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<commandGroup open="True" name="RoboB pop-up weather widget" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="323" name="weather pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Enable last action if you want the forecast read aloud as well.
">
<action>
<cmdType>RoboB.Select</cmdType>
<params>
<param>wunder</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>WUnder.GetCustom</cmdType>
<params>
<param>{T0.icon_url}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>img</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>WUnder.GetForecast</cmdType>
<params>
<param>0</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.SetVar</cmdType>
<params>
<param>forecast</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Read</cmdType>
<params>
<param>wunder2.html</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>(src=").*?(">)</param>
<param>$1{var.img}$2</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegExReplace</cmdType>
<params>
<param>(colspan="2">).*?(</td>)</param>
<param>$1{var.forecast}$2</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>File.Write</cmdType>
<params>
<param>wunder2.html</param>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Navigate</cmdType>
<params>
<param>{Path.VC}\wunder2.html</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Wait</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Show</cmdType>
<params>
<param>True</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.ShowFrame</cmdType>
<params>
<param>False</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.SetWinSize</cmdType>
<params>
<param>570</param>
<param>200</param>
<param>0</param>
<param>0</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>InputKeys.Send</cmdType>
<params>
<param>{F5}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>TTS.Speak</cmdType>
<params>
<param>{var.forecast}</param>
</params>
<cmdRepeat>0</cmdRepeat>
</action>
<phrase>Show today's weather</phrase>
</command>
<command id="412" name="hide weather pop-up" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>RoboB.Select</cmdType>
<params>
<param>wunder</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>RoboB.Dispose</cmdType>
<params />
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>hide the weather pop-up</phrase>
</command>
</commandGroup>