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

FIWARE.Question.Tech.IoT.IDAS.Fiware IotAgent: can't send command to a device

    Details

      Description

      Created question in FIWARE Q/A platform on 30-11-2015 at 18:11
      Please, ANSWER this question AT http://stackoverflow.com/questions/34004222/fiware-iotagent-cant-send-command-to-a-device

      Question:
      Fiware IotAgent: can't send command to a device

      Description:
      I approvisionned my device like this:

      curl -X POST http://192.168.1.110:80/iot/devices \
      -i \
      -H "Content-Type: application/json" \
      -H "Fiware-Service: egmsmartcity" \
      -H "Fiware-ServicePath: /egmsmartcitypath" \
      -d ' { "devices": [ { "device_id": "test",
      "entity_name": "sensors:test",
      "entity_type": "sensors",
      "protocol": "PDI-IoTA-MQTT-UltraLight",
      "timezone": "Europe/Paris",
      "endpoint": "notUsed",
      "commands": [

      { "name": "ping", "type": "command", "value": ""}

      ] } ] }'

      It is successufl registered in the context Broker:

      GET on: http://192.168.1.77:1026/v1/contextEntities/sensors:test

      with headers:

      Accept: application/json
      Fiware-Service: egmsmartcity
      Fiware-ServicePath: /egmsmartcitypath

      I got the following response:

      {
      contextElement: {
      type: "sensors"
      isPattern: "false"
      id: "sensors:test"
      attributes: [1]
      0: {
      name: "TimeInstant"
      type: "ISO8601"
      value: "2015-11-30T16:53:45.556269Z"
      }-
      -
      }-
      statusCode: {
      code: "200"
      reasonPhrase: "OK"
      }-
      }

      and then when I try to update the command like this:

      curl -X POST http://192.168.1.77:1026/v1/updateContext \
      -i \
      -H "Content-Type: application/json" \
      -H "Fiware-Service: egmsmartcity" \
      -H "Fiware-ServicePath: /egmsmartcitypath" \
      -d ' {"updateAction":"UPDATE","contextElements":[{"id":"sensors:test","type":"sensors","isPattern":"false","attributes":[

      {"name":"ping","type":"command","value":"22" }

      ]} ]}'

      I got this response:

      HTTP/1.1 200 OK
      Content-Length: 157
      Content-Type: application/xml
      Date: Mon, 30 Nov 2015 17:05:11 GMT

      <updateContextResponse>
      <errorCode>
      <code>404</code>
      <reasonPhrase>No context element found</reasonPhrase>
      </errorCode>
      </updateContextResponse>

      why is it returning "No context element found" ? What have I missed ?
      Thanks in advance for your help!

        Activity

        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: can&#39;t send command to a device FIWARE.Question.Tech.IoT.IDAS.Fiware IotAgent: can&#39;t send command to a device
        mev Manuel Escriche made changes -
        Summary [fiware-stackoverflow] Fiware IotAgent: can&#39;t send command to a device FIWARE.Question.Tech.Fiware IotAgent: can&#39;t send command to a device
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        mev Manuel Escriche made changes -
        Assignee Carlos Ralli Ucendo [ ralli ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        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: