# Loriot

## **Connecting Loriot to MClimate’s LoRaWAN broker**

### **1. O**nce you have created application, click on Access Tokens

![](/files/aIj7j7RyTe9e7UTzPCux)

### **2. Copy your access token**

![](/files/dRBIdAj5kpeWQA75CaIa)

### **3. Go to Output and add new output**

![](/files/0Eea1dAgd5kg2E8Yw5pg)

### **4. Click on HTTP Push and fill the fields**

* Target URL  - **<https://lorawan-broker.mclimate.eu/loriot?m-token={get> your M Token from** [**MClimate Enterprite->Integrations**](https://enterprise.mclimate.eu/integrations)**}**
* Authorization header value - **your access token**

![](/files/B6kV51g2flwGBXmoVS3Q)

### **5. Done**

![](/files/lgrrNAEmw62jSrzhw2ZQ)

## Advance configuration for downlink queue flushing

This configuration step is not mandatory, it is only required if you want Mclimate Enterprise to take care of flushing your LNS (Loriot) downlink queue.

### 1. API Key

Go to the ACCOUNT -> API Keys section and "Generate new API key".

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

Copy the key as it will be hidden once you leave the page and you will need it later on.

<figure><img src="/files/0X4rYJ5A6fToRTHANIul" alt=""><figcaption></figcaption></figure>

### 2. HTTP Output

You need to edit the existing HTTP output (the one you created for the basic Integration setup).

Go back to APPLICATIONS - > "Your Application" -> Manage Outputs.

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

Click on the HTTP output (you should have one created from the previous step). Edit the fields as follow:

**Name** -> *leave as is or change to your liking*

**Target URL for POSTs** -> *"the url of your Loriot instance" (see image below)*

**"Authorization" header value (Optional**) -> *"the application access token (point 1 of the basic configuration) "*

**Custom header name (Optional)** -> *"m-token" (liberally the text "m-token")*

**Custom header value (Optional)** -> *"value of the m-token" (you can use the one from the previous step or create a new one)*

Accept the changes and move to the next step.

### 3. MClimate Integration

You will need tour Loriot Application ID for this step, you can copy it over from the APPLICATION page.

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

Head to <https://enterprise.mclimate.eu/integrations> and create a Lorio integration (you need to scroll to the bottom of the page if you have many m-tokens created).

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

Insert the values in the field as follows:

**Token** -> *the value of your m-token*

**URL** -> *"the url of your Loriot instance"*

**API Key** -> *"the API Key you created"*

**App ID** -> *"the ID of your Loriot Application"*

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

Your configuration should look something like the image below.

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

Save the and your are done.


---

# 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.mclimate.eu/mclimate-lorawan-devices/integrations/loriot.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.
