# Kontakt.io

### BuildingPro Suites App for Kontakt.io - Digital Building Solutions

*Kontakt.io* manufactures smart IoT devices, cloud solutions, and powerful APIs that help transform buildings into indoor spaces that are useful to people in their daily journey to achieve their goals, at work or being cared for in a safe and sustainable indoor environment.

### Installation

The *Kontakt.io* app can be installed via the BuildingPro Suites App Store.

### Assets

*Kontakt.io* automatically creates all necessary asset types and assets (CAC) that are accessible via the configured endpoints. The following asset types are created:

* *Tag*: Any type of BLE smart tag that specifies the location.
* *Badge*: A Smart Badge or Asset Tag 2 that specifies the location like a tag, but has a temperature sensor and two buttons (not yet implemented).
* *Beacon*: Beacons capture the locations of the tags and badges and provide information on air quality.
* *Portal Beam*: Like beacons, but also counts the number of people in the room.

The following attributes are defined:

<table><thead><tr><th width="224">Attribute</th><th width="157">Description</th><th width="40">Tag</th><th>Badge</th><th>Beacon</th><th>Portal Beam</th><th>Filterable</th></tr></thead><tbody><tr><td><code>position</code></td><td>Position</td><td>x</td><td>x</td><td></td><td></td><td></td></tr><tr><td><code>temperature</code></td><td>Temperature</td><td></td><td>x</td><td>x</td><td>x</td><td></td></tr><tr><td><code>air_pressure</code></td><td>Air pressure</td><td></td><td></td><td>x</td><td>x</td><td></td></tr><tr><td><code>humidity</code></td><td>Humidity</td><td></td><td></td><td>x</td><td>x</td><td></td></tr><tr><td><code>light_intensity</code></td><td>Light intensity</td><td></td><td></td><td>x</td><td>x</td><td></td></tr><tr><td><code>air_quality</code></td><td>Air quality</td><td></td><td></td><td>x</td><td>x</td><td></td></tr><tr><td><code>people_count</code></td><td>People count</td><td></td><td></td><td></td><td>x</td><td></td></tr><tr><td><code>firmware</code></td><td>Firmware version</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td><code>model</code></td><td>Model of the device</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td><code>battery_level</code></td><td>Battery level</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td><code>product</code></td><td>Product name</td><td></td><td></td><td></td><td></td><td>x</td></tr><tr><td><code>name</code></td><td>Name in Kontakt.io</td><td></td><td></td><td></td><td></td><td>x</td></tr></tbody></table>

### Dashboards

*Kontakt.io* offers a dashboard with all automatically created assets. This can be automatically created via the BuildingPro Suites Frontend `Copy Dashboard > Kontakt.io` and then customized as desired.

<figure><img src="https://3489494878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9GvUpaatBiReR43XFSMg%2Fuploads%2FMJgv3ypiNJuzL8XPT0oL%2Fimage.png?alt=media&#x26;token=ff4a1243-37d1-4bc6-9e07-09b806a1a093" alt=""><figcaption></figcaption></figure>

### Configuration

{% hint style="info" %}
You can find more information on app configuration [↗ here](https://doc.eliona.io/collection/dokumentation/einstellungen/apps).
{% endhint %}

The *Kontakt.io* app is configured by defining one or more API tokens. Each configuration requires the following data:

| Attribute         | Description                                                                                                                                                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiKey`          | API Key                                                                                                                                                                                                                                                                         |
| `enable`          | Flag to enable or disable fetching from this API                                                                                                                                                                                                                                |
| `refreshInterval` | Interval in seconds for collecting data from the API                                                                                                                                                                                                                            |
| `requestTimeout`  | API query timeout in seconds                                                                                                                                                                                                                                                    |
| `assetFilter`     | Filter for asset creation, more details can be found in the app's README                                                                                                                                                                                                        |
| `tenantIDs`       | List of BuildingPro Suites tenant ids for which this device should collect data. For each tenant id, all smart devices are automatically created as an asset in BuildingPro Suites. The mapping between BuildingPro Suites is stored as an asset mapping in the Kontakt.io app. |

The configuration is done via a corresponding JSON structure. As an example, the following JSON structure can be used to define an endpoint:

```json
{
"apiKey": "VGhlIGNvbmZpZ3VyYXRpb24gaXMgZG9uZSB2",
"enable": true,
"refreshInterval": 60,
"requestTimeout": 120,
"assetFilter": [
[{ "parameter": "Product", "regex": ".Tag." }, { "parameter": "Product", "regex": ".Beacon." }],
[{ "parameter": "Mac", "regex": "(70:82:0E:12:28:CC|70:56:06:12:.*)" }],
[{ "parameter": "Name", "regex": ".Lobby." }]
],
"tenantIDs": [
"99"
]
}
```

Endpoints can be created with this structure in BuildingPro Suites under `Apps > Kontakt.io > Settings`. To do this, select the endpoint /configs with the PUT method.

### Height Settings for Floors

Since the *Kontakt.io* system refers to rooms rather than 3D coordinates of tags, the app must internally convert between the two systems to display assets on the map and in the BIM model in BuildingPro Suites. To do this, the app must know the height above the floor of each floor (the Z coordinate).

To facilitate this setting, the app retrieves all floors set up in the *Kontakt.io* system and displays them in a widget on the dashboard. Here, the user can set the heights of the floors that the app should use from that moment on.

<figure><img src="https://3489494878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9GvUpaatBiReR43XFSMg%2Fuploads%2FO5SXmSt5MKyfHcz2Oe0V%2Fimage.png?alt=media&#x26;token=2664db21-e45d-4e67-ba68-04c4ee5b5109" alt=""><figcaption></figcaption></figure>

Once the heights are set, the widget can be removed. For later changes, the Asset Management section can be used.
