# Integrate a MClimate Vicki LoRaWAN  Radiator Thermostat on akenza

<figure><img src="/files/7MM8cUUJy6gH0sKjre0r" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Applications**:

* Comfortable adjustment of radiator heaters
* Retrofit manually operated thermostats
* Save energy by turning the temperature down during absences

**Product features**:&#x20;

* Mountable on the majority of radiator valves, adapters available
* Non-technical usage with the mobile app
* Mobile app or enterprise platform can manage multiple thermostats
* Ability to manage schedules, child lock, open window detection

You will find more information about the MClimate Vicki LoRaWAN thermostat [here](https://www.mclimate.eu).
{% endhint %}

### How it works

The MClimate Vicki LoRaWAN thermostat requires a connection over a LoRaWAN network. The network server can be configured to forward all data coming from the device to the MClimate service. A mobile app and an enterprise solution can then be used to claim a device registered on the network. Several thermostats can then be controlled and observed in a simple manner using a mobile phone or a computer.

Registering a Vicki LoRaWAN thermostat on akenza brings freedom to use the LoRaWAN network provider of choice. Currently, the following networks are tested and supported:

| Network managed by akenza | Supported |
| ------------------------- | --------- |
| Swisscom LPN              | yes       |
| Loriot                    | yes       |
| TTN                       | yes       |

### 1. Preparations

First, check the [MClimate documentation for the right adapter](https://compatibility-tool.mclimate.eu/) for your heater and get it ready.

For this integration two keys are needed: The token to authenticate with the MClimate broker for uplinks and another key to authenticate with the akenza platform for downlinks:

1. Token to authenticate uplinks **on the MClimate broker**:\
   Open the MClimate Enterprise Platform: <https://enterprise.mclimate.eu/>\
   Signup on the platform if you don't have an account already.\
   Click on the menu entry *Integrations*.\
   Create a new token by clicking on "create a new M Token" and give it a name.\
   This token will be needed in step 2.
2. API key to authenticate downlinks coming from the MClimate broker **on the akenza platform**:\
   Open the akenza platform. In the left menu, select *Organisation* and then *API Keys*.\
   Create a new API key and give it at least Data Flow permissions.

### 2. Create a Data Flow

Select a workspace and go to *Data Flow* in the left-side menu and select *Create Data Flow*. As we have a LoRa device, select LoRa as a **device connector.**

<figure><img src="/files/05Q3HqmZ6rtYGmPOyCsL" alt=""><figcaption></figcaption></figure>

Make use of the [**Connectivity-as-a-Service**](/akenza.io/get-started/your-data-flow/device-connector/lorawan/your-integration.md#connectivity-as-a-service) (CaaS) that akenza offers. Therefore you do not need to have a connectivity account from a network provider. You simply connect your LoRa device to a network provider which is then managed from akenza. Select *Actility Swisscom -> Swisscom LPN*, *The Things Stack -> The Things Network* or *Loriot* -> Loriot.

**Device Type**

Use the search field to search for ***Vicki*** in the Device Type library, Select Vicki (MClimate).&#x20;

**Output Connector 1: Akenza Database**

Choose *akenza Database* as the first output connector to store the measurements and settings data coming from Vicki in the internal database on the platform.\
Click on the **filter** icon and select the topic **default**. This results in the topic default being saved into the akenza Database. The default topic contains the decoded data from the Vicki.

<figure><img src="/files/474EDogg23noPIdLCBAQ" alt=""><figcaption></figcaption></figure>

**Output Connector 2: Webhook**

Add another output connector and choose **Webhook** from the list.\
Give the webhook a name, e.g., 'MClimate'.

As the URL, enter <https://lorawan-broker.mclimate.eu/akenza>

Method: POST

Headers: *m-token* ("key" field) and the token previously generated in MClimate Enterprise.

Content Type: JSON

Auth Type: Headers

Auth headers: `api-key` and the akenza API Key previously generated.

Press **Save Connector.**

<figure><img src="/files/H6189p1xVLIpMeeTQpcP" alt=""><figcaption></figcaption></figure>

Not all data needs to be forwarded to MClimate, so click the filter icon on the webhook connector and select the topic **raw\_payload**.

<figure><img src="/files/ImS48eWAXKXiDjYMoijD" alt=""><figcaption><p>Output connector webhook to MClimate</p></figcaption></figure>

Press **Save Data Flow**.

### 3. Create the device

To create a new device, select *Create Device* in the **Asset Inventory**.

Add a device name and choose the Data Flow of the Vicki that you just have created. Add a description or tags to your liking.

<figure><img src="/files/CWiDInRQN6XxFjR5mhCP" alt=""><figcaption></figcaption></figure>

Choose the data flow just created to assign the device to it and select *Next*.

<figure><img src="/files/RtUUzi7HF5XlQs9sAetW" alt=""><figcaption></figcaption></figure>

Fill in the LoRaWAN keys of the Vicki thermostat and the additional parameters. The keys are supplied by the manufacturer of the device.

<figure><img src="/files/K0iIrfmBvI6xnwFFcmq5" alt=""><figcaption></figcaption></figure>

Once created, the Vicki thermostat appears in the assets list.

Make the Vicki thermostat join the network now by inserting or shortly removing and reinserting the batteries. Attach it to your heater. Refer to the MClimate documentation on how to fit it to your specific heater. An adapter might be needed.

Click on the device to check the connection status and the measurement values it transmits. It might be necessary to wait 10-20min until the device transmits some data.

<figure><img src="/files/cLRcDMNYG2od0rRYfFF3" alt=""><figcaption></figcaption></figure>

### 4. Use the MClimate Enterprise platform and the mobile app

The Vicki is now sending data to the MClimate Enterprise platform. You can now add the Vicki to the Enterprise platform to check the device status and to configure it.

Refer to the MClimate Enterprise platform [documentation](https://docs.mclimate.eu/mclimate-enterprise/adding-devices-to-your-account) on how to register a device there.

Once registered, the device will be available to be read and controlled remotely using the platform or the mobile app.

Congratulations, you have now integrated the MClimate Vicki LoRaWAN thermostat with the connectivity of your choice on the akenza platform. Time to adjust your heaters and save some energy.

### 5. Using the Vicki

* The temperature can be adjusted manually by rotating the thermostat. The new set target temperature will be transmitted to the akenza platform and the MClimate Enterprise platform when the next uplink happens.
* The target temperature can be adjusted in the MClimate Enterprise platform by either entering a manual temperature value or by adding a schedule for automatic adjustment of the temperature.
* The target temperature can also be adjusted in the mobile app.

**Keep in mind:**

* Adjustments from the app or enterprise platform can take 10-20 minutes to take effect. This is because downlinks are only processed when the Vicki is sending data.
* When adjusting manually on the thermostat, changes can take a few minutes to show up in the app or on the enterprise platform.

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

* MClimate compatibility tool: <https://compatibility-tool.mclimate.eu/>
* MClimate Enterprise platform: <https://enterprise.mclimate.eu/>
  {% 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/add-devices/integrate-the-mclimate-vicki-thermostat.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.
