Search code examples
fiwarefiware-orion

Poll IoT Device through IoT Agent


I have some devices and a REST API to access the devices' measurements.
I want to use the Orion Context Broker LD to create a Powered by Fiware solution handling those devices.
From what I've recommended way to go about it is by using an IoT Agent.
I want to poll the API every X minutes to get measurements and then pass them to the IoT Agent

Is there such a mechanism in the ecosystem or do I have to implement a custom solution?
After that, how do I integrate with the IoT Agent?

thanks!


Solution

  • The circumstances in which your devices decide to send measurements is entirely your concern, there could be a timer on the device itself, or a regular chron-job which fires a command down to the device to get it to send more data. If the measures from your devices can send data in a "well-known" format (like JSON) you could get the devices to send data to the southport of the IoT Agent for JSON and the IoT Agent could convert that payload to NGSI.

    There is one exception to this - so called "lazy attributes" which are polled for by the context broker on demand - an in-depth description can be found here

    You do not describe the API used to receive measures, but if you're not using a supported format you have two options - create a custom IoT Agent to parse the incoming measures and use the existing library to do all the NGSI work or create a simple gateway proxy component which transforms your incoming measures from <format X> into JSON or Ultralight and then forwards them to the southport of an appropriate existing IoT Agent.