# KPN LocationTag I

![KPN LocationTag I](https://portal.kpnthings.com/assets/images/device-types/kpn-locationtag-i.png)

Also known as Viloc Tag.

* Supported network type(s): `KPNLORA`
* Device Specification ID: `kpn-locationtag-i`
* Device Specification UUID: `00338b9a-25f8-43e5-ba36-7555bc00ad83`

| Decoders                                         | decoderSpecificationUUID               | Description                                                                                                                                                |
| ------------------------------------------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| › Decoded payload                                | `84e9d55d-28b3-43c2-9b2d-80ebce35222f` | Decoder outputting sabotage flag and temperature reading.                                                                                                  |
| + Location by LoRa On Premises Gateway reception | `8ae50706-4ad1-4823-90c8-4db166180846` | Add location data to messages that are received by known [LoRa On Premise Gateways](/kpn-things/building-blocks/data-processing/decoders-and-encoders.md). |
| + LoRa Geolocation data                          | `c2f529b3-a1e2-417e-a1f8-2269f4245af1` | Add [LoRa Geolocation](/kpn-things/getting-started/tutorials/technical-overview/location-data.md) data to messages where location could be calculated.     |
| › Decoded payload v2                             | `fa85c8cb-0f64-58c5-beea-69c94c55fc0e` | Decoder for Viloc payloads.                                                                                                                                |

| Encoders                                | encoderSpecificationUUID               | Description                                                                                                   |
| --------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| ‹ Encoded device modes or send interval | `15575b9a-4a5f-4445-9417-4b7a56080f20` | Send device modes for Asset Recovery: Active (5h interval), Missing (5min interval), or change send interval. |

### › Decoded payload

* UUID: `84e9d55d-28b3-43c2-9b2d-80ebce35222f`
* Description: Decoder outputting sabotage flag and temperature reading.
* Exchange: `decoder.lora.viloc.exchange`

#### Expected SenML outputs

| name            | type/unit | description                                                   | example |
| --------------- | --------- | ------------------------------------------------------------- | ------- |
| temperature     | Cel       |                                                               | 21.0    |
| sabotaged       | boolean   | indicates if the device has been sabotaged                    | false   |
| batteryLevelLow | boolean   | indicates if the battery voltage has been below the threshold | false   |

#### Example Message

Note: batteryLevelLow is sent only once per day

```json
[
	{
		"bn": "urn:dev:DEVEUI:B12363D23123C123:",
		"bt": 1678778493
	},
	{
		"n": "temperature",
		"u": "Cel",
		"v": 21.0
	},
	{
		"n": "sabotaged",
		"vb": false
	},
	{
		"n": "batteryLevelLow",
		"vb": false
	}
]
```

### + Location by LoRa On Premises Gateway reception

* UUID: `8ae50706-4ad1-4823-90c8-4db166180846`
* Description: Add location data to messages that are received by known [LoRa On Premise Gateways](/kpn-things/building-blocks/data-processing/decoders-and-encoders.md).
* Exchange: `decoder.lora.lrr.exchange`

#### Expected SenML outputs

See below. Output is comparable to LoRa Geolocation data.

### + LoRa Geolocation data

* UUID: `c2f529b3-a1e2-417e-a1f8-2269f4245af1`
* Description: Add [LoRa Geolocation](/kpn-things/getting-started/tutorials/technical-overview/location-data.md) data to messages where location could be calculated.
* Exchange: `decoder.location.data.kpn.actility.exchange`

#### Expected SenML outputs

<table><thead><tr><th width="179.33333333333331">name</th><th width="128">type/unit</th><th width="135">example</th><th>description</th></tr></thead><tbody><tr><td>locOrigin</td><td>string</td><td>KPNLORA</td><td>indicates the origin of the location data</td></tr><tr><td>latitude</td><td>numeric</td><td>51.79</td><td></td></tr><tr><td>longitude</td><td>numeric</td><td>4.68</td><td></td></tr><tr><td>radius</td><td>m</td><td>319</td><td>together with latitude and longitude this defines the area where the device is expected to be located</td></tr><tr><td>locAccuracy</td><td>%</td><td></td><td></td></tr><tr><td>locPrecision</td><td>%</td><td></td><td></td></tr><tr><td>locTime</td><td>timestamp</td><td>1637165561</td><td>unix timestamp (in s) of the localization</td></tr></tbody></table>

#### Example SenML-message

This location info can be merged with the payload of the device

```
[
  {
    "bn": "urn:dev:DEVEUI:A41163C212345678:",
    "bt": 1637165561
  },
  {
    "n": "locOrigin",
    "vs": "KPNLORA"
  },
  {
    "n": "latitude",
    "u": "lat",
    "v": 51.794884
  },
  {
    "n": "longitude",
    "u": "lon",
    "v": 4.687986
  },
  {
    "n": "radius",
    "u": "m",
    "v": 319.730194
  },
  {
    "n": "locAccuracy",
    "u": "%",
    "v": 9999
  },
  {
    "n": "locPrecision",
    "u": "%",
    "v": 9999
  },
  {
    "n": "locTime",
    "vs": "1637165561192"
  }
]
```

### › Decoded payload v2

Decoder for Viloc payloads.

{% hint style="info" %}
This decoder also decodes [Geolocation and Local Gateway](/kpn-things/getting-started/tutorials/technical-overview/location-data.md) data.
{% endhint %}

| name            | type    | description                                                   | example |
| --------------- | ------- | ------------------------------------------------------------- | ------- |
| sabotaged       | boolean | indicates if the device has been sabotaged                    | `false` |
| temperature     | number  | the temperature measured by the device                        | `14`    |
| batteryLevelLow | boolean | indicates if the battery voltage has been below the threshold | `false` |

#### Example SenML-message

{% hint style="info" %}
SenML can be structured in different ways, and we do not guarantee the examples below will look the same as what you will receive on your Destination. To make sure you can handle the SenML optimally, take a look at our documentation about [Understanding and Interpreting SenML Data](/kpn-things/building-blocks/data-processing/thingsml-and-senml/senml/understanding-and-interpreting-senml-data.md).
{% endhint %}

The `batteryLevelLow` field in the example below is optional and will not be present in every uplink.

```json
[
    {
        "bn": "6E5E267F2E6FB3BF",
        "bt": 1693136532.0,
        "n": "sabotaged",
        "vb": false
    },
    {
        "n": "temperature",
        "u": "Cel",
        "v": 29
    },
    {
        "n": "batteryLevelLow",
        "vb": true
    }
]
```

### › Encoded payload

#### = Raw LoRa payload

* Protocol: LoRa downlink
* Description: Send raw LoRa payload to your device.
* Multiple commands in one downlink: No

Input mapping:

* Name: `payloadHex` (raw input)

#### ‹ Encoded device modes or send interval

* Protocol: LoRa downlink
* Description: Send device modes for Asset Recovery: Active (5h interval), Missing (5min interval), or change send interval.
* Multiple commands in one downlink: No

Input mapping:

* Name: `mode`
  * Value: `Active` (translates into → `010000646400D100C700DADA`, `02D180AA00C40784038405840484060A14`)
  * Value: `Missing` (translates into → `010000646400E1008600DADA`, `02E180AA00C0077B0380057B047B060A147B0214091F0C1F0E010088`)
* Name: `interval`
  * Value: `1h` (translates into → `010000646400E1008600DADA`, `02E180AA00C0077B0380057B047B060A147B0214091F0C1F0E010088`)
  * Value: `2h` (translates into → `010000646400CD00CD00DADA`, `02CD80AA00C20781038105810481060A14`)
  * Value: `5h` (translates into → `010000646400D100C700DADA`, `02D180AA00C40784038405840484060A14`)
  * Value: `11h` (translates into → `010000646400D3005600DADA`, `02D380AA00C4078A038A058A048A061914`)


---

# 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.kpnthings.com/kpn-things/building-blocks/devices/trackers/kpn-locationtag-i.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.
