Visit the Loriot website. Choose a service package — for example, select the Community Public Network Server.
Pick your preferred region and country.
Complete the registration process.
Log in to your Loriot account.
Go to the "Applications" page and click on the application.
Go to the "Output" page.
Click on the "Add new output" button.
Select the output type as "HTTP Push" and enter the "HTTP endpoint URL" taken from the integration. Then, click "Add output" button.
Output created successfully.
Go to the "Applications" page and click on the application.
Go to the "Output" page.
Click on the "Add new output" button.
Select the output type as "HTTP Push" and enter the "HTTP endpoint URL" taken from the integration. Then, click "Add output" button.
Output created successfully.
In ThingsBoard UI:
点击「Add」确认创建 integration。
Turn on the “Create Loriot Application output” option.
Fill in the “Server” and “Application ID” fields.
Select the “Basic” credential type and enter your Loriot account credentials.
点击「Add」确认创建 integration。
「Server」和「Application ID」的值可在 Loriot UI 中查看:
Server:
Open the Loriot UI. The URL contains the server name that we selected during the registration process. This server needs to be specified in the integration settings.
Open the Loriot UI. The URL contains the server name that we selected during the registration process. This server needs to be specified in the integration settings.
Application ID:
Locate the Application ID associated with your project. This value needs to be specified in the integration settings.
Locate the Application ID associated with your project. This value needs to be specified in the integration settings.
To do this, turn on the "Enable security" option. Click "Add" and enter an arbitrary value for the "Header" and "Value" fields. Then, save the changes.
Also need to specify this credentials in Loriot UI.
Go to the "Integrations" page in ThingsBoard. Find your Loriot integration and click on it. There you can find the "HTTP endpoint URL".
创建的设备及其数据可在”Entities“部分的”Devices“页面中查看。
The created device and its data can be found on the "Devices" page in the "Entities" section. On the "Attributes" tab, you will find the attributes sent by the device to ThingsBoard.
On the "Latest telemetry" tab, you will find the telemetry data transmitted by the device to ThingsBoard.
You can view the data in the Uplink converter under the "Events" tab, within the "In", "Out", and "Metadata" blocks.
"Input" block.
"Output" block.
"Metadata" block.
可根据您的配置自定义 downlink。以下示例为发送 attribute 更新消息。需在 downlink encoder function 中的
//downlink data input 行修改代码
1
data: msg.firmware
并在 metadata 中指明所需参数:
1
2
3
4
metadata: {
"EUI": "$Device_EUI",
"port": 1
}
*EUI 为设备 EUI,来自 LORIOT 中的设备。
*port 取值范围为 1 到 223。
Downlink converter 示例:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Encode downlink data from incoming Rule Engine message// msg - JSON message payload downlink message json// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.// metadata - list of key-value pairs with additional data about the message// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter// Result object with encoded downlink payloadvarresult={// downlink data content type: JSON, TEXT or BINARY (base64 format)contentType:"TEXT",// downlink datadata:msg.firmware,// Optional metadata object presented in key/value formatmetadata:{"EUI":"BE7A000000000552","port":1}};returnresult;
// Encode downlink data from incoming Rule Engine message// msg - JSON message payload downlink message json// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.// metadata - list of key-value pairs with additional data about the message// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter// Result object with encoded downlink payloadvarresult={// downlink data content type: JSON, TEXT or BINARY (base64 format)contentType:"TEXT",// downlink datadata:"B104",// Optional metadata object presented in key/value formatmetadata:{"EUI":"BE7A000000000552","port":1,"isHexEncoded":"true"}};returnresult;
可根据您的配置自定义 downlink。以下示例为发送 attribute 更新消息。需在 downlink encoder function 中的
//downlink data input 行修改代码
1
data: msg.firmware
并在 metadata 中指明所需参数:
1
2
3
4
metadata: {
"EUI": "$Device_EUI",
"port": 1
}
*EUI 为设备 EUI,来自 LORIOT 中的设备。
*port 取值范围为 1 到 223。
Downlink converter 示例:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Encode downlink data from incoming Rule Engine message// msg - JSON message payload downlink message json// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.// metadata - list of key-value pairs with additional data about the message// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter// Result object with encoded downlink payloadvarresult={// downlink data content type: JSON, TEXT or BINARY (base64 format)contentType:"TEXT",// downlink datadata:msg.firmware,// Optional metadata object presented in key/value formatmetadata:{"EUI":"BE7A000000000552","port":1}};returnresult;
// Encode downlink data from incoming Rule Engine message// msg - JSON message payload downlink message json// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.// metadata - list of key-value pairs with additional data about the message// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter// Result object with encoded downlink payloadvarresult={// downlink data content type: JSON, TEXT or BINARY (base64 format)contentType:"TEXT",// downlink datadata:"B104",// Optional metadata object presented in key/value formatmetadata:{"EUI":"BE7A000000000552","port":1,"isHexEncoded":"true"}};returnresult;
Open the Loriot UI. The URL contains the server name that we selected during the registration process. This server needs to be specified in the integration settings.
用于填写Application ID字段的数据:
Locate the Application ID associated with your project. This value needs to be specified in the integration settings.