# How to integrate the IAQ Kit with Actility on akenza

{% hint style="success" %}
**The IAQ Kit contains**:

* 1x IAQ Sensor AM103
* 1x IAQ Sensor AM103L
* 1x IAQ Sensor AM319
* 1x IAQ Sensor AM307
* 1x LoRaWAN Gateway UG65

**Application examples**:

* Ambient monitoring (all sensors)
* Prevent the buildup of mold in infrequently used rooms (all sensors)
* Monitoring of TVOC and CO2 levels eg. for Covid prevention (AM319 and AM307)

\
**Product Features**:

* Screen-, traffic light indicator, and sleep mode to save battery power(AM319 and AM307)
* Anti-Theft design (AM103 and AM103L)
* Acoustic alert (AM319 and AM307)
* Easy NFC-Configuration (all sensors)

**You can purchase the Milesight IAQ Kit in the** [**ThingPark marketplace**](https://market.thingpark.com/milesight-iaq-kit.html) **of Actility.**
{% endhint %}

In this tutorial, you will learn how to connect the **Milesight IAQ Kit** to akenza. You will achieve the following:

1. Integrating your Actility account to your akenza environment
2. Creating Data Flows and Milesight devices on akenza
3. Creating your individual dashboard for data visualization

### 1. Getting started

To get started with akenza, follow [these steps](https://docs.akenza.io/how-to-create-a-working-environment) in order to set up your environment.

### 2. Add an Actility Integration on akenza

{% hint style="info" %}
In order to proceed with the Actility integration on akenza, make sure to create a [ThingPark community account](https://community.thingpark.org/index.php/sign-up-tpcp/) and pre-commission the Milesight gateway to it as described [here](https://docs.thingpark.com/thingpark-enterprise/7.2/Content/BS-installation-guides/Provision-base-station.htm?tocpath=Using%20ThingPark%20Enterprise%7CManaging%20your%20radio%20access%20network%7CProvisioning%20the%20base%20station%20on%20ThingPark%20GUI%7C_____0). Follow this [link](https://docs.thingpark.com/thingpark-enterprise/7.2/Content/BS-installation-guides/Install-ThingPark-image.htm?tocpath=Using%20ThingPark%20Enterprise%7CManaging%20your%20radio%20access%20network%7CInstalling%20the%20ThingPark%20image%20on%20your%20base%20station%7C_____0) if you need to install Actility's firmware on the gateway.
{% endhint %}

The integration of Actility will be used to **connect**, **synchronize** and **manage** Assets on akenza. Start with the integration of your Actility account by adding your credentials on the Actility tab within *Integrations*. More details about Integrations (for ThingPark Enterprise only) can be found [here](https://www.actility.com/enterprise-iot-connectivity-solutions/).&#x20;

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2F5opkFDSIRj0MLJU9Ho7v%2Fscreely-1673515520577.png?alt=media&#x26;token=393bf651-9341-4c7f-88b9-d6ea6cc95a2a" alt=""><figcaption><p>Connectivity Integration Setup</p></figcaption></figure>

If you use the community instance of ThingPark, the required Profile ID is ***community-api***. To find the Profile ID please check out the Actility API documentation of your account. See the example [here](https://community.thingpark.io/thingpark/dx/core/latest/swagger-ui/index.html?shortUrl=tpdx-core-tpe-api-contract.yaml).

After successful integration, the Actility-account-integration gets displayed on the Connectivity Integration Overview.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FHxRDECrCyXghq2CHBVm0%2Fscreely-1673515615885.png?alt=media&#x26;token=dd25c967-0595-40b6-a14a-27082d3f5773" alt=""><figcaption><p>Connectivity Integration of Actility</p></figcaption></figure>

### 3. Create Dataflow

As a next step, go to *Data Flows* in your Workspace and choose as device connector *LoRa* and consequently, the Actility integration you have done in step 2. For data parsing continue with the selection in *Device Types* of your specific Milesight device. As an output connector, select the *akenza database*. This will store the data on akenza and allows further use on the dashboard composer. More about Data Flows can be checked [here](https://docs.akenza.io/akenza.io/get-started/your-data-flow).

{% hint style="info" %}
Data Flows consist of a **device connector**, a **device type,** and an **output connector** and define how device data are processed on akenza.
{% endhint %}

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2Fd9zZXM8Kr1bDnvkMTlTb%2Fscreely-1670513470606.png?alt=media&#x26;token=ee897a8a-fcdd-46d4-90b5-e39057eb95b3" alt=""><figcaption><p>Create Data Flow</p></figcaption></figure>

Once all specific Data Flows are created for your devices, continue with the creation of your devices.

### 4. Create Assets

To add a device to your environment, select *+Create Device* in the tab of *Assets* and fill in the required device parameters. By assigning the appropriate Data Flow, your device will be automatically registered and connected to your Actility account.&#x20;

Upon a join request, the device will turn online. Incoming data are displayed in *Message Logs* and also on the *Data Overview* of your device detail page.&#x20;

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2F2peyXz6CvIYLena5n5Hf%2Fscreely-1669828565586.png?alt=media&#x26;token=2b5ca127-b251-48c6-88ac-e16211ad6bc5" alt=""><figcaption><p>Device Detail Page of AM103</p></figcaption></figure>

{% hint style="warning" %}
Currently, all devices are created with a **generic LoRa device profile**. Do not do any changes on the Actility account.
{% endhint %}

### 5. Visualize IoT data with akenza's dashboard composer

In order to visualize your data with the dashboard composer, switch to the dashboard composer by selecting *Dashboard* in the side navigation. You will get redirected to the dashboard overview. Select *Create a Dashboard* and start adding the Widgets of your choice.

By adding the component *Chart*, the Source Tab allows to select the device of your choice and its data points. Customize the dashboard to your liking.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FllFJHbYFGex6kZPDmaS2%2Fscreely-1670495533556.png?alt=media&#x26;token=f4c5ab32-44af-4803-91c3-c4e93778fbe9" alt=""><figcaption><p>Add Chart component</p></figcaption></figure>

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FTglZvxt44ROULJE7DKbj%2Fscreely-1674225516938.png?alt=media&#x26;token=8dc2fdeb-51a5-458c-bc20-5c3b0824f7a5" alt=""><figcaption><p>Fullscreen view of an example dashboard</p></figcaption></figure>

{% hint style="info" %}
**Optional**

Try out other akenza features such as the rule engine. The rule engine allows you to apply a business logic to your infrastructure. E.g. inform your teammates about certain conditions by using MS-Teams as notification service. Check out more [here](https://docs.akenza.io/akenza.io/tutorials/create-notifications/how-to-send-notifications-to-microsoft-teams).&#x20;
{% endhint %}

{% hint style="success" %}
**Support**

Reach out to us if you need any further support:

* [Actility](https://support.thingpark.org/portal/en/community/recent)
* [Akenza](https://akenza.atlassian.net/servicedesk/customer/portal/4/group/-1)
* Milesight
  * <iot.support@milesight.com>
  * [Technical Support Guidance](https://support.milesight-iot.com/support/solutions/articles/73000514218-milesight-iot-technical-support-guidance)
    {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akenza.io/akenza.io/tutorials/iot-starter-kits/how-to-integrate-the-iaq-kit-with-actility-on-akenza.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
