产品定价 立即试用
云平台
北美地区
文档 > 集成 > KPN Things
入门
指南 API 常见问题
目录

KPN Things集成

文档信息图标
ThingsBoard PE 功能

专业版支持Platform Integrations功能。
请使用ThingsBoard Cloud自行安装平台实例。

概述

KPN Things是由电信公司KPN提供的IoT(物联网)平台。 该平台支持用户连接并管理其IoT设备,促进设备与云之间的通信和数据交换。 将KPN Things与ThingsBoard集成后,可在ThingsBoard IoT平台中连接、管理、通信、处理和可视化设备数据。

创建集成

按照以下步骤添加KPN Things集成:

  • Go to "Integrations center" section -> "Integrations" page and click "plus" button to create new integration. Select type "KPN Things". Click "Next";
  • At this step, choose "Create new" uplink converter. The new converter will contain necessary code to convert incoming data and click "Next";
  • At the step of adding a downlink converter, you can also select a previously created or create a new downlink converter. But for now, leave the "Downlink data converter" field empty. Click "Skip";
  • Specify your base URL. Please note down "HTTP endpoint URL" we will use this value later. Then, click the "Add" button. KPN Things integration is created.

我们已在ThingsBoard上预配置了集成,但还需要配置KPN Things以将数据发送到ThingsBoard。

配置KPN Things

要配置KPN Things,需要打开KPN Things Portal并登录您的账户。

KPN Things Portal的界面将来可能会发生变化。

添加新设备

  • 进入”Things manager”选项卡,点击”Add new device”;
  • 选择”Device Simulator”,为设备设置名称,然后点击”Add device”按钮;
  • 在手机上安装并打开”KPN Things Device simulator”应用。按照手机上的说明扫描此二维码,然后点击”Add Network Info”按钮;
  • KPN Internet Network已创建。现在,点击”Finish”按钮;

将设备关联到”Flow”:

  • 进入左侧菜单中的”Flows”,点击”My first flow”行;
  • 在”Devices”行中点击”Link Device”按钮;
  • 点击之前创建的设备旁边的”Link”按钮;
  • 设备已成功关联到”Flow”。现在,点击”My Device”行;

为我的Flow设置数据处理:

  • 将打开”Device & Connectivity detail”页面。现在,进入”Flows”选项卡,点击”My first flow”行;
  • 点击”Data Processing”行以打开”Data Processing details”页面;
  • 将”Decoders”部分的开关切换为启用状态;

添加新的Destination:

  • 进入左侧菜单中的”Destinations”,点击”Add new Destination”按钮;
  • 找到”ThingsBoard”目标类型,点击”Choose ThingsBoard”按钮;
  • 为您的Destination设置名称。
  • 将ThingsBoard集成页面中的”HTTP endpoint URL”粘贴到”HTTP endpoint URL”字段中。
  • 现在,点击”Generate”按钮,并保存生成的值。我们将在ThingsBoard中使用该值。
  • 点击”Add ThingsBoard Destination”按钮;

将”Destination”关联到”Flow”:

  • 进入”Flows” -> “My first flow”,在”Destinations”行中点击”Link Destination”按钮;
  • 点击之前创建的Destination旁边的”Link”按钮;
  • “Destination”已成功关联到Flow。

更新集成

为了验证发送方,我们可以在ThingsBoard的集成中添加一个token。请按照以下步骤操作:

  • Go to "Integrations center" section -> "Integrations" page and click on the integration you created earlier. Click on "Edit" button to enter edit mode.
  • Switch "Enable security (Headers filter)" toggle to enabled state and click "Add" button in "Headers filter" section.
  • Put "X-Things-Secret" to "Header" field and generated token to "Value" field. Finally, apply changes.

以上就是配置KPN Things与ThingsBoard集成所需的全部步骤。现在我们可以将数据从KPN Things发送到ThingsBoard了。

发送上行消息

现在让我们使用”KPN Things Device simulator”应用向ThingsBoard发送一条包含数据的消息。在应用中点击”Send data now”按钮。

发送消息后,您的ThingsBoard实例中将创建一个新设备。

进入ThingsBoard实例,导航到”Devices”页面。在这里您将看到一个新的KPN设备及其相关信息,以及我们发送到该设备的遥测数据。

进入”Integrations”页面,选择”KPN Things integration”,然后导航到”Events”选项卡。在那里您将看到KPN Things集成所接收的消息。

下一步