Note! The following instruction is dedicated for the second generation of HTTP Gate module (FW: 1.1.11-2218B)!
If we want to use information about air quality in the system, we may use an external service for this purpose e.g.: https://sensor.community
According to the example on the website: https://github.com/opendata-stuttgart/meta/wiki/EN-APIs, the API request might look like this: https://data.sensor.community/airrohr/v1/sensor/apiID/
where: apiID it is a sensor marking visible after selecting it on the map: https://maps.sensor.community/#3/40.00/15.00
Below we describe how you can easily obtain this information from two different sensors:
- Create the HttpRequest virtual object:
- Set the following parameters in the HttpRequest virtual object:
- Send the configuration to the CLU.
- After sending the configuration, in both objects call the SendRequest method.
- After calling the script, the StatusCode feature in both objects should get the value of 200.
- User feature values should get the appropriate values:
- For comparison - responses to requests sent via the browser:
- The obtained data can be displayed in the mobile application, on the Smart Panel or used to create logic in the system.