Search code examples
fiware

How to check if IOTA is receiving data from device


I recently suspect I have configuration problem with the SOUTHBOUND traffic. Device already provisioned with IOTA. How do I check if the agent is receiving measurements?


Solution

  • First, try looking in the agent's log file, to discard errors. If you do not find anything, try changing the severity of the log file to a more comprehensive value like DEBUG.

    I have never used this FIWARE IoT Agent, but with others like IoT Agent for the Ultralight if you configure the severity of the log file in DEBUG the reception of each message is shown.

    If you need help to change the log file severity, start reading the agent configuration page here.

    On the other hand, if you have your agent attached to an Orion context broker, you should be able to validate that you are receiving data, observing how your contexts change as you receive data. For this you have the Orion API.

    EDIT:

    All FIWARE agents shares a core library called node-lib and that component define interfaces to manage device provisioning and similar operations.

    There are HTTP methods to create, fetch and delete devices and in particularly for updating a device. Check apiary blueprint here for more information.

    As an example:

    1. Getting all devices

      curl -X GET [your_agent_host]:[port]/iot/devices

    2. Update a device

      curl -X POST [your_agent_host]:[port]/iot/devices/{device_id} -d
      '{"attributes": [{ "object_id": "attr_id", "name": "attr_name", "type": "attr_type"} ... ]}'

    I think there is no way to perform a partial update on a single device, you must specify all the attributes again.

    Greetings and I hope I have been of some help!