QVisu
Qt-based visualization for smart homes
|
The weather element downloads the weather forecast from yr.no and displays it. For the next 24 hours, it shows max/min temperatures (in 6h intervals), clouds, precipitation (rain/snow), and wind. For the following days, it shows max/min temperatures, clouds, and precipitation.
<element type="weather" position="x,y" width="w" height="h"> <latitude>...</latitude> <longitude>...</longitude> <color>...</color> <text>...</text> <days>...</days> </element>
Elements in bold are mandatory.
element/tag | comment |
---|---|
width, height | Can be chosen arbitrarily, minimum width is 3, minimum height is 2. Default is 6x3 |
latitude, longitude | Geographical position of your location in decimal notation. Stuttgart (48° 46' 39'' N, 9° 10' 43'' E) is 48.7775 / 9.178611 |
text | Title text |
color | Background color. Default value is cyan. |
days | Number of days after today for which the forecast is displayed. yr.no seems to have a ten-day forecast. Default is 3. |
Changing the data source to either the DWD plugin of smarthome.py or to the DWD FTP server would be a good thing. Volunteers welcome.
yr.no delivers an XML file with various forecasts for different time ranges and different items. For instance, precipitation and temperature are in different items. Plus, yr.no will deliver a forecast for the next day from 0:00 to 1:00, one from 0:00 to 6:00, one for the whole day.
QVisu first aggregates the data into its own data structure, always overwriting data for longer time ranges with data for shorter time ranges (to get the best resolution out of the data).
Then, it calculates the average precipitation (i.e. rain/snow) and wind from this data set, as well as the max and min temperatures. It ignores the max/min values from yr.no and determines them directly from the expected temperatures. This works quite well for short-term, but has its downsides for long-term prognosis.