Difference between revisions of "WXonline"
(23 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | This driver provides weather information and forecasts retrieved from | + | This driver provides weather information and forecasts retrieved from [https://openweathermap.org/ OpenWeatherMap]. |
− | |||
− | |||
[[Category:I/O Server]] | [[Category:I/O Server]] | ||
== HSYCO Configuration == | == HSYCO Configuration == | ||
+ | Add a WXONLINE I/O Server in the [[Settings#I/O Servers|I/O Servers section of the Settings]] and set its parameters. | ||
+ | |||
+ | {{note|Note that the WXONLINE I/O Server doesn't count in the I/O servers license total, so you don't need an extra I/O Server license to use WXONLINE with HSYCO.}} | ||
+ | |||
+ | === High Availability === | ||
+ | *'''Shutdown when inactive''': defaults to true. | ||
=== Options === | === Options === | ||
Line 29: | Line 33: | ||
|pollinterval | |pollinterval | ||
|10 | |10 | ||
− | |n > | + | |n >= 10 |
|the data acquisition interval, in minutes | |the data acquisition interval, in minutes | ||
Line 36: | Line 40: | ||
|location | |location | ||
| | | | ||
− | |< | + | |<id> or <lat>:<lon> |
− | | | + | |ID of the target location or coordinates |
+ | |||
+ | |- | ||
+ | |||
+ | |key | ||
+ | | | ||
+ | |<key> | ||
+ | |OpenWeatherMap API key | ||
|} | |} | ||
− | The 'location' option is required. To obtain the | + | The 'location' option is required. To obtain the ID of the desired location, look for it [http://bulk.openweathermap.org/sample/city.list.json.gz this list]. Otherwise, you can specify the geographic coordinates of the location using the format "<latitude>:<longitude>" (e.g. "45.461001:9.183567"), with latitude and longitude expressed as decimal degrees. |
+ | |||
+ | The 'key' option can be obtained [https://home.openweathermap.org/users/sign_up creating an account on OpenWeatherMap]. If this option is not specified, a default API key will be used and the 'pollinterval' option wont't allow for values below 60. | ||
== Datapoints == | == Datapoints == | ||
Line 64: | Line 77: | ||
|- | |- | ||
− | |rowspan=" | + | |rowspan="2" |location |
|<location> | |<location> | ||
|R | |R | ||
|the target location is set to <location> (e.g. “New York, NY, United States”) | |the target location is set to <location> (e.g. “New York, NY, United States”) | ||
|- | |- | ||
− | |< | + | |<id> or<br><lat>:<lon> |
− | |||
− | |||
− | |||
− | |||
|W | |W | ||
− | | | + | |set the location to the specified value |
|- | |- | ||
Line 159: | Line 168: | ||
|R | |R | ||
|the reported current humidity percentage corresponds to <val> | |the reported current humidity percentage corresponds to <val> | ||
+ | |||
+ | |- | ||
+ | |||
+ | |pressure | ||
+ | |<val> | ||
+ | |R | ||
+ | |the reported current pressure in inches of mercury (inHg) corresponds to <val>. Multiply by 33.86389 to obtain the equivalent hPa value | ||
|- | |- | ||
Line 165: | Line 181: | ||
|<val> | |<val> | ||
|R | |R | ||
− | |the reported current wind speed corresponds to <val> | + | |the reported current wind speed corresponds to <val> (expressed in Km/h) |
|- | |- | ||
Line 177: | Line 193: | ||
|forecast.day.<n> | |forecast.day.<n> | ||
− | (<n> = 1 | + | (<n> = 1 ... 5) |
|<day> | |<day> | ||
|R | |R | ||
Line 185: | Line 201: | ||
|forecast.temp.low.c.<n> | |forecast.temp.low.c.<n> | ||
− | |||
|<val> | |<val> | ||
|R | |R | ||
Line 193: | Line 208: | ||
|forecast.temp.low.f.<n> | |forecast.temp.low.f.<n> | ||
− | |||
|<val> | |<val> | ||
|R | |R | ||
Line 201: | Line 215: | ||
|forecast.temp.high.c.<n> | |forecast.temp.high.c.<n> | ||
− | |||
|<val> | |<val> | ||
|R | |R | ||
Line 209: | Line 222: | ||
|forecast.temp.high.f.<n> | |forecast.temp.high.f.<n> | ||
− | |||
|<val> | |<val> | ||
|R | |R | ||
Line 217: | Line 229: | ||
|forecast.condition.<n> | |forecast.condition.<n> | ||
− | |||
|<condition> | |<condition> | ||
|R | |R | ||
Line 501: | Line 512: | ||
|forecast.day.<n> | |forecast.day.<n> | ||
− | (<n> = 1 | + | (<n> = 1 ... 5) |
|value | |value | ||
|colspan="2"|the week day identified by <n> (i.e. “Mon”, “Tue”, “Wed”, ...) | |colspan="2"|the week day identified by <n> (i.e. “Mon”, “Tue”, “Wed”, ...) | ||
Line 508: | Line 519: | ||
|forecast.temp.low.c.<n> | |forecast.temp.low.c.<n> | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted lowest temperature for day <n> followed by "°C" | |colspan="2"|the forecasted lowest temperature for day <n> followed by "°C" | ||
Line 515: | Line 525: | ||
|forecast.temp.low.c.<n>.nounit | |forecast.temp.low.c.<n>.nounit | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted lowest temperature for day <n> without unit (expressed in °C) | |colspan="2"|the forecasted lowest temperature for day <n> without unit (expressed in °C) | ||
Line 523: | Line 532: | ||
|forecast.temp.low.f.<n> | |forecast.temp.low.f.<n> | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted lowest temperature for day <n> followed by "°F" | |colspan="2"|the forecasted lowest temperature for day <n> followed by "°F" | ||
Line 530: | Line 538: | ||
|forecast.temp.low.f.<n>.nounit | |forecast.temp.low.f.<n>.nounit | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted lowest temperature for day <n> without unit (expressed in °F) | |colspan="2"|the forecasted lowest temperature for day <n> without unit (expressed in °F) | ||
Line 537: | Line 544: | ||
|forecast.temp.high.c.<n> | |forecast.temp.high.c.<n> | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted highest temperature for day <n> followed by "°C" | |colspan="2"|the forecasted highest temperature for day <n> followed by "°C" | ||
Line 544: | Line 550: | ||
|forecast.temp.high.c.<n>.nounit | |forecast.temp.high.c.<n>.nounit | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted highest temperature for day <n> without unit (expressed in °C) | |colspan="2"|the forecasted highest temperature for day <n> without unit (expressed in °C) | ||
Line 552: | Line 557: | ||
|forecast.temp.high.f.<n> | |forecast.temp.high.f.<n> | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted highest temperature for day <n> followed by "°F" | |colspan="2"|the forecasted highest temperature for day <n> followed by "°F" | ||
Line 559: | Line 563: | ||
|forecast.temp.high.f.<n>.nounit | |forecast.temp.high.f.<n>.nounit | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted highest temperature for day <n> without unit (expressed in °F) | |colspan="2"|the forecasted highest temperature for day <n> without unit (expressed in °F) | ||
Line 566: | Line 569: | ||
|forecast.condition.<n> | |forecast.condition.<n> | ||
− | |||
|value | |value | ||
|colspan="2"|the forecasted weather condition for day <n> (e.g. “SUNNY”) | |colspan="2"|the forecasted weather condition for day <n> (e.g. “SUNNY”) | ||
Line 579: | Line 581: | ||
|forecast.condition.<n>.label | |forecast.condition.<n>.label | ||
− | |||
|img | |img | ||
|colspan="2"|weather/<forecasted_condition_image> | |colspan="2"|weather/<forecasted_condition_image> | ||
Line 781: | Line 782: | ||
|} | |} | ||
− | === | + | == Release Notes == |
+ | === 3.8.0 === | ||
+ | *dynamic location settings are retained when the I/O Server is restarted | ||
+ | |||
+ | === 3.7.0 === | ||
+ | *data source changed from Yahoo to OpenWeatherMap | ||
+ | *increased number of forecasted days from 2 to 5 | ||
+ | *location can be set to latitude and longitude, as well as with the location id | ||
+ | |||
+ | === 3.5.1 === | ||
+ | *updated Yahoo API calls (new format required after March 15th, 2016) | ||
+ | |||
+ | === 3.4.0 === | ||
+ | *fixed Fahrenheit to Celsius conversion | ||
+ | |||
+ | === 3.1.1 === | ||
+ | *pressure datapoint added | ||
+ | |||
+ | === 3.1.0 === | ||
+ | *changed weather provider | ||
+ | *modified I/O Datapoints | ||
+ | *modified I/O Server options | ||
+ | |||
+ | === 3.0.1 === | ||
+ | *added weather object | ||
+ | === 3.0.0 === | ||
+ | *initial release | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | ''OpenWeatherMap is a registered trademark of OpenWeatherMap, Inc.'' |
Latest revision as of 16:11, 9 August 2021
This driver provides weather information and forecasts retrieved from OpenWeatherMap.
HSYCO Configuration
Add a WXONLINE I/O Server in the I/O Servers section of the Settings and set its parameters.
High Availability
- Shutdown when inactive: defaults to true.
Options
ID | Default | Values | Description |
---|---|---|---|
gui | true | true | enable support for the UI object and UISET actions |
false | disable UI support | ||
pollinterval | 10 | n >= 10 | the data acquisition interval, in minutes |
location | <id> or <lat>:<lon> | ID of the target location or coordinates | |
key | <key> | OpenWeatherMap API key |
The 'location' option is required. To obtain the ID of the desired location, look for it this list. Otherwise, you can specify the geographic coordinates of the location using the format "<latitude>:<longitude>" (e.g. "45.461001:9.183567"), with latitude and longitude expressed as decimal degrees.
The 'key' option can be obtained creating an account on OpenWeatherMap. If this option is not specified, a default API key will be used and the 'pollinterval' option wont't allow for values below 60.
Datapoints
ID | Value | R/W | Description |
---|---|---|---|
connection | online | R | connection established |
offline | R | HSYCO can't connect to the panel | |
location | <location> | R | the target location is set to <location> (e.g. “New York, NY, United States”) |
<id> or <lat>:<lon> |
W | set the location to the specified value | |
condition | <condition> | R | the current weather condition (refer to the conditions table for a complete list of possible values) |
condition.clear | 1 | R | the current condition is categorized as “clear” |
0 | R | the current condition is not categorized as “clear” | |
condition.precipitation | 1 | R | the current condition is categorized as “precipitation” |
0 | R | the current condition is not categorized as “precipitation” | |
condition.storm | 1 | R | the current condition is categorized as “storm” |
0 | R | the current condition is not categorized as “storm” | |
condition.partly_cloudy | 1 | R | the current condition is categorized as “partly cloudy” |
0 | R | the current condition is not categorized as "partly cloudy” | |
condition.low_visibility | 1 | R | the current condition is categorized as “low visibility” |
0 | R | the current condition is not categorized as “low visibility” | |
temp.c | <val> | R | the reported current temperature corresponds to <val> (expressed in °C) |
temp.f | <val> | R | the reported current temperature corresponds to <val> (expressed in °F) |
humidity | <val> | R | the reported current humidity percentage corresponds to <val> |
pressure | <val> | R | the reported current pressure in inches of mercury (inHg) corresponds to <val>. Multiply by 33.86389 to obtain the equivalent hPa value |
wind.speed | <val> | R | the reported current wind speed corresponds to <val> (expressed in Km/h) |
wind.dir | <val> | R | the reported current wind direction corresponds to <val> (expressed in degrees) |
forecast.day.<n>
(<n> = 1 ... 5) |
<day> | R | the week day identified by <n> corresponds to <day> (i.e. “mon”, "tue", "wed", ...) |
forecast.temp.low.c.<n> | <val> | R | the forecasted lowest temperature for day <n> is <val> (expressed in °C) |
forecast.temp.low.f.<n> | <val> | R | the forecasted lowest temperature for day <n> is <val> (expressed in °F) |
forecast.temp.high.c.<n> | <val> | R | the forecasted highest temperature for day <n> is <val> (expressed in °C) |
forecast.temp.high.f.<n> | <val> | R | the forecasted highest temperature for day <n> is <val> (expressed in °F) |
forecast.condition.<n> | <condition> | R | the forecasted weather condition for day <n> corresponds to <condition> (refer to the conditions table for a complete list of possible values) |
forecast.condition.clear.<n> | 1 | R | the forecasted condition for day <n> is categorized as "clear" |
0 | R | the forecasted condition for day <n> is not categorized as "clear" | |
forecast.condition.precipitation.<n> | 1 | R | the forecasted condition for day <n> is categorized as "precipitation" |
0 | R | the forecasted condition for day <n> is not categorized as "precipitation" | |
forecast.condition.storm.<n> | 1 | R | the forecasted condition for day <n> is categorized as "storm" |
0 | R | the forecasted condition for day <n> is not categorized as "storm" | |
forecast.condition.partly_cloudy.<n> | 1 | R | the forecasted condition for day <n> is categorized as "partly cloudy" |
0 | R | the forecasted condition for day <n> is not categorized as "partly cloudy" | |
forecast.condition.low_visibility.<n> | 1 | R | the forecasted condition for day <n> is categorized as "low visibility" |
0 | R | the forecasted condition for day <n> is not categorized as "low visibility" |
Conditions and categories
The following table shows the possible weather condition values and their categorization.
Categories are used to summarize relevant aspects of a specific condition so to simplify programming logic. The available categories are: clear (c), precipitation (p), storm (s), partly cloudy (pc), and low visibility (lv). For some conditions (e.g. “windy”) the categorization is not feasible; in such cases (denoted by "xx") the category datapoints will not be updated so to maintain the previous condition.
Condition | Categories |
---|---|
blowing_snow | p, lv |
blustery | xx |
clear_night | c |
cloudy | |
cold | xx |
drizzle | p |
dust | lv |
fair_day | pc |
fair_night | pc |
foggy | lv |
freezing_drizzle | p |
freezing_rain | p |
hail | p |
haze | lv |
heavy_snow | p,lv |
hot | c |
hurricane | p, s, lv |
isolated_thundershowers | p, s, lv |
isolated_thunderstorms | p, s, lv |
light_snow_showers | p, lv |
mixed_rain_hail | p |
mixed_rain_sleet | p |
mixed_rain_snow | p |
mixed_snow_sleet | p |
mostly_cloudy_day | |
mostly_cloudy_night | |
partly_cloudy | pc |
partly_cloudy_day | pc |
partly_cloudy_night | pc |
scattered_showers | p, lv |
scattered_snow_showers | p, lv |
scattered_thunderstorms | p, s, lv |
severe_thunderstorms | p, s, lv |
showers | p, lv |
sleet | p |
smoky | lv |
snow | p |
snow_flurries | p |
snow_showers | p, lv |
sunny | c |
thundershowers | p, s, lv |
thunderstorms | p, s, lv |
tornado | s |
tropical_storm | p, s, lv |
windy | xx |
unknown | xx |
User Interface
Weather Object
Shows a weather panel with current conditions and forecast.
Parameters
- id: the object's ID, used by UISets. Required
- position: the object's position. Use the pixels or rows and columns coordinates format
Syntax
(weather!<id> <position>)
E.g.
(weather!wx x10y20)
UISET Actions
ID | Attribute | Set to | |
---|---|---|---|
connection.label | visible | true | when datapoint connection = offline |
false | when datapoint connection = online | ||
location | value | the target location (e.g. “New York, NY, United States”) | |
temp.c | value | the reported current temperature followed by "°C" | |
temp.c.nounit | value | the reported current temperature without unit (expressed in °C) | |
temp.f | value | the reported current temperature followed by "°F" | |
temp.f.nounit | value | the reported current temperature without unit (expressed in °F) | |
humidity | value | the reported current humidity percentage | |
wind.speed | value | the reported current wind speed in Km/h | |
wind.speed | value | the reported current wind direction in degrees | |
forecast.day.<n>
(<n> = 1 ... 5) |
value | the week day identified by <n> (i.e. “Mon”, “Tue”, “Wed”, ...) | |
forecast.temp.low.c.<n> | value | the forecasted lowest temperature for day <n> followed by "°C" | |
forecast.temp.low.c.<n>.nounit | value | the forecasted lowest temperature for day <n> without unit (expressed in °C)
| |
forecast.temp.low.f.<n> | value | the forecasted lowest temperature for day <n> followed by "°F" | |
forecast.temp.low.f.<n>.nounit | value | the forecasted lowest temperature for day <n> without unit (expressed in °F) | |
forecast.temp.high.c.<n> | value | the forecasted highest temperature for day <n> followed by "°C" | |
forecast.temp.high.c.<n>.nounit | value | the forecasted highest temperature for day <n> without unit (expressed in °C)
| |
forecast.temp.high.f.<n> | value | the forecasted highest temperature for day <n> followed by "°F" | |
forecast.temp.high.f.<n>.nounit | value | the forecasted highest temperature for day <n> without unit (expressed in °F) | |
forecast.condition.<n> | value | the forecasted weather condition for day <n> (e.g. “SUNNY”) | |
condition.label | img | weather/<current_condition_image> | |
forecast.condition.<n>.label | img | weather/<forecasted_condition_image> |
Weather conditions images
The following table shows the mapping between each condition and the corresponding image.
To customize the images add a folder named "weather" inside the "img" folder of your project and add your images named accordingly to the table.
Release Notes
3.8.0
- dynamic location settings are retained when the I/O Server is restarted
3.7.0
- data source changed from Yahoo to OpenWeatherMap
- increased number of forecasted days from 2 to 5
- location can be set to latitude and longitude, as well as with the location id
3.5.1
- updated Yahoo API calls (new format required after March 15th, 2016)
3.4.0
- fixed Fahrenheit to Celsius conversion
3.1.1
- pressure datapoint added
3.1.0
- changed weather provider
- modified I/O Datapoints
- modified I/O Server options
3.0.1
- added weather object
3.0.0
- initial release
OpenWeatherMap is a registered trademark of OpenWeatherMap, Inc.