简体   繁体   English

Orion-LD 物联网代理

[英]IOT Agent for Orion-LD

I am using Orion-ld for my company's POC purpose.我将 Orion-ld 用于我公司的 POC 目的。 For the same, I used IOT agent from GITHUB link below:同样,我使用了以下 GITHUB 链接中的 IOT 代理:

https://github.com/FIWARE/tutorials.IoT-Agent.git https://github.com/FIWARE/tutorials.IoT-Agent.git

This IOT Agent code works fine with Orion V2 broker but gives below error with Orion-LD while registering Lamp or other actuator devices:此 IOT 代理代码适用于 Orion V2 代理,但在注册 Lamp 或其他执行器设备时会出现以下错误:

================================================================================================= ================================================== ================================================

time=2020-08-10T07:07:21.672Z | lvl=DEBUG | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"Lamp"} | comp=IoTAgent
time=2020-08-10T07:07:21.673Z | lvl=DEBUG | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"Lamp"}] | comp=IoTAgent
time=2020-08-10T07:07:21.674Z | lvl=DEBUG | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group","code":404} in get group device | comp=IoTAgent
time=2020-08-10T07:07:21.677Z | lvl=ERROR | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.DeviceService | srv=n/a | subsrv=n/a | msg=Registration error connecting to the Context Broker: 501 | comp=IoTAgent
time=2020-08-10T07:07:21.677Z | lvl=DEBUG | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.DeviceProvisioning | srv=n/a | subsrv=n/a | msg=Device provisioning failed due to the following error:  | comp=IoTAgent Request error connecting to the Context Broker: 501
time=2020-08-10T07:07:21.677Z | lvl=DEBUG | corr=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | trans=7591bead-a4b8-421c-a8b9-3c6a3c7da7ae | op=IoTAgentNGSI.GenericMiddlewares | srv=n/a | subsrv=n/a | msg=Error [BAD_REQUEST] handling request: Request error connecting to the Context Broker: 501 | comp=IoTAgent

======================================================================================================= ================================================== ================================================== ===

Please let me know, if Fiware already have IOT agent code available for Orion-LD or I need to use any different setting in docker-compose.yml file for environment.请让我知道,如果 Fiware 已经有可用于 Orion-LD 的 IOT 代理代码,或者我需要在 docker-compose.yml 文件中使用任何不同的环境设置。

Thanks & Regards, Sunil Kumar感谢和问候, Sunil Kumar

The tutorial you refer to is for NGSI-v2 only and shows the connection with Orion classic .您参考的教程适用于NGSI-v2,并显示了与 Orion classic的连接。 A PR has been raised to add NGSI-LD support into the existing IoT Agents.提出PR 以将 NGSI-LD 支持添加到现有物联网代理中。 It is currently undergoing End-to-End testing prior to merge.它目前正在合并之前进行端到端测试。 For more details of expected timelines and when it is likely to appear in the IoT Agents themselves you should probably ask over there.有关预期时间表的更多详细信息以及它何时可能出现在 IoT 代理本身中,您可能应该询问那里。

My own working proof of concept for an NGSI-LD IoT Agent can be found here: LD-IoT-Agent on the test branch.可以在此处找到我自己的 NGSI-LD IoT 代理概念的工作证明test分支上的LD-IoT-Agent This uses an amended IoT Agent for Ultralight and connects to Orion-LD using NGSI-LD commands.这使用经过修改的用于 Ultralight 的 IoT 代理,并使用 NGSI-LD 命令连接到 Orion-LD。

Alternatively the skeleton code for combing the existing NGSI-v2 Orion on the Edge whilst using NGSI-LD in the cloud can be found here: Combining-NGSI-v2-LD - both of these repositories will eventually be expanded into full NGSI-LD tutorials when time allows.或者,可以在此处找到用于在云中使用 NGSI-LD 的同时在 Edge 上组合现有 NGSI-v2 Orion 的框架代码: Combining-NGSI-v2-LD - 这两个存储库最终都将扩展为完整的 NGSI-LD 教程在时间允许的情况下。

The existing tutorial repository will remain NGSI-v2 only (IoT Agent=>Orion) and is not expected be updated to use NGSI-LD (IoT Agent=>Orion-LD)现有的教程库将保持NGSI-V2仅比(IoT代理=>猎户座),并预计不会被更新为使用NGSI-LD(物联网代理=>猎户座-LD)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM