使用IoT REST网关发送具有多个度量的功能

2020-09-22 17:12发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)大家好, 我目前在使用I...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


大家好,

我目前在使用IoT网关发送具有多个测量值的功能时遇到了一些麻烦。 我要发送的消息有效负载由4种功能组成。 我在这里粘贴其中一个作为示例:

 {" id":" 7b5b1199-de44-4ec1-b3ab-3d72aa7a1bc2","名称":" device_data"," alternateId":" HR003","属性":[{"名称":"电源",  " dataType":" integer"," formatter":{" dataType":" integer"," scale":0," shift":0," swap":false}},{" name":" serial",  " dataType":" string"},{" name":" battery"," dataType":" integer"," formatter":{" dataType":" integer"," scale":0," shift":0  ," swap":false}},{" name":" fw_version"," dataType":" string"},{" name":" hw_version"," dataType":" string"},{" name":  " location"," dataType":" string"}]} 

我想通过REST发送这样的有效负载:

" device_data":{" power":9," serial":" DHCZ2020B"," battery":90," fw_version":" 19.0.2"," hw_version":" 6.3"," location": "罗马"}

为此,我添加了以下架构文件:

{" type":" object"," parserData":{" format":" JSON"," resource":" REST_body"," messageType":" default"," messageTypeFinder":{" format": " JSON_POINTER"," jsonPointer":"/img/messageType"}}," actions":[]," properties":{" deviceAlternateId":{" type":" string"," mapTo":" device_alternate_id"}," device_data":{" type":" object"," mapTo":" value"," properties":{" *":{" mapKeyTo":" property_name"," mapTo":" value"}},"操作 ":[{" type":" ADD"," mapTo":" capability_alternate_id"," value":" HR003"},{" type":" ADD"," mapTo":" sensor_type_alternate_id"," value": 987321},{" type":" ADD"," mapTo":" sensor_alternate_id"," value":" HRsensor001"}]}}}

我已在网关中激活调试日志,但没有收到任何错误。 但是,数据无法在物联网中可视化。 您能帮我弄清楚我的错误吗?

谢谢

Federico