Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4346

FIWARE.Question.Tech.IoT.IDAS.Fiware iotagent: How to send measure from a device?

    Details

    • Type: Monitor
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:

      Description

      Created question in FIWARE Q/A platform on 24-08-2015 at 09:08
      Please, ANSWER this question AT http://stackoverflow.com/questions/32176619/fiware-iotagent-how-to-send-measure-from-a-device

      Question:
      Fiware iotagent: How to send measure from a device?

      Description:
      I'm developing a Fiware system and I don't know how to send measures from a device through IDAS iot-agent.

      I have Orion and Cygnus running, but I'm sending the measures with a servlet directly to Orion and I want to switch the proccess to IDAS iot-agent.

      I've created the service and the device properly but I'm stucked with the POST from the device to the iot-agent.

      My device is created as follows:

      { "device_id" : "0010", "entity_name" : "0010", "entity_type" :
      "xxxxx", "timezone" : "Europe/Madrid", "attributes" : [

      { "object_id" : "0010", "name" : "fecha", "type" : "timestamp", "name" : "coord_x", "type" : "double", "name" : "coord_y", "type" : "double", "name" : "coderr", "type" : "string", "name" : "s_temp", "type" : "double", "name" : "s_hum", "type" : "double", "name" : "num_sat", "type" : "int", "name" : "voltaje", "type" : "double", "name" : "inicio", "type" : "int" }

      ], "service" : "xxxxx", "service_path" : "/xxxxx" }

      How it would be the POST from the device to send the measures?

      Thanks.

      EDIT:

      I tried to POST from a command line to test like this:

      curl -X POST xxxxxxxxxxxx:8080/iot/d?i=0010 \
      -i \
      -H "Content-Type: application/text" \
      -H "Fiware-Service: xxxxxx" \
      -H "Fiware-ServicePath: /xxxxxx" \
      -d "s_temp|25"

      And here is the response:

      HTTP/1.1 415 Connection: close
      Content-Length: 88

      {"reason": "Unsupported Media Type (only support application/xml and application/json)"}

      Now the question is... if I had installed iot-agent-base and iot-agent-ul, Why I'm not able to POST text? Did I miss some configuration?

      EDIT:

      I'm able to send values to this url:

      http://xxxxxxxx:8080/iot/xx?k=xxxxxxx&i=xxxxxxxx#fecha|1#coord_x|1#coord_y|1#coderr|1#s_temp|1#s_hum|1#s_temp|1#num_sat|1#voltaje|1#inicio|1

      And this is the respone

      DEBUG - Accept: /
      DEBUG - End filters status 200
      DEBUG - Proccessing in handle /iot
      DEBUG - iota::AdminService::error_response 0
      DEBUG - finish connection 2
      DEBUG - Get statistics /iot/ngsi Counters 0
      INFO - Agent Activity {"statistics":[

      {"resource":"/iot/ngsi","data":[]}

      ]}

      But Orion doesn't get anything

      EDIT:

      It was a version issue, now I have the latest version of iot-agent installed with UltraLight module and device with "protocol":"PDI-IoTA-UltraLight" and the protocol itself is working.

      But I don't know what is the correct url to post measures from the device. Any help?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1s 1 Backlog Manager 24/Sep/15 10:06 AM
        In Progress In Progress Answered Answered
        4d 24m 1 Backlog Manager 28/Sep/15 10:31 AM
        Answered Answered Closed Closed
        4m 18s 1 Backlog Manager 28/Sep/15 10:35 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        mev Manuel Escriche made changes -
        HD-Enabler IDAS [ 10884 ]
        HD-Chapter IoT [ 10839 ]
        mev Manuel Escriche made changes -
        Summary FIWARE.Question.Tech.Fiware iotagent: How to send measure from a device? FIWARE.Question.Tech.IoT.IDAS.Fiware iotagent: How to send measure from a device?
        mev Manuel Escriche made changes -
        Summary FIWARE.Question.Lab.Fiware iotagent: How to send measure from a device? FIWARE.Question.Tech.Fiware iotagent: How to send measure from a device?
        mev Manuel Escriche made changes -
        Assignee Carlos Ralli Ucendo [ ralli ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-09-28 10:35|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-09-28 10:35|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-09-28 10:30|UPDATED status: transition Answered| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-09-28 10:30|UPDATED status: transition Answered| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        mev Manuel Escriche made changes -
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-05-24 10:05|UPDATED status| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-05-24 10:05|UPDATED status| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-05-24 10:05|CREATED monitor # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-05-24 10:05|CREATED monitor # answers= 1, accepted answer= True
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            ralli Carlos Ralli Ucendo
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: