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

[fiware-stackoverflow] Fiware Ultralight 2.0 IoTAgent: How to send measure from a device?

    Details

      Description

      Created question in FIWARE Q/A platform on 30-01-2018 at 14:01
      Please, ANSWER this question AT https://stackoverflow.com/questions/48523040/fiware-ultralight-2-0-iotagent-how-to-send-measure-from-a-device

      Question:
      Fiware Ultralight 2.0 IoTAgent: How to send measure from a device?

      Description:
      I am working on a POC to create Smart City IoT project using Fiware platform.
      I am trying to run end to end flow.
      I have following Docker containers running.

      CONTAINER ID PORTS NAMES

      24f036202f78 0.0.0.0:4041->4041/tcp, 0.0.0.0:7896->7896/tcp fiware_iotagent_1

      81e16c78312e 0.0.0.0:1026->1026/tcp fiware_orion_1

      bf699e1acdd3 0.0.0.0:1883->1883/tcp fiware_mosquitto_1

      bfc256deddd0 0.0.0.0:27017->27017/tcp fiware_mongo_1

      I am using following tutorials.

      http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/

      I am able to create Service and devices. (data is given below).

      Now, when I am sending measurement it is not working.

      Please guide me what am I doing wrong? And if possible provide reference having step by step example to run end to end IoT testing.

      Request Details (Using POSTMAN)
      Header

      Content-Type:text/plain
      fiware-service:FiwareService
      fiware-servicepath:FiwareServicePath
      X-Auth-Token:AuthToken

      POST URL: http://130.206.XXX.XXX:4041/iot/d?k=tourguide-devices&i=restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f

      Body Contents:
      't|25'

      Response:

      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="utf-8">
      <title>Error</title>
      </head>
      <body>
      <pre>Cannot POST /iot/d</pre>
      </body>
      </html>

      Service and Device Data with Header using IotAgent URL i.e. http://130.206.XXX.XXX:4041/iot/
      Header

      Content-Type:application/json
      fiware-service:tourguide
      fiware-servicepath:/
      X-Auth-Token:AuthToken

      Service

      {
      "_id": "5a7063e6b8adcc0001c34723",
      "subservice": "/",
      "service": "tourguide",
      "apikey": "tourguide-devices",
      "resource": "/iot/dev-restaurants",
      "attributes": [],
      "lazy": [],
      "commands": [],
      "entity_type": "tourguide-devices",
      "internal_attributes": [],
      "static_attributes": []
      }

      Device

      {
      "device_id": "restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f",
      "service": "tourguide",
      "service_path": "/",
      "entity_name": "0115206c51f60b48b77e4c937835795c33bb953f",
      "entity_type": "Restaurant",
      "transport": "HTTP",
      "attributes": [

      { "object_id": "t", "name": "temperature", "type": "number" }

      ],
      "lazy": [],
      "commands": [],
      "static_attributes": [],
      "protocol": "UL20"
      }

      Regards,

      Krishan Babbar

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-30 15:07|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-30 15:07|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-02-02 12:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-02-02 12:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-02-02 15:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-02-02 15:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-03-12 00:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-03-12 00:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            josegato Jose Gato Luis
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: