通过IoT-Hub对设备进行全生命周期管理课件_第1页
通过IoT-Hub对设备进行全生命周期管理课件_第2页
通过IoT-Hub对设备进行全生命周期管理课件_第3页
通过IoT-Hub对设备进行全生命周期管理课件_第4页
通过IoT-Hub对设备进行全生命周期管理课件_第5页
已阅读5页,还剩13页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、通过IoT Hub对设备进行全生命周期管理规划部署配置监控淘汰按照企业需求对设备进行分组通过身份验证确保设备安全考虑如何大规模部署为设备提供在线更新、远程更改配置参数等能力监控设备健康状况,及时发现潜在问题当设备出现故障或者超过服务周期以后,考虑对其进行更换物联网设备生命周期IoT Hub 设备管理功能点Device Twin在IoT Hub和设备之间同步设备属性Queries查询Device Twin并返回设备状态及配置信息Direct Methods通过IoT Hub直接操作设备中定义的方法Jobs对设备进行大规模计划性的操作设备端App后端应用IoT Hub Device TwinDev

2、ice twinPropertiesDesiredReportedTags读,写读,写读读,接收变更通知读,写IoT Hub设备端AppBack endIoT Hub Device TwinDevice twinPropertiesDesiredReportedTagsRead, writeRead, writeRead读,接收变更通知读,写IoT Hub场景:设备配置更新T1Device1 twinDesired StateReported StateSendFrequency : -State: InitializingT2Device1 twinDesired StateSendFreq

3、uency: 5000Reported StateSendFrequency : -State: InitializingT3Device1 twinDesired StateSendFrequency: 5000Reported StateID: Device1SendFrequency : 5000State: ActiveDevice1SendFrequency: -State: InitializingIoT HubIoT HubIoT HubDevice1SendFrequency: -State: InitializingDevice1SendFrequency : 5000Sta

4、te: Active后端 App12345678时间轴Device Twin Queries位于US且发送频率低于每分钟一次的设备SELECT * FROM devices WHERE tags.location.region = US AND properties.reported.telemetryConfig.sendFrequencyInSecs = 60支持wifi 或有线网络连接的设备SELECT * FROM devices WHERE properties.reported.connectivity IN wired, wifiReported properties 和 des

5、ired properties 不一致的设备SELECT * FROM devices WHERE properties.reported.firmwareVersion properties.desired. firmwareVersion按照设备上报状态进行分组并统计总和SELECT properties.reported.deviceStatus AS status, COUNT() AS numberOfDevices FROM devices GROUP BY properties.reported.deviceStatusDemo:Device Twin & Query物理设备Io

6、T HubIoT Hub Direct Method后端应用Invoke MethodDevice method handlerRequestResponseResponse1234Http Post Request:Uri: iot hub/twins/device id/methods/Header: authorization, request id, content type,content encodingBody:methodName: reboot, timeoutInSeconds: 60, payload: input1: someInput“ 4. Http Respons

7、e:HttpStatusCode: 200, 404, 500Body: status : 200, payload : .MQTT topicRequest2. Device Request: $iothub/methods/POST/method name/?$rid=request id3. Device Response: $iothub/methods/res/status/?$rid=request idIoT Hub Direct Method (未连接设备)物理设备IoT Hub后端应用Invoke MethodDevice method handlerDevice Disco

8、nnectedRequestResponse122. Http Response:HttpStatusCode: 404Body: Demo:通过Direct Method远程重启设备后端 App设备端 AppIoT Hub通过Device Twin和Direct Methods管理设备C2DD2CDevice TwinDirect Methods传感器数据云端发起的C2D消息Properties云端发起Direct Methods调用并立即收到响应DesiredReportedTagsPropertiesDesiredReported由云端管理/设备可读由设备管理/云端可读由云端管理设备的元

9、数据Methods读/写读读/写读/接收通知C2D 场景建议Direct methodsTwins Desired PropertiesC2D 消息场景需要立即收到确认的命令及时性要求不高的命令单向通知设备消息大小8KB requests / 8KB responses.最大 8KB最大256KB频率高中低Jobs 创建Jobs Http PUT:iot hub/jobs/v2/?api-version=2016-09-30-previewBody: type: scheduleDeviceMethod, methodName: , queryCondition:, maxExecutionT

10、imeInSecondsor type: scheduleTwinUpdate, updateTwin: , queryCondition: , maxExecutionTimeInSeconds跟踪进度 (query)Http GET /jobs/v2/query?api-version=2016-09-30-preview&jobType=&jobStatus=&pageSize=&continuationToken= Job 的属性 jobIdstartTime endTime typestatusdeviceJobStatisticsIoT Hub通过Job调度device twin更

11、新后端应用ScheduleTwinUpdateJobIdDeviceQueryConditionTwinPatchStartTime (TStart)MaxTimeExecution1Device twinDevice 1Properties.DesiredDataJobUpdateT0TStart2物理设备Device 1Twin changed handlerDevice Twin 更新事件 (当设备处于连接状态时进行)3IoT Hub通过Job调用Direct methods后端应用ScheduleDeviceMethodJobIdMethodType/ParamsDeviceQuery

12、ConditionStartTime (TStart)MaxTimeExecution1JobInvoke Device MethodT02物理设备Device 1Device method handlerTStart*时间点调用Device Method 3* 设备必须处于正常连接状态,否则IoT Hub会立即返回设备未连接Device Method 返回响应IoT Hub通过Jobs和Queries进行管理调度Device Twin/Methods物理设备Device Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin

13、/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsDevice Twin/MethodsJobs调度Device Twin的变更设定Desired Properties, Tags, 并调用Direct MethodsQueries 类似SQL查询查询Devic

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论