# Devices

A Device represents a single physical device that can send data to the platform. You can find all your devices when clicking Devices in the menu.&#x20;

## Devices page

On the Device page, you have an overview of all your Devices.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2Fqq9TyxGuK2cdiuYEPNZ2%2Fimage.png?alt=media&#x26;token=f8c4cd0c-d00d-4c11-a473-5bb20838d2fd" alt=""><figcaption></figcaption></figure>

Elements on the page are:

1. **Total number of Devices** you have and see on the current page.
2. **Device list** of all your Devices with some information:
   1. The Device name.
   2. The Device type.
   3. The primary identifier of your Device.&#x20;
      * For LoRa this is the **DevEUI**
      * For M2M the **IMEI**
      * For internet the **DvnUUID**
   4. The moment Things last received a message from the Device.
   5. The Project the Device belongs to.
   6. The number of Flows your Device is in. Hover over the number to get a popup with a list of Flow names.
   7. Clicking on a row will open the [Device detail page](#device-detail-page) of that Device.
3. **Search element** to search for your specific Devices. You can search by Name and Primary identifier.
4. Link to Add a new Device.
5. **Bulk manipulation** options. Select some or all Devices and choose the bulk action from the action bar at the bottom of the page.
6. **Sorting** options, by clicking on a specific table header the table will sorted by the selected value.
7. A lock 🔒 icon for KPN Things devices. For such devices fewer editing options are available. See [Device types](https://docs.kpnthings.com/kpn-things/kpn-things-user-guide/getting-started/connect-devices#supported-devices-and-kpn-devices) for a comparison of what you can do with KPN Things devices and Supported devices.

## Deactivate or delete Device

The most important difference is that:\
\
**Device deactivation can be used temporarily** and is necessary when you want stop data from devices being send to devices. \
As an example: a customer has not paid his invoice and in response this customer receives no data.\
&#x20;\
**Deletion is permanent**. After the deletion, you can't onboard this device again. You can delete the device via the Bulk manipulation options. KPN Things devices can only be deleted by KPN. Contact the[ IoT Service desk ](https://kpnbm.service-now.com/kpn/?id=index)for this.

In the table below you can read about the differences between deleting a Device and deactivating a Device.&#x20;

<table data-header-hidden><thead><tr><th width="249.33333333333331"></th><th>Deactivate Device</th><th>Delete Device</th></tr></thead><tbody><tr><td></td><td><strong>Deactivate Device</strong></td><td><strong>Delete Device</strong></td></tr><tr><td>Why use it?</td><td>Temporarily disable data from Device. (example: disable data for sub customers)</td><td>The device is end of life and should be tossed out.</td></tr><tr><td>Can customers do it themselves?</td><td>Yes, in bulk and for individual devices.</td><td>No</td></tr><tr><td>Is it permanent?</td><td>No, you can easily Activate the Device again in the Portal in bulk and individually.</td><td>Yes, the Device is removed from all KPN systems. You can not use this the device again.</td></tr><tr><td>Does it influence billing?</td><td>No, remove from Flow to have it stop being counted (applicable to Modular customers, E2E customers are being billed by information in C8Y)</td><td>Yes, because it is also removed from the Flow.</td></tr><tr><td>Impact on battery if Device is still turned on</td><td>Connection between Device and Network is not changed, so the Device continues operating as normal.</td><td>Network registration of Device is removed. Depending on how the Device is programmed it may continue operating as normal, but it will probably change to a more energy consuming mode because the device will (uselessly) try to reconnect to the Network.</td></tr><tr><td>Can you check the operation afterwards?</td><td>Yes, because the Device object still exists, only has the attribute "STATUS" changed to "Deactivated". But once the Device is reactivated, you cannot see when it has been deactivated.</td><td>No, the Device is completely removed from all systems.</td></tr></tbody></table>

## Device detail page

This page offers you all detailed information about your Device and its connectivity.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2F4Emr6ueOsDja9L7rs74o%2FDevice%20detail.png?alt=media&#x26;token=37d84099-4f7e-47c7-97a8-6e0511b899e2" alt=""><figcaption></figcaption></figure>

The elements on this page are:

1. General [Device information card](#device-information-card)
2. Connectivity information card for your Device, depending on your network type:
   1. [LoRa information card](#lora-information-card-only-for-devices-with-lora-connectivity) for devices with LoRa connectivity.
   2. [M2M information card](#m2m-information-card-only-for-devices-with-m2m-connectivity) for devices with M2M connectivity.
   3. [Internet information card](#internet-information-card-only-for-devices-with-internet-connectivity) for devices with Internet connectivity.
3. [Connectivity info](https://docs.kpnthings.com/kpn-things/the-portal-explained/things-manager/connectivity) tab showing you more details about the Connectivity configuration of your Device.
   1. [LoRa ](#lora-tab-only-for-devices-with-lora-connectivity)tab for devices with LoRa connectivity.
   2. [M2M ](#m2m-tab-only-for-devices-with-m2m-connectivity)tab for devices with M2M connectivity.
4. [Device Twin](https://docs.kpnthings.com/kpn-things/building-blocks/data-processing/device-twin) tab showing you the Digital twin of your Device.
5. [Device tab](#device-tab) showing you more details about your Device.
6. [Send Instruction tab](#send-instruction-tab) allowing you to send data to your Device.
7. Connectivity data tab[ ](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity#connectivity-detail-page)showing you detailed data history to and from your Device.
   1. [LoRa data ](#lora-data-tab-only-for-devices-with-lora-connectivity)tab for devices with LoRa connectivity.
   2. M2M data tab for devices with M2M connectivity.
8. [Flows](https://docs.kpnthings.com/kpn-things/the-portal-explained/things-manager/processing) tab showing you detailed information about the Flows your Device is linked to.
9. A button to [delete](#deactivate-or-delete-device) your Device. This will completely remove your Device from KPN Things! (Not available for KPN Things devices).

### Device information card

The Device information card contains general information about your Device:

1. The name of your Device.
2. The Device type.
3. The [processing status](#processing-status) of your Device, which you may be able to update.
4. The Flows linked to your Device.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FvWysh2WI8lemA79Nx8Ub%2Fimage.png?alt=media&#x26;token=ac535866-9321-4666-9d5f-349d66c1ffc2" alt=""><figcaption></figcaption></figure>

Clicking on the Device name or Device type will open the [Device tab](#device-tab) with more information about your Device.

### LoRa information card (only for devices with LoRa connectivity)

The LoRa information card contains more LoRa specific information of your Device.

1. The DevEUI of your Device.
2. The [connectivity status](#connectivity-status).
3. The moment KPN Things last received data from your Device.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FqvIopCF8TBEsYtxdP7l0%2Fimage.png?alt=media&#x26;token=3c3890a1-e488-44cf-906b-c0bee1636c13" alt=""><figcaption></figcaption></figure>

Clicking on the DevEUI or the Type = LoRa part of the card will open the [LoRa tab](#lora-tab-only-for-devices-with-lora-connectivity) with all LoRa specific information of your Device.

### M2M information card (only for devices with M2M connectivity)

The M2M information card contains more M2M specific information of your Device.

1. The IMEI of your Device.
2. The ICCID of the SIM card linked to your Device.
3. The MSISDN of the subscription linked to the SIM card in your Device.
4. The [connectivity status](#connectivity-status) with the possibility to change its value.
5. The moment KPN Things last received data from your Device.
6. The moment your SIM card has been activated.
7. The rate plan of the subscription linked to your SIM card.
8. Button to unlink the current SIM card from your Device. (Not available for KPN (managed) devices).

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FfjIMWvl3Rq7aABeViL1a%2Fimage.png?alt=media&#x26;token=c43f7446-b89f-4842-92bc-e1278ecde3b6" alt=""><figcaption></figcaption></figure>

Clicking on the IMEI or the white part of the card will open the [M2M tab](#m2m-tab-only-for-devices-with-m2m-connectivity) with all M2M specific information of your Device.

### Internet information card (only for devices with Internet connectivity)

The Internet information card contains more Internet specific information of your Device.

1. The SenML base name&#x20;
2. The [connectivity status](#connectivity-status).
3. The moment KPN Things last received data from your Device.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FQYptG5bpYFG5wv6hy7iZ%2Fimage.png?alt=media&#x26;token=cee057f6-4d03-47ff-aa26-0656d8c0f37d" alt=""><figcaption></figcaption></figure>

Clicking on the base name or the white part of the card will open the Internet tab with all Internet specific information of your Device.

### "LoRa data" tab (only for devices with LoRa connectivity)

LoRa data history will show you all data and mac traffic sent to and from your Device up to one month ago. Learn more about [LoRa data history](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity/connecting-lora-devices).

### "Send instruction" tab

{% hint style="warning" %}
Currently you can only send data to your Device if your Device is linked to at least one Flow!
{% endhint %}

On this tab you can send data or instructions to your Device, and you can see the status of requested data/instructions. Data to LoRa devices is also called a downlink.

Depending on your device type, different ways of sending data/instructions to your Device will be available. These could be:

1. [Raw LoRa data](#1.-raw-lora-data) - for own LoRa devices and supported LoRa devices.
2. [Raw SenML](#2.-raw-senml) - for any Things M2M or Internet device.
3. [Predefined commands](#3.-predefined-commands) - for KPN devices. Learn more about [KPN Things Devices](https://docs.kpnthings.com/kpn-things/kpn-things-user-guide/getting-started/connect-devices#supported-devices-and-kpn-devices).
4. [No downlink available](#4.-no-downlink-available) - for devices that do not support downlink communication.

To see which methods are available for your device type, you can check the [available encoders for your device type](https://docs.kpnthings.com/kpn-things/building-blocks/data-processing/decoders-and-encoders).

#### 1. Raw LoRa data

Some Device types allow you to send raw LoRa data to your Device. To do this, you need to enter two values in the form as shown below:

* **FPort** - the LoRa application port you want to send the data on.
* **Payload** - the data you want to send to your Device in hexadecimal characters.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2Fv45vw7sTZV7nhBr3TzbW%2Fimage.png?alt=media&#x26;token=d086e94e-0616-4df2-bdf6-d1d757e73e8a" alt=""><figcaption></figcaption></figure>

#### 2. Raw SenML

Things M2M devices and Internet devices can communicate with SenML. So downlinks to these devices should also be SenML.

The input form in the Portal should be filled in with a valid SenML measurement list formatted as JSON. [Learn more about SenML](https://docs.kpnthings.com/kpn-things/building-blocks/data-processing/thingsml-and-senml/senml). The entered SenML measurement list does not have to contain base values, KPN Things will add those before sending the downlink to the Device.

{% tabs %}
{% tab title="Example with one command" %}

```javascript
[{"n":"door","v":1}]
```

{% endtab %}

{% tab title="Example with two commands" %}

```javascript
[{"n":"door","v":1},{"n":"mode","vs":"quiet"}]
```

{% endtab %}
{% endtabs %}

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2Fk2UnvzUEP3qeqC7FmJx6%2Fimage.png?alt=media&#x26;token=cb4bfefd-836d-40de-abb0-a56d1c4b9400" alt=""><figcaption></figcaption></figure>

#### 3. Predefined commands

For KPN Devices we provide a predefined list of human readable commands that you can send to the Device. Simply select the desired command to send by clicking on the radio button (if multiple commands are available), select the desired value for the command from the drop down, and click submit.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FbUczlXfPwfJE9rP6LnTv%2Fimage.png?alt=media&#x26;token=958db30a-3ee1-4db2-bd98-496c9823fa3b" alt=""><figcaption></figcaption></figure>

#### 4. No downlink available

If downlink is not available for your Device, you will see the following:

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2F1UNtX082DocBXW7PHHTM%2Fimage.png?alt=media&#x26;token=9b52d5cf-c0db-41bc-8661-9705ebec7af3" alt=""><figcaption></figcaption></figure>

If your Device is not yet linked to a Flow, doing this could enable Downlink for your device. A Flow is required to enable an encoder that is required for downlink communication. Learn more about [downlink communication](https://docs.kpnthings.com/kpn-things/getting-started/tutorials/technical-overview/downlink-communication).

#### Downlink status

Often data or an instruction sent to your Device is not received immediately. Often the Device is in sleep mode and will be able to receive the data when it wakes up again. So to monitor the status of the requested data/instructions to your Device, you can check the downlink status table on this tab.&#x20;

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2F6yLiJ9d5W6KbM8rdXJZY%2Fimage.png?alt=media&#x26;token=96c0a2cc-12de-4c35-b02e-7f61a960cb5d" alt=""><figcaption></figcaption></figure>

There are five downlink statuses, illustrated in the diagram below and further explained in the table below.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2Fli067PlBMGpfBODGEkya%2Fimage.png?alt=media&#x26;token=a98f9e1f-0254-47b8-8a7a-8570c54a37eb" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="170.44172026307012">Status</th><th>Description</th></tr></thead><tbody><tr><td>Status</td><td>Description</td></tr><tr><td><strong>Pending</strong></td><td><p>When a downlink is requested on the Actuator API the command will get the status <em>Pending</em>. This means the downlink is accepted by Things and will be processed shortly. If there is another downlink of the device already in <em>Executing</em>, the downlink will stay in Pending until the other downlink reaches a final status. Downlinks will be processed by KPN Things in order of request date, so FIFO.</p><p></p><p>After the previous downlink has been finalized, it can take <strong>up to an hour</strong> or so for the next pending downlink to be taken into execution. We are working on it to shorten this period.</p></td></tr><tr><td><strong>Cancelled</strong></td><td><p>Pending downlinks can be cancelled. Since a pending downlink is not yet being processed by network systems, KPN Things can safely remove the downlink from its queue. Cancelled downlinks will not be processed any further and will get the final status <em>Cancelled</em>.<br></p><p>It is not possible to cancel a downlink that is in <em>Executing</em>, since we cannot guarantee the withdrawal of a downlink request that is already being executed by the network system.</p></td></tr><tr><td><strong>Executing</strong></td><td><p>When there is at least one downlink in the queue for a device, so with status <em>Pending</em>, it will be processed further by the system. It will then be de-normalized and sent to the device. During de-normalization, sending and waiting for feedback on delivery, the downlink is in <em>Executing</em>.<br></p><p>Only one downlink per device can be in <em>Executing</em>.</p></td></tr><tr><td><strong>Failed</strong></td><td>When KPN Things does not receive acknowledgement of the successful delivery of the downlink, or if KPN Things receives a timeout on sending the downlink, the downlink will get the final state <em>Failed</em>.</td></tr><tr><td><strong>Delivered</strong></td><td>When the delivery of the downlink is acknowledged by the device, the downlink will be set on final state <em>Delivered</em>.</td></tr></tbody></table>

{% hint style="info" %}
More information on sending data to your Device can be found in the [Send instruction to LoRa Device](https://docs.kpnthings.com/kpn-things/getting-started/tutorials/send-instruction-to-lora-device-page).&#x20;
{% endhint %}

### "Device" tab

This tab shows you detailed information about your Device configuration:

* **Network info** - The information required to register the Device to the correct network.
* **Device type** - What type of Device it is.
* **Description** (optional) - More information about your Device.
* **Barcode** (optional) - The serial number of other code that is visible on the outside of the Device.
* **Name** - A descriptive name of the Device.

### "LoRa" tab (only for devices with LoRa connectivity)

You can read more about the [LoRa Connectivity](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity/connecting-lora-devices) information that you can find on this tab.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FJf1NcK1bdbaClhQwDA6o%2Fimage.png?alt=media&#x26;token=86b2854d-2b3c-4eae-a846-501aee6cde41" alt=""><figcaption></figcaption></figure>

#### Register on Network

If your LoRa Device is not yet registered on the LoRa network, you can click **Register Device on Network** here. This will open a modal for you to enter the LoRa network information for this Device.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FuInz9EgB51plkqv9I0xH%2Fimage.png?alt=media&#x26;token=fa4bc8a0-de37-43d4-adb9-f718e67e2c59" alt=""><figcaption></figcaption></figure>

### "M2M" tab (only for devices with M2M connectivity)

The M2M tab shows you detailed information about your M2M connectivity. You can read more about the [M2M Connectivity ](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity/connecting-m2m-devices)you can find on this tab.

Additionally, you can perform some M2M specific actions:

2\. Edit M2M Device Configuration - allows you to generate a new shared secret for your M2M device.\
3\. Switch SIM card - allows you to administratively switch the SIM card of your M2M device.\
4\. Unlink SIM card- allows you to administratively remove the SIM card from your M2M device.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FQgXE15kuqFUZga8pR3iQ%2Fimage.png?alt=media&#x26;token=4ae5394f-1ba9-4652-bb79-ca1f36937708" alt=""><figcaption></figcaption></figure>

#### Link connectivity (only available when M2M device is not yet linked to a SIM card)

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FzJeZKJnPdFzZnKxlPooO%2Fimage.png?alt=media&#x26;token=27701ac5-deda-47ee-b001-5c2e5856c016" alt=""><figcaption></figcaption></figure>

If your M2M Device is not linked to a SIM card, you can click **Link Connectivity** here. This will open a new page to allow you to link your Device to a SIM card. The steps you take for this action are the same as for [linking your SIM card to a Device](https://docs.kpnthings.com/kpn-things/getting-started/tutorials/connect-devices/sim-cards).

### "Flows" tab

In the Flows tab you can see:

1. A list of all the Flows your Device is linked to and the Project this Flow is in.&#x20;
2. You can click on a Flow to open it.
3. You can click on **Unlink from this Flow** to remove the Device from that Flow.&#x20;
4. Also you can add your Device to another Flow.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FzEz21IThCuovZewn4bcD%2Fimage.png?alt=media&#x26;token=085458c8-4f2c-41f6-ac4c-6976d15f0020" alt=""><figcaption><p>Available information and actions on Flow tab</p></figcaption></figure>

#### Flow warning labels

If there is a possible issue with one of the Flows your Device is in, a warning icon is shown on the Flow tab link and in the row of the concerning Flow. By clicking on the warning icon of a Flow, you will continue to the Flow detail page displaying more information about the warning.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FzWSoMHTLKKPizZQxNRsL%2Fimage.png?alt=media&#x26;token=ef713788-1c6d-4c5b-8b09-3780d47de770" alt=""><figcaption><p>Flow warning</p></figcaption></figure>

#### Link Device to Flow

After you click on **Link to another Flow** in the Flows tab, a modal will open.

In this modal you can:

1. Select the Project to which you want to add the Device, if you have more than 1 Project.
2. Select the Flow to which to link your Device.
3. Optionally create a new Flow to which to link your Device.

### Processing status

Each Device in KPN Things will have a processing status. This will tell you whether data from and to that Device will be processed by KPN Things.

<table><thead><tr><th width="239.34940960564506">Status</th><th>Description</th></tr></thead><tbody><tr><td>🟢 Active</td><td>Data coming from and going to your Device will be processed.</td></tr><tr><td>⚫ Deactivated</td><td>Data coming from your Device will not be processed or forwarded by KPN Things. Also downlinks will not be sent to your Device. Data history will still be available, since Things will still accept data from your Device. <br>The network connection is not denied.</td></tr><tr><td>⚫ Not yet linked</td><td>Your Device is not connected to a Flow, so data will not be processed in KPN Things.</td></tr></tbody></table>

### Network info

To connect a Device to KPN Things it needs either to be registered to our LoRa or M2M network, or it needs to be an Internet-connected device running our SDKs or other KPN Things compatible software.

Separate pages will explain more about the supported network types:

* [LoRa](https://docs.kpnthings.com/kpn-things/the-portal-explained/things-manager/connectivity/lora-connectivity-configuration)
* [M2M](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity/connecting-m2m-devices)
* [Internet](https://docs.kpnthings.com/kpn-things/building-blocks/connectivity/connecting-internet-devices)

### Connectivity status

| **Status**                    | **Description**                                                                                                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ⚪ Not yet linked to a network | Your Device is added to KPN Things, but Network information is still missing in able to register your Device to the network.                                                                                  |
| 🔵 Pending create             | Your Device is being registered to the network.                                                                                                                                                               |
| 🟢 Active                     | Your Device or SIM card is registered to the network and should be able to join and send data.                                                                                                                |
| ⚫ Deactivated                 | Your Device or SIM card is registered to the network, but labeled as Inactive, meaning incoming connections will not be accepted.                                                                             |
| 🔴 Failed                     | The Device could not be registered to the network. Probably the Network info you entered to register your Device was incorrect or already in use.                                                             |
| ⚫ Inventory                   | Your Device and its Network information is known in the system but not yet registered to the network. If you want you can activate the network registration on the [Device detail page](#device-detail-page). |
