当前位置:网站首页>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
边栏推荐
- ARM 架构、ARM7、ARM9、STM32、Cortex M3 M4 、51、AVR 有啥区别
- Abnova荧光原位杂交(FISH)探针解决方案
- Abnova膜蛋白脂蛋白体解决方案
- How to restart the ECS? What are the differences between ECS restart and normal computers?
- Real time monitoring: system and application level real-time monitoring based on flow computing Oceanus (Flink)
- Worthington胰蛋白酶的物化性质及特异性
- TCPIP协议详解
- What technology is VPS? How does the server VPS?
- An interface testing software that supports offline document sharing in the Intranet
- Weibo International Edition changed its name to Weibo light sharing Edition
猜你喜欢

编译器是如何将芯片执行的第一个指令放到芯片起始地址的?

An interface testing software that supports offline document sharing in the Intranet

『应急响应实践』LogParser日志分析实践

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

Abnova多肽设计和合成解决方案

由浅入深的混合精度训练教程

Are you ready for the exam preparation strategy of level II cost engineer in 2022?

SAP MTS/ATO/MTO/ETO专题之八:ATO模式2 D+空模式策略用85

SAP mts/ato/mto/eto topic 8: ATO mode 2 d+ empty mode strategy 85

Final summary of freshman semester (supplement knowledge loopholes)
随机推荐
问题:sql创建存储过程
一文简述:供应链攻击知多少
Chemical properties and specificity of Worthington Papain
Introduction to C language custom types (structure, enumeration, union, bit segment)
How to enlarge the ECS page? How to select ECS instance specifications?
Worthington弹性蛋白酶的应用和相关研究
Two most practical methods for cadence OrCAD capture to batch modify network names graphic tutorial and video demonstration
SAP MTS/ATO/MTO/ETO专题之七:ATO模式1 M+M模式策略用82(6892)
How to add a domain name to ECS? What are the advantages of ECS?
Clang code coverage detection (pile insertion technology)
ARM 架构、ARM7、ARM9、STM32、Cortex M3 M4 、51、AVR 有啥区别
How does the VPS server upload data? Is the VPS server free to use?
What if the ECS forgets its password? How can I retrieve my forgotten password?
Web penetration test - 5. Brute force cracking vulnerability - (6) VNC password cracking
uni-app进阶之认证【day12】
Popularization of children's programming education in specific scenarios
How to build a website for ECS? What are the prices of different ECS
Idea creates a servlet and accesses the 404 message
oracle数据库提示无操作权限的问题
mysql中表的命名