# Step 4: Encoder & Decoder in the LNS

LoRaWAN messages are binary strings, optimized for low-bandwidth RF communication. These binary messages can be translated to readable JSON messages using a decoder and vice versa using an encoder. TWTG provides these codecs according to the [TS013-1.0.0 Payload Codec API specification](https://resources.lora-alliance.org/technical-specifications/ts013-1-0-0-payload-codec-api) and are available in the product documentation via the following links:

{% hint style="info" %}
Please note there are different protocol versions in some of the device types. The overview table of the LoRa Communication folder guides towards the right protocol version of the device the user has.&#x20;
{% endhint %}

* [Pressure Gauge (PG)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/PG/LoRa%20Communication)
* [Pressure Sensor (PS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/PS/LoRa%20Communication)
* [Temperature Sensor (TS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/TS/LoRa%20Communication)
* [Temperature Transmitter (TT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/TT/LoRa%20Communication)
* [Vibration Sensor (VB)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VB/LoRa%20Communication)
* [Contact Sensor (VS-CS)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-CS/LoRa%20Communication)
* [Valve Sensor - Multiturn (VS-MT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-MT/LoRa%20Communication)
* [Valve Sensor - Quarter Turn (VS-QT)](https://github.com/TWTG-R-D-B-V/neon-product-documentation/tree/main/VS-QT/LoRa%20Communication)

For convenience, the encoder (downlinks) and the decoder (uplinks) can be added to the LNS or the application server. Please refer to the documentation of your LNS for a guide on how to achieve this. Quick links to the most commonly used LNS are presented next:

* [The Things Network & The Things Stack](https://www.thethingsindustries.com/docs/integrations/payload-formatters/javascript/)
* [Actility Thingpark](https://docs.thingpark.com/thingpark-x/latest/)
* [Chirpstask](https://www.chirpstack.io/docs/chirpstack/use/device-profiles.html#codec)
* [Loriot](https://docs.loriot.io/display/NMS/Payload+Codec+page)


---

# 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.twtg.io/docs/installation-and-provisioning/provisioning/step-4-encoder-and-decoder-in-the-lns.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.
