---
title: Getting information about air quality from Sensor Community
description: "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 ser"
---

[Skip to content](https://knowledgebase.grenton.com/en/gate-http-getting-information-about-air-quality-from-sensor-community#main-content)

- [English](https://knowledgebase.grenton.com/en/gate-http-getting-information-about-air-quality-from-sensor-community)
- [Polski](https://knowledgebase.grenton.com/pl/gate-http-pobieranie-danych-o-jakości-powietrza-z-sensor-community)

English

Show submenu for translations

[New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://knowledgebase.grenton.com/wsparcie?hsLang=en)

![Logo\_Grenton\_Main\_2020\_RGB\_v1.0-1.png\]](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_Main_2020_RGB_v1.0-1.png?width=200&height=94&name=Logo_Grenton_Main_2020_RGB_v1.0-1.png)

Open main navigation

Close main navigation

- - [English](https://knowledgebase.grenton.com/en/gate-http-getting-information-about-air-quality-from-sensor-community)
    - [Polski](https://knowledgebase.grenton.com/pl/gate-http-pobieranie-danych-o-jakości-powietrza-z-sensor-community)

  English
  
  Show submenu for translations
- [New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new)
- [Customer portal](https://knowledgebase.grenton.com/wsparcie)
- [Trainings](https://www.grenton.com/cooperation/trainings.html)

[Trainings](https://www.grenton.com/cooperation/trainings.html)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledgebase.grenton.com/en?hsLang=en)
2. [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en)
3. [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)

# Getting information about air quality from Sensor Community

**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](https://sensor.community/pl/)

According to the example on the website: [https://github.com/opendata-stuttgart/meta/wiki/EN-APIs](https://github.com/opendata-stuttgart/meta/wiki/EN-APIs), the API request might look like this: <https://airapi.airly.eu/v2/measurements/nearest?indexType=AIRLY_CAQI&lat=50.062006&lng=19.940984&maxDistanceKM=3>[https://data.sensor.community/airrohr/v1/sensor/](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](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:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167261142originalD76mQXnTJBwxqxWjpU0gGrxRPAoREcVitQ-1.png)
- Set the following parameters in the HttpRequest virtual object:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167993853originalCW3rxn79BmZX9kElw0mC7qju3kQkCjaRXA-1.png)  
  where:  
  **Host:** [https://data.sensor.community](https://data.sensor.community)  
  **Path:** /airrohr/v1/sensor/61982/

- Create another HttpRequest virtual object and set its parameters as follows:
  
  ![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/35167993871/original/kXDHDLVjGZ-uPW86o8hcgQgbC-FECPYg_g.png?1655982275)
  
  where:  
  **Host:** [https://data.sensor.community](https://data.sensor.community)  
  **Path:** /airrohr/v1/sensor/61983/
- In the next step, create user features of the *number* type:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167261584originalq9JdFYuZZt_GdpzTUilD3RFVGx5XIEoCHQ-1.png)
- Then prepare a script called *resp\_dust*:
  
  ```
  if(Gate_HTTP->sensor_dust->StatusCode==200) then
  
    local resp = Gate_HTTP->sensor_dust->ResponseBody
    Gate_HTTP->PM10 = resp[1].sensordatavalues[1].value
    Gate_HTTP->PM2 = resp[1].sensordatavalues[2].value
    
  end
  ```
  
   
- Assign the script to the **OnResponse** event in the HttpRequest virtual object named *sensor\_dust*:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167261837originalb6HitiIwtkVj9gR9NyvQOb7WKRHGjqNlKw-1.png)
- Then prepare a script called *resp\_air*:
  
  ```
  if(Gate_HTTP->sensor_air->StatusCode==200) then
  
    local resp = Gate_HTTP->sensor_air->ResponseBody
    Gate_HTTP->sens_temp = resp[1].sensordatavalues[1].value
    Gate_HTTP->sens_pressure = resp[1].sensordatavalues[2].value/100
    Gate_HTTP->sens_humidity = resp[1].sensordatavalues[3].value
    
  end
  ```
- Assign the script to the **OnResponse** event in the HttpRequest virtual object named *sensor\_air*:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167262144originalOzK25mnOh4HM3zu46I53w1Jp3OGCKHA57Q-1.png)

- 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:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167994290originalKIeLeICTS3lfszwrs9HAiayhofbgvhhPPw-1.png)
- For comparison - responses to requests sent via the browser:  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167994329originalwq27eCMCRch8RVgr8rmA-MNovCQh0TPuhA-1.png)  
  ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35167994382original5ouqLDzOJjCndsYESzMSDbIAoTEuDpMvgQ-1.png)
- The obtained data can be displayed in the mobile application, on the Smart Panel or used to create logic in the system.

[pdf (210 KB) ![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/support.grenton.plensupportsolutionsarticles35000201251-gate-http-getting-information-about-air-quality-from-sensor-communityhit-1.gif)](https://knowledgebase.grenton.com/hubfs/HTTP_SC_ang.pdf?hsLang=en)

- [Installation guidelines](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#main-content)

    - [How to Prepare Electrical Installation](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#how-to-prepare-electrical-installation)
- [Reference devices](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#main-content)

    - [Integrated Device](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#integrated-device)
- [Most Common Mistakes](https://knowledgebase.grenton.com/en/most-common-mistakes?hsLang=en)
- [Electrical Installation](https://knowledgebase.grenton.com/en/electrical-installation?hsLang=en)
- [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en#main-content)

    - [Gate Modbus](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-modbus)
    - [Training](https://knowledgebase.grenton.com/en/manuals?hsLang=en#training)
    - [SW Applications](https://knowledgebase.grenton.com/en/manuals?hsLang=en#sw-applications)
    - [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)
    - [Smart Panel](https://knowledgebase.grenton.com/en/manuals?hsLang=en#smart-panel)
    - [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)
    - [myGrenton interfaces](https://knowledgebase.grenton.com/en/manuals?hsLang=en#mygrenton-interfaces)
    - [Virtual Objects](https://knowledgebase.grenton.com/en/manuals?hsLang=en#virtual-objects)
    - [Gate Alarm](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-alarm)
- [Intercom](https://knowledgebase.grenton.com/en/intercom?hsLang=en)
- [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#main-content)

    - [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#faq)
    - [About Grenton](https://knowledgebase.grenton.com/en/faq?hsLang=en#about-grenton)
- [Price list and documents](https://knowledgebase.grenton.com/en/price-list-and-documents?hsLang=en)

[![Grenton logo](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png?width=400&height=100&name=Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png "Grenton logo")](http://grenton.com)

<https://www.facebook.com/grenton.smart.home> <https://www.instagram.com/grenton_smart_home/> <https://www.youtube.com/channel/UCFNNI-dgO1cm81kCrSr1bzg> <https://www.linkedin.com/company/grenton>

Copyright © 2026, Grenton Sp.z o.o.