Overview OpenWeather - Internet Weather

With this function block, a simple weather forecast can be integrated. This block is connected to the control element Internet Weather.

Important

  • If this function block is used, the controller must necessarily have a connection to the internet and be able to resolve the domain. Without an internet connection or with an unreachable DNS server, the watchdog may trigger under certain circumstances and the controller is restarted.
  • An update of the weather data cannot be interrupted. If a query is active and there is no internet connection or the domain name cannot be resolved, loading the project may not be possible under certain circumstances; in this case the end of the query or timeout must be waited for.
  • This block should not be used for control tasks such as heating control, as the data for this is far too inaccurate.
  • The controller must be able to access the internet permanently in order to retrieve the data. Switching off the internet connection, for example overnight or during absence, may under certain circumstances lead to a triggering of the controller's watchdog.
  • The data of the service can be very inaccurate in some areas.
  • OpenWeatherMap is used as the service, see https://openweathermap.org/. To be able to use the service, an account must be created; in the account you receive an API key which must be entered in this function block. No guarantee can be given for the future  availability of the service or the correctness of the weather data.



Inputs




Outputs

KF
Query error
Communication error when the data could not be retrieved.
TP
Temperature
Temperature in °C
LF
Humidity
Relative humidity in percent
LD
Air pressure hPa
Air pressure in hPa
WK
Wind km/h
Wind in km/h
BW
Cloud cover
Cloud cover in %
Rain Rain
1 when rain
ID ID
Weather condition as ID, see Openweathermap Weather condition codes
GR ID group ID as group, see Openweathermap Weather condition codes

When an ID of 500 to 531 is output, category rain, 5 is output at this output. This provides the distinction between rain, storm etc.

Parameters

Longitude
Longitude in decimal degrees
Latitude
Latitude in decimal degrees
Update
Update interval. OpenWeatherMap provides the weather data in the free account only every 3 hours; a smaller interval therefore does not bring higher accuracy in the free variant.
API key API key that is generated during registration.

List of IDs.

For a current description, see Openweathermap Weather condition codes.











See also common parameters of all function blocks.