# Tektelic

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

### **1. Create a new application server**

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2FVM4cpCmKuJePoMyD15F0%2Fmw1920_1.png?alt=media\&token=0a5d03b6-4d91-41e1-92b2-d6fc16524702)

### **2. Create new Custom Data Converter**

Encode function is generated automatically.

Decode function should be a valid Tektelic Decoder for one of our devices, for example the script from the [**Vicki Tektelic Decoder**](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/decoding-and-bacnet-object-mapping/vicki-uplink-decoder#tektelic-decoder-javascript-es5), which you need to copy over.&#x20;

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2F2318q7lixEcHTrVdcIxd%2Fmw1920_Screenshot_2021-05-12_at_16.55.47.png?alt=media\&token=b705e562-e0c1-430b-a77e-bf35125b2113)

### **3. Go to Manage Integrations**

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2F0HaVHdCipKC5sW5ZjSk3%2Fmw1920_Screenshot_2021-04-20_at_17.29.34.png?alt=media\&token=66a34160-be13-423f-a7b3-80eb6ec66a76)

### **4. Create new HTTP Integration**

* Fill the fields&#x20;
  * Type - should be **HTTP**
  * Data Converter - use the one you created - **MClimate Vicki**
  * Application address -  [lorawan-broker.mclimate.eu](https://lorawan-broker.mclimate.eu/)
  * port - **80**
  * Base path - **/tektelic**
* Copy token in the HTTP URL path.

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2F6S1j1vLg96bnIrPFJb1o%2FScreenshot%202023-02-20%20at%2014.23.51.png?alt=media\&token=e3ce52cd-357a-4a20-b4e9-fbf69e75ca3d)

* **Create MClimate token**
  * **Go to** [**https://developers.mclimate.eu/lorawan-token**](https://developers.mclimate.eu/lorawan-token) **and Sign in with your MClimate account.**
  * **Enter the Application server, AS\_ID - with token from HTTP URL path, and click Create.**

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2FE1xa9040rF78fqQR08A4%2FScreenshot%25202021-08-12%2520at%252014.13.19.png?alt=media\&token=97d44bfa-9760-4de7-b6f3-9114c8b84f66)

* **Copy the token**

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2F7wC5wzv2tYwwUj4lsWA3%2FScreenshot%25202021-08-12%2520at%252014.13.30.png?alt=media\&token=6616f4c5-87b8-43a9-bea5-ee5381e138ed)

* **Create Headers**
  * **1st header**
    * **Key - should be "mclimate\_token".**
    * **Value - Paste the token from developers portal.**
  * **2nd header**
    * **Key - should be "m-token".**
    * **Value - Paste the token from** [**MClimate Enterprise -> Integrations**](https://enterprise.mclimate.eu/integrations)

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2Fn7LcwXF0HHeyqpdkP4aW%2FScreenshot%202023-02-20%20at%2014.23.40.png?alt=media\&token=b5d2221f-e1a8-46b3-b3fb-77515700b62b)

### **5. Move device to Application**

![](https://3940008670-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McDr-jr9h3qA888r1Yp%2Fuploads%2FWixs5ZXhpCmAhZqqSAKP%2Fmw1920_7.png?alt=media\&token=a7b253e0-a69d-41b6-8f83-e894cd28c3d3)

### **6. Done**
