= Introduction = [[Image(WeatherDeviceUI4.png, align=right, 30%)]] The Weather plugin is a [http://wiki.micasaverde.com/index.php/Luup_Plugins Luup component] that captures, displays, and periodically updates Temperature and Humidity data based upon Vera's current [http://wiki.micasaverde.com/index.php/Location Location]. = How does it work = The plugin uses the Latitude/Longitude values configured in Vera's [http://wiki.micasaverde.com/index.php/Location Location] settings, and data provided by the ''Unofficial'' Google Weather service, to retrieve: * Temperature - The Current temperature * Low Temperature - The ''estimated'' low temperature * High Temperature - The ''estimated'' high temperature * Humidity - The ''estimated'' humidity Each of these values is presented as a Child Device of the Weather plugin, implementing the respective [http://wiki.micasaverde.com/index.php/Luup_UPNP_Files UPnP Service]. They're all set to be visually ''grouped'' in the UI/Presentation. Behind the scenes, the plugin uses Vera's ''Latitude'' and ''Longitude'' values, derived from the User-specified [http://wiki.micasaverde.com/index.php/Location Location] settings, to help form a URL to the Google Weather API. This URL call looks like: http://www.google.com/ig/api?weather=,,,40980465,-72212690 The plugin selects elements from the XML output, and translates them into values that are set upon the respective Child Devices. The Weather plugin retrieves the Weather data at startup, and again every 30 minutes after that. = Installation = '''WARNING:''' Please do not use the Internet Explorer "IE" Browser to install this plugin. There have been multiple reported problems with IE being used to upload plugins via Vera's Luup Plug installation pages. 1. Configure the physical location of your Vera, using the ''Location'' settings UI 1. Download the ZIP file `Weather-1.40.zip` from [http://www.box.net/shared/9fpyfgeiv4 document] 1. Expand the ZIP File to extract the 4x files, their names should be exactly as follows: * `D_Weather.xml` * `S_Weather.xml` * `I_GoogleWeather.xml` * `D_Weather.json` 1. Goto ''MiOS developers'' --> ''Luup files'' 1. Click the '''(Browse)''' buttons on the very Bottom, and enter the 4 filenames references above. 1. Select the checkbox "''[x] Restart Luup after upload''" and click '''(Go)''' 1. ... wait whilst it uploads and restarts the Lua engine ... 1. If successful, you'll see the 4x files listed in the System. 1. Select the ''Create device'' tab. 1. For the ''UpnpDevFilename'' field, type "`D_Weather.xml`" 1. For the ''Description'' field, type "Weather Plugin", 1. Click '''(Create device)''' 1. Close the ''MiOS developers'' dialog, and click '''(Save)''' 1. At this point you should have a working Weather component = Extras = [[Image(WeatherDialogUI4.png, align=right, 30%)]] Support has been added for the following Device Variables: * `Location` (String) a Location override for the settings configured within Vera.[[br]] This can be set to any value that the Google API supports. These options aren't officially documented by Google, but there are various websites that show examples. You can use values like "New York, USA" (etc) and it'll override the Lat/Long values in the Vera's [http://wiki.micasaverde.com/index.php/Location Location] settings. * `Metric` (Boolean) an override to force the calculations to produce values in Metric instead of Imperial.[[br]] This parameter defaults to "0" (Imperial), but can be set to Metric by changing the value to "1". Visually, Vera will still display ("F" or "C") after the values, depending upon what has been set in Vera's [http://wiki.micasaverde.com/index.php/Location Location] settings. * `Condition` (String) something representing the current Weather state.[[br]] From postings on the internet, this seems to have values in the list (potentially more): * `Clear` * `Cloudy` * `Fog` * `Haze` * `Light rain` * `Mostly Cloudy` * `Overcast` * `Partly Cloudy` * `Rain` * `Rain Showers` * `Showers` * `Thunderstorm` * `Chance of Showers` * `Chance of Snow` * `Chance of Storm` * `Mostly Sunny` * `Partly Sunny` * `Scattered Showers` * `Sunny` * `Snow` * `Snow Showers` * `Flurries` * `Rain and Snow` * `Ice/Snow` * `Fog` * `Windy` * `Heavy Rain` * `WindCondition` (String) a value like "`W at 2 mph`". Changes to the values of Variables requires a '''(Save)''' Operation to be performed in Vera after the change has been made. = Errors = * The Weather device requires [http://wiki.micasaverde.com/index.php/Location Location] data to start[[br]] If the Vera's Location has not been configured by the user, then the Weather plugin will not startup, and will indicate an error to the User in Vera's Device pane. * The Weather device is dependent upon data from Google's Weather API[[br]] Through the discussion thread below we've discovered that some of the values, such as the Humidity, for a given [http://wiki.micasaverde.com/index.php/Location Location] are extrapolated from nearby Weather stations. This process isn't 100% accurate and can lead to anomalies. If the information that's derived from Vera's [http://wiki.micasaverde.com/index.php/Location Location] settings is not accurate enough, you can use the Weather Device's `Location` variable to override it. You can then specify ZIP Codes (etc) to get more accurate information. * The values don't display in Metric[[br]] Vera's luup API's, as of 1.0.900 don't support retrieval of the User-specified ''Temperature format'' in Vera's [http://wiki.micasaverde.com/index.php/Location Location] settings. When this API is added, we can make changes to have the temperature values presented in that format. * It doesn't display correctly using http://findvera.com/mobile [[br]] As of Vera firmware release 1.0.900 there are problems in the Mobile renditions of multiple components. `TemperatureSensor` and `HumiditySensor` devices seem to be among those not implemented. * There's no Scene awareness, due to Vera Bug [http://bugs.micasaverde.com/view.php?id=1038 1038] and the related discussion [http://forum.micasaverde.com/index.php?topic=3492.0 thread] = Releases = * 4-Oct-2009[[br]] Added ability to override the Location information. http://forum.micasaverde.com/index.php?topic=1435.msg8832#msg8832 * 7-Nov-2009[[br]] Added stateVariables for `Condition` (`Sunny`, `Partly Cloudy`, etc) and `WindCondition` (`W at 2 mph`), in case folks want to script off of these. These are direct translations of the equivalent data from Google Weather. I strip out the "`Wind: `" prefix string from the `WindCondition` * 23-Jul-2010[[br]] Moved codebase to UI4 functionality = Discussion = The Weather plugin is discussed in this forum thread, along with a lot of it's development history: http://forum.micasaverde.com/index.php?topic=1435.0 Feel free to ask questions on that thread, as well as make any suggestions & contributions to the future development of the Weather plugin's functionality.