Weather Forecast Library

Introduction

With the Weather Forecast Library, current weather data and forecasts can be queried for any city by means of the “OpenWeatherMap” online service.

OpenWeatherMap is a service that provides an open API for weather data and forecasts.

Using “OpenWeatherMap” requires an API key (APPID) that you must be setup.

alternate text

Caution

To do this project, the steps outlined in the previous section Preparation have to be completed successfully.

Install API Library

To access the free Weather Forecast Library functions, you must install the Weather Forecast Library package and the IIoT Library with the CODESYS Installer.

The packages and associated datasheets are located on the CODESYS website store at

Click here- Weather App License

Click here- IIoT Library License

Project

The CODESYS example Weather project will be located at your install location, for example C:Users<User name>CODESYS ExamplesWeather Forecast Library .

The following project is a modified version of the example project and can be downloaded here API Weather project.

(1). With CODESYS IDE launched, click File > Project Archive > Extract Archive. Select all options in pop-up. Click “yes” on next pop-ups.

Update everything (including Library’s) to latest revisions. You may need to add a Library, e.g. Basic OSCAT.