> For the complete documentation index, see [llms.txt](https://docs.jcore.io/clarity-gateway/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jcore.io/clarity-gateway/connections/mqtt/sending-values-to-mqtt.md).

# Sending values to MQTT

In this example we'll configure Clarity Gateway to send the value of an Iron Pi analog input to an MQTT connection.

## Bulk mapping via the channels table

In the page for your MQTT connection, scroll down to the **Channels To MQTT** section. Click the **Show All Tags** switch if it is not already on:

![](/files/WY7DcMTMKwJFgEW43h9r)

All system tags in Clarity Gateway will then appear in the table. In this example we'll be mapping Local I/O channel 1, which is configured as an analog input and mapped to the system tag **channel1**:

![](/files/QdUTVhDffvCaVoZRPo66)

First check the **Enabled** checkbox to enable this mapping:

![](/files/vzrVRXPb9jEJpSNao3Yh)

Then enter the **MQTT Tag** to send values to. In this example we'll use **localio/channel1:**

![](/files/91IcxOAm0TN9TqumcrCb)

Finally, click **Save:**

![](/files/WcF6WyJiRkNylodtRF4s)

Once the mapping is applied, the arrow should change color from gray to blue to indicate that the mapping is active:

![](/files/sYiYdgL4dPfR1nbqXdDk)

## Advanced mapping

For more options when mapping a channel, click the `+` icon in the **Channels To MQTT** section:

![](/files/AAtkzJGvTxD6TeNSWWKI)

This will take you to a separate **Create Channel** page. In that page, first enter the Clarity Gateway **System Tag** you would like to send to MQTT. In this example, we'll be using **channel1**, which is configured as a Local I/O analog input:

![](/files/264E3kXzBjP4RHbKB8vT)

Optionally, you can enter a **Slope** and **Offset** to transform the values that get sent to MQTT. In this example we will enter **2** and **3**:

![](/files/ETVijuAo2dFQZNqKsku1)

Finally, enter the **MQTT Tag** to send to and **Data Type** to use. In this example, we'll send values to **localio/channel1** as **Float**s:

![](/files/CGyvJXPhMdjMEJGfyjb3)

Finally, click **Save** to create the channel:

![](/files/E7wJodtfgywNRrnplzk8)

Once the channel has been created, you will return to the connection page. The new channel should appear in the **Channels To MQTT** table. Notice how the system value is 9.68, and the value sent to MQTT is 2 \* 9.68 + 3 = 22.2:

![](/files/dpaiPEeRGq8lSflGUmid)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.jcore.io/clarity-gateway/connections/mqtt/sending-values-to-mqtt.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.
