With Axon Ivy's SRF weather data API, you can integrate weather forecasts for Switzerland into your process data.
The connector:
- provides various weather data
- visualize the weather data as seven day forecast
- supports you with a demo implementation to reduce your integration effort.
Install the SRF Weather Connector and call it as a sub-process. Adjust the mapping accordingly.
For testing purposes, a mock API can be used in the demo instead of the official SRF API. For this purpose, the variable "Url" can be commented out under 'Variables.SrfWeatherConnector'. This way you can avoid the need to generate an access token via the SRF Developer website first. In this mock mode, only the ZIP code "6300" must be entered in the "zip" field.
In the demo, you can now specify either the name of the location or its ZIP code and use the "Get Weather" button to output the weather for the next seven days at this location.
If the location is valid, the corresponding output looks like this:
The use of the SRF Weather API is not free of charge. For development purposes there is a free version with minimal API calls. To use the connector, you must select a suitable API package via the SRF API Developer website and generate a "bearer token". This is described in the following instructions: SRF instruction
After a Bearer Token is available, you can store it in your project in the variables.yaml as the variable "srfWeatherConnector.Token" (as you can see in the Demo).
- Register an account on developer.srgssr.ch/.
- Once logged in, click Apps on the top right and add a new app with the "+ ADD APP" button.
- After the app is created, you will receive a Consumer Key and Consumer Secret with which you can generate the Bearer Token.
- Store the API-Key/Token in your variables.yaml under
Variables.SrfWeatherConnector.Token
@variables.yaml@