OneNET平台远程温湿度监测系统实训报告

一、项目背景
能实时检测当前环境中的温湿度参数
能够方便地在数据平台实时显示温湿度值
二、实训目标
注册OneNET平台账号并完成实名认证
在OneNET平台上添加自己的产品与设备
设备在线数据正常上报
OneNET平台查看温湿度数据
三、实训步骤
1、OneNET平台的注册

image.png

2、在OneNET上添加自己的产品
添加产品
QQ图片20210328230313.png

设备在线数据正常上报
QQ图片20210328230328.png

关键代码展示
温度资源
temp.type = NBIOT_FLOAT;
temp.flag = NBIOT_READABLE;
ret = nbiot_resource_add(dev,
3303, /* objId /
0, /
instId /
5700, /
resId */
&temp);
湿度资源
humi.type = NBIOT_FLOAT;
humi.flag = NBIOT_READABLE;
ret = nbiot_resource_add(dev,
3304,
0,
5700,
&humi);
4、OneNET平台查看温湿度数据
查看湿度数据
QQ图片20210328230333.png

查看温度数据
QQ图片20210328230337.png

串口发送资源数据
[2021-03-23_14:29:02:580]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.490000",1
[2021-03-23_14:29:02:584]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.490000",1
[2021-03-23_14:29:02:768]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.938763",1
[2021-03-23_14:29:02:780]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.938763",1
[2021-03-23_14:29:36:758]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.660000",1
[2021-03-23_14:29:36:770]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.660000",1
[2021-03-23_14:29:36:946]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"50.587261",1
[2021-03-23_14:29:36:954]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"50.587261",1
[2021-03-23_14:30:10:925]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.820000",1
[2021-03-23_14:30:10:925]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.820000",1
[2021-03-23_14:30:11:112]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.297890",1
[2021-03-23_14:30:11:124]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.297890",1
[2021-03-23_14:30:45:103]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.980000",1
[2021-03-23_14:30:45:111]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"21.980000",1
[2021-03-23_14:30:45:291]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.618324",1
[2021-03-23_14:30:45:299]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"49.618324",1
[2021-03-23_14:31:19:281]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.080000",1
[2021-03-23_14:31:19:281]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.080000",1
[2021-03-23_14:31:19:465]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.695168",1
[2021-03-23_14:31:19:473]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.695168",1
[2021-03-23_14:31:53:444]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.190001",1
[2021-03-23_14:31:53:452]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.190001",1
[2021-03-23_14:31:53:635]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.397621",1
[2021-03-23_14:31:53:635]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.397621",1
[2021-03-23_14:32:27:610]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.230000",1
[2021-03-23_14:32:27:618]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.230000",1
四、总结
学会了平台的使用,学到传感器采集的数据是怎么样上传到云平台的,但也有不少问题,例如刚刚使用平台时忘记实名,设备选择有问题等等,总的来说还是有很大收获

你可能感兴趣的:(OneNET平台远程温湿度监测系统实训报告)