Weather Data Receiver¶
The open_weather_api
data receiver reads current weather data from the OpenWeather API.
- Example:
If we want to receive weather information, our configuration will look like:
{ "data_receiver": [ { "data_receiver_name": "weather_receiver0", "protocol": "open_weather_api", "connections": [ { "latitude": 42, "longitude": -31, "appid": "app_id_goes_here" } ], "streams": [ { "asset": "Weather", "stream_type": "climate" } ] } ] }
Configuration:
Required and optional properties that can be configured for an OPC UA receiver:
data_receiver_name: Unique name of the data receiver. This name will be used to track the progress state of the data stream.
protocol: Protocol to be used. Should be set to
open_weather_api
.connections: How to connect to the weather API. A connection has the following configurable settings:
latitude: Latitude of the location to get the weather for.
longitude: Longitude of the location to get the weather for.
appid: Authentication token given by Open Weather – look for it in your OpenWeather account page: https://home.openweathermap.org/api_keys
streams: List of data streams. Each input stream has the following configurable settings:
asset: Asset identifier.
stream_type: Type of data stream.
poll_interval: The number of seconds to wait between attempts to fetch new data from the weather server.