I am using Orion-ld for my company's POC purpose. For the same, I used IOT agent from GITHUB link below:
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:
=================================================================================================
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.
Thanks & Regards, Sunil Kumar
The tutorial you refer to is for NGSI-v2 only and shows the connection with Orion classic. A PR has been raised to add NGSI-LD support into the existing IoT Agents. 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.
My own working proof of concept for an NGSI-LD IoT Agent can be found here: LD-IoT-Agent on the test
branch. This uses an amended IoT Agent for Ultralight and connects to Orion-LD using NGSI-LD commands.
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.
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)