# ROOMZ

### Overview

This manual contains instructions for the installation, configuration, and use of the ROOMZ app for data acquisition from ROOMZ sensors.

### Installation

Install the ROOMZ app from the BuildingPro Suites App Store.

### Configuration

Register the app in ROOMZ and then configure the ROOMZ app via the BuildingPro Suites settings.

#### Registering the App in the ROOMZ Portal

The ROOMZ app uses an experimental [Webhook API](https://github.com/roomz-io/openapi) that is not yet generally available. Contact ROOMZ support to activate the sending of data and to receive a webhook secret. The webhook endpoint for your BuildingPro Suites instance is: `https://{your-eliona-instance}/apps-public/roomz/webhook`.

> Since the webhook endpoint must be accessible via the internet, all incoming data is verified using the ROOMZ signature. For verification, ROOMZ must provide a webhook secret and a public key to check the signature.

#### Configuring the ROOMZ App

Configure the app in BuildingPro Suites by navigating to `Apps > ROOMZ > Settings`, which opens the app's [Generic Frontend](https://doc.eliona.io/collection/v/eliona-english/manuals/settings/apps). Use the POST method to set up the configuration. Each configuration requires the following parameters:

| Attribute   | Description                                                |
| ----------- | ---------------------------------------------------------- |
| `secret`    | Webhook secret provided by ROOMZ.                          |
| `enable`    | Flag to activate or deactivate this configuration.         |
| `tenantIDs` | List of BuildingPro Suites tenant IDs for data collection. |

Example configuration JSON:

```json
{
  "secret": "some-webhook-secret",
  "enable": true,
  "tenantIDs": [
    "10"
  ]
}
```

### Continuous Asset Creation

After configuration, the app listens for data updates from ROOMZ. Each time the presence status changes (someone enters or leaves a room), the app receives a message from ROOMZ and writes the data to BuildingPro Suites.

The app automatically creates all assets for the monitored rooms - When the app receives data from a sensor for the first time, it creates a new asset under the "ROOMZ root" asset. The asset is named after the room ID (the only information provided by the ROOMZ API), but it can be renamed and moved by the user.

The user who created or last updated the app's configuration is notified of newly created assets.
