Weather API Consumption

This Application Template is a weather station that temporarily monitors the weather of a location with information provided by the OpenWeather API. The data is requested periodically through the Weather Grabber WORKFLOW and stored in the Weather DEVICE. These recorded data are then presented on the Weather Station DASHBOARD.

Key Components

This template provides an example of the following:

  • DEVICE Weather: In this application, the device is responsible for storing the weather data obtained by the workflow and serves as a reference for the blocks on the dashboard;
  • WORKFLOW Weather Grabber: This is the part that makes the HTTP request and informs the received data to the attributes of the Weather DEVICE. It communicates with the API through the NODE “Fetch data”. The service link containing the access key and the location to be monitored is provided in this node. These values are stored in global variables that can be easily changed at any time. Pay attention to the “Configuration” section to learn how to change them. Must be enabled by the user;
  • DASHBOARD Weather Station: It is on the dashboard that the information received by the workflow will be presented. Each block needs to reference the corresponding attribute of the device. For example, to show the temperature, the block needs to reference the temp attribute;

Weather API Consumption Template Preview

Usage

This template contains a README that provides instructions and guidance on the template implementation.

To create an application from this template:

  1. Navigate to the New Application page.
  2. Select the Weather API Consumption Template.

You can also import this template from the GitHub repository.

Resources

For more information, see:

Was this page helpful?


Still looking for help? You can also search the WEGnology Forums or submit your question there.