ahmad
ahmad

Reputation: 175

checking command from orion to iot agent in Fiware

I've used the FIWARE Orion Context Broker and IoTAgent-UL in my project. I've registered a virual device by sending a Json message carrying the device attributes, the command attributes, device endpoint address and the used protocol (UL2.0).

If I update the command attribute of the device entity in Orion Context Broker, how can i check that the command is sent to the IoTAgent successfully before it is forwarded to the device virtual device itself?

Moreover, can I make the IP address of a Raspberrypi the endpoint itself and assign a port to a device connected to the Raspberrypi? And how could this be done?

Finally, in case I have no physical device could I consider the IoTAgent's address an endpoint to check whether any update on the command attribute in the context broker will be forwarded to that endpoint?

Thanks

Upvotes: 2

Views: 310

Answers (1)

frb
frb

Reputation: 3798

There are three ways of checking the update context/command has been sent to the agent, and from the agent or the device:

  • Check Orion or agent logs.
  • Check the MQTT broker logs, if you are using MQTT transport.
  • Check the device itself. If the command was received, you'll be able to see the effects of the command.

Regarding the place a Raspberry Pi may play in an architecture using IoT agents, typically it is used to replace the agent :) I mean, if having a device such as a Raspberry Pi, the usual scenario is to connect to the R-Pi all your sensors and actuators, as if it was a gateway, and then let the R-Pi connect directly to Orion Context Broker by implementing a NGSI client running in the R-Pi. Schematically:

Orion <---> R-Pi + NGSI client <---> sensor/actuator

Nevertheless, I guess you can use the R-Pi as if it was a final device (sensor or actuator) in order to test IoT agents. Regarding how to emulate the final device itself, I guess you'll have to run certain logic in the R-Pi in order to accept the UL messages from the IoT agent/MQTT broker. A simple netcat could help you; more complex emulation services could be run, of course. Schematically:

Orion <----> UL agent <---> R-Pi + netcat 

Anyway, please observe always a final device (sensor or actuator) is required, either real, either simulated (running netcat or similar in a R-Pi/server), since the UL agent must have an endpoint where to send the UL payloads.

Orion <---> UL agent <---> R-Pi + netcat OR server + netcat OR real sensor/actuator

Upvotes: 0

Related Questions