当前位置:网站首页>Application practice of helium decentralized lorawan network in Tencent cloud IOT development platform
Application practice of helium decentralized lorawan network in Tencent cloud IOT development platform
2022-06-24 04:46:00 【yunfei_ LoRa】
brief introduction
This document describes Helium console Use , Will be standard LoRaWAN The terminal is added to Helium People’s Network, And through Tencent cloud IoT explorer Internet of things development platform integration , Push messages and display data on wechat official account and Tencent apps .
Helium People’s Network Is a global 、 Distributed open network . adopt Hotspots(LoRaWAN gateway ),Helium Can support LoRaWAN The IOT device of the protocol provides public wireless network coverage , Make it easier for Internet of things devices to access the Internet and transmit data .
preparation
Equipment preparation
- a Helium Miner LoraWAN gateway
- A standard LoRaWAN CN470 OTAA terminal , The frequency information used in China is shown in the following table
Signal number | Uplink frequency point | The downside RX1 Frequency point | The downside RX2 Frequency point |
|---|---|---|---|
1 | 486.3 | 506.7 | 505.3 |
2 | 486.5 | 506.9 | 505.3 |
3 | 486.7 | 507.1 | 505.3 |
4 | 486.9 | 507.3 | 505.3 |
5 | 487.1 | 507.5 | 505.3 |
6 | 487.3 | 507.7 | 505.3 |
7 | 487.5 | 507.9 | 505.3 |
8 | 487.7 | 508.1 | 505.3 |
- This document uses Nanjing Rejeee Temperature and humidity sensor as a reference
Helium Console Use
establish Helium console Account
land Helium Console Registered users , have access to google Account login directly , Or create a new account by email . After the new account is completed , You need to log in to the registered email for confirmation , After confirmation, you can log in with the new account Helium Console Console
Data Credits
Use Helium People’s Network Send and receive data , Need to be used Data Credits( abbreviation DC), New account , The official presents 10000DC, Every time 1DC Can send 24byte data .
Suppose a LoRaWAN Terminal per 5 Every minute , Every bag 24Byte, that 1 dollar , namely 6.5 element RMB Can send 10 Million packets , Every time 5 Every minute , Can send continuously 1 year .
1 DC = 24 Byte Packet = $0.00001 USD
If in the account DC Consume up , Need to burn HNT To get DC, Otherwise, data cannot be received and sent over the network .
Add equipment (Add Devices)
- Helium People’s Network Support only LoRaWAN OTAA equipment , And fixing Region Of Frequency plan
- Obtain from the equipment manufacturer LoRaWAN Triple information of the device :Deveui、Appeui、Appkey, As shown in the following figure console Add device information
- When the device first joins the network , Its key needs to be added to the blockchain , And send the updated block to Hotpots, This process requires at most 20 minute
Add device information
Application data decoding (My Functions)
In the last step, we have obtained the original data reported by the equipment , Now we need to parse the original data , Make this part of the data easier to read ,Helium Console Provide My functions function , Through this function , You can use a short script file to Hex Data is transformed into more readable Json Format data , such as : Report Hex data :00 3e 24 04 01 00 05 3a, The parsed data :{ "power": 30,"temp_value": 25.6,"hum_value": 58 }
- Step 1 : Create function name 、 decoder、Customer Script
- Step 2 : Create a function script , You can debug the output through the script validator on the right
Application Integration (Integrations)
Helium Console Support multiple application integration schemes to present data , But most of them are tools used overseas , Not applicable in China , Here we will introduce MQTT Integration tool , With Tencent cloud IoT explorer Internet of things development platform , It also presents data and alarm information through the wechat applet Tencent Lianlian and wechat official account under the Tencent system .
The data presented consists of two types :
- application payload data , Temperature and humidity data are used here
- Internet Information , Include the uploaded gateway number 、 Signal strength 、 Signal-to-noise ratio 、 Frame sequence number, etc
Tencent cloud IoT Platform use
Create in Tencent cloud MQTT terminal
- Step 1: Log in to Tencent cloud Internet of things development platform , Create projects and products - The product name : Enter the user-defined product name - The product type : choice “ User customization ”. - Device type : choice “ equipment ”. - authentication : choice “ Key authentication ”. - communication mode : choice “ other ”.
New product - Step 2: Configuration model
- Application data
- power: soc
- temp_value: temperature
- hum_value: humidity
- Network related data
- rssi: Signal strength
- snr: Signal-to-noise ratio
- frequency: The frequency of reporting data
- dev_eui:Deveui, equipment EUI Number
- fcnt: Frame sequence
- channel: channel
- name: The Internet name
- spreading: Spread spectrum factor
- Application data
Provide Object model file sample JSON Format file , Import directly into the product through the following figure .
After importing successfully , The results are as follows :
- Step 3 : establish MQTT equipment
- New equipment : Create a new device , The equipment name is used in helium console Device name created , The two names need to be consistent
- Get device information ( Used to create MQTT Connected account and password )
- Equipment name
- product ID
- Device key
- Step 4 : establish MQTT Connected account and key Tencent cloud generates a unique key for each device , adopt Step 3 Get the information to create MQTT Connected domain name 、 Account 、 password . There are two generation methods , Pay attention to the timeliness of the account password , If you need a long test , It is recommended to use the second scripting method to generate , Change the validity of the account password : - adopt password Generation tool - adopt python、C Language 、Java Wait for scripts to be generated in different languages , Reference resources MQTT Access
MQTT Account and password production - obtain MQTT Connect triples and Topic
- username: With the above tools
- password: With the above tools
- domain name :PRODUCT_ID.iotcloud.tencentdevices.com, here PRODUCT_ID Is a variable parameter , Users need to fill in the products generated automatically when creating products ID, for example T****DS8G.iotcloud.tencentdevices.com
- The upside topic: $thing/up/property/PRODUCT_ID/${deviceName}
- The downside topic: $thing/down/property/PRODUCT_ID/${deviceName}
helium console establish MQTT Integrate
- Step 1 : helium console add to MQTT Integrate
add to MQTT Integrate - Step 2 : To configure MQTT Connection information , Use the account obtained in the previous step 、 password 、 Fill in the following rules with domain name and other information : - Endpoint: mqtt://username:[email protected]:1234 - uplink Topic:$thing/up/property/PRODUCT_ID/{{device_name}}undefined - downlink Topic:$thing/down/property/PRODUCT_ID/{{device_name}}
MQTT Configuration example - Step 3 : Set up Integration Name
- Step 4 : Set up JSON Information template , It needs to correspond to the object model configured by Tencent cloud
{
"method":"report",
"params":
{
{{#decoded}}{{#payload}}
"power": {{power}},
"temp_value": {{temp_value}},
"hum_value": {{hum_value}},
{{/payload}}{{/decoded}}
"dev_eui": "{{dev_eui}}",
"fcnt": {{fcnt}},
{{#hotspots}}
"channel": {{channel}},
"frequency": {{frequency}},
"name": "{{name}}",
"rssi": {{rssi}},
"snr": {{snr}},
"spreading": "{{spreading}}"
{{/hotspots}}
}
}- Step 4 : Set up Flow Helium Console Provides powerful Flow function , Devices can be created by graphical dragging , The relationship between functionality and integration . Now let's put the equipment Device、 decoder Fuctions、 Application Integration Integrations Three components are connected in series , Get through the data flow .
Helium MQTT Integrate Success and Tencent cloud IOT Establishing a connection :
Tencent cloud successfully obtained the device terminal data :
Tencent cloud configuration Tencent Lianlian applet
Tencent has repeatedly provided official small programs , Users do not need to focus on the underlying implementation , Just configure the exclusive interactive interface , Small program application development can be realized , Quickly render data through applets , Improve development efficiency .
- Step 1 : Enter Tencent cloud IoT Console , Configure Tencent continuous presentation data panel in interactive development , You can select a panel style , And preview through the right panel
Tencent serial panel configuration - Step 2 : Search and open Tencent Lianlian applet in wechat , Scanning device QR code , Add the device to Tencent Lianlian applet
Tencent repeatedly scans QR code , Add equipment - Step 3 : Click on the device in Tencent's small programs , It can be observed that the equipment reports data
Tencent's serial applets present data
Tencent cloud data development , Realize the data push of official account
Tencent cloud IoT It can meet the data and status reported by the developer according to the device , By defining rules in the cloud , The alarm can be realized 、 The notification message is pushed to Tencent Lianlian official account or App push , Reduce the cost for developers to process the data reported by the device . The following is a simple case to realize the push of official account , Detailed documents can be referred to Tencent cloud IoT Data development configuration
- Step 1: New data development
- Step 2: Set push to device data - Choose products - Select Properties - preservation
Set device data - Step 3: Set data filtering rules - Set the condition combination method - Set filter conditions - Sure to save
Set data filtering conditions - Step 4: Set up official account push - Set notification type - Set push title - Set push content
Set push content - Step 5: Focus on Tencent's official account
Focus on Tencent's official account , Get push data information
边栏推荐
- How to install software on ECs is it expensive to rent ECS
- How to build an ECS and how to control the server through the local host
- Abnova荧光原位杂交(FISH)探针解决方案
- Customer disaster recovery case - a MySQL database migration scheme
- 大一下学期期末总结(补充知识漏洞)
- Cadence OrCAD Capture 批量修改网络名称的两种最实用的方法图文教程及视频演示
- Advanced authentication of uni app [Day12]
- C语言自定义类型的介绍(结构体,枚举,联合体,位段)
- Web technology sharing | [map] to realize customized track playback
- 少儿编程教育在特定场景中的普及作用
猜你喜欢
![Web technology sharing | [map] to realize customized track playback](/img/b2/25677ca08d1fb83290dd825a242f06.png)
Web technology sharing | [map] to realize customized track playback

大一下学期期末总结(补充知识漏洞)

解析90后创客教育的主观积极性

Multi task video recommendation scheme, baidu engineers' actual combat experience sharing

15+ urban road element segmentation application, this segmentation model is enough

SAP mts/ato/mto/eto topic 10: ETO mode q+ empty mode unvalued inventory policy customization

少儿编程课程改革后的培养方式

Introduction to gradient descent method - black horse programmer machine learning handout

阿里云新一代云计算体系架构 CIPU 到底是啥?

阿里云混合云首席架构师张晓丹:政企混合云技术架构的演进和发展
随机推荐
SAP MTS/ATO/MTO/ETO专题之七:ATO模式1 M+M模式策略用82(6892)
uni-app进阶之认证【day12】
Web technology sharing | [map] to realize customized track playback
mini-Web框架:装饰器方式的添加路由 | 黑马程序员
ARM 架构、ARM7、ARM9、STM32、Cortex M3 M4 、51、AVR 有啥区别
web渗透测试----5、暴力破解漏洞--(8)PostgreSQL密码破解
MySQL - SQL execution process
解析90后创客教育的主观积极性
What are the functions of ASP files on ECs? What if the ECS cannot run ASP with a low version?
Ribbon
SAP MTS/ATO/MTO/ETO专题之八:ATO模式2 D+空模式策略用85
大一下学期期末总结(补充知识漏洞)
How does ECS build websites? Is it troublesome for ECs to build websites?
梯度下降法介紹-黑馬程序員機器學習講義
Opengauss version 3.0 source code compilation and installation guide
让孩子们学习Steam 教育的应用精髓
Abnova多肽设计和合成解决方案
Network timeout configuration method when PR and push are proposed
How does ECS publish websites? What software tools are needed?
Replication of variables in golang concurrency