[英]FIWARE Metadata in IoTAgent
I try to set up a TTN based LoRaWAN Monitoring of my Gateways and devices inside a FIWARE-Environment.我尝试在 FIWARE 环境中设置基于 TTN 的 LoRaWAN 监控我的网关和设备。 Therefore it would be essential to access data not in
payload_field
of the MQTT-Broker of TTN.因此,必须访问不在 TTN 的 MQTT-Broker 的
payload_field
中的数据。
I wonder if it is possible to access field like counter, port, app_id and metadata.我想知道是否可以访问计数器、端口、app_id 和元数据等字段。
I did not find a possibility yet.我还没有找到可能。 Does any of you face the same problem and got a solution to this challenge?
你们中是否有人面临同样的问题并找到了应对这一挑战的解决方案?
I use the following relevant FIWARE-components in a docker environment:我在 docker 环境中使用了以下相关的 FIWARE 组件:
fiware/orion:2.2.0固件/猎户座:2.2.0
fiware/iotagent-lorawan:1.2.3固件/iotagent-lorawan:1.2.3
mongo:3.6.8蒙戈:3.6.8
If you need to receive metadata directly from LoRaWAN, you will have to customize the code within the LoRaWAN IoT Agent - this just passes measures by default, but the IoT Agent node lib interface is capable of receiving metadata as well.如果您需要直接从 LoRaWAN 接收元数据,则必须在 LoRaWAN IoT Agent 中自定义代码 - 默认情况下这只是通过措施,但 IoT Agent 节点库接口也能够接收元数据。
Alternatively a recent PR Request for the IoT Agent node lib allows for additional static metadata to be added during the provisioning stage and sent as part of the requests to the context broker.或者,物联网代理节点库的最新PR 请求允许在配置阶段添加额外的静态元数据,并作为请求的一部分发送到上下文代理。 You would need to use the latest development code base as the library hasn't been ported to the LoRaWAN IoT Agent yet - amend the
iotagent-node-lib
dependency in the package.json
as shown:您需要使用最新的开发代码库,因为该库尚未移植到 LoRaWAN IoT Agent - 修改
package.json
的iotagent-node-lib
依赖项,如下所示:
"dependencies": {
...
"iotagent-node-lib": "git://github.com/telefonicaid/iotagent-node-lib.git#master",
...
},
... etc
The documentation can be found here文档可以在这里找到
Attributes with metadata
are provisioned with an additional parameter as shown:具有
metadata
属性使用附加参数进行配置,如下所示:
"attributes": [
{"object_id": "s", "name": "state", "type":"Text"},
{"object_id": "l", "name": "luminosity", "type":"Integer",
"metadata":{
"unitCode":{"type": "Text", "value" :"CAL"}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.