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

FIWARE.Question.Tech.How to issue command to Orion.

    Details

      Description

      Created question in FIWARE Q/A platform on 26-07-2019 at 14:07
      Please, ANSWER this question AT https://stackoverflow.com/questions/57220573/how-to-issue-command-to-orion

      Question:
      How to issue command to Orion

      Description:
      I have a camera and I want to send it a command to take a snapshot. My setup is Orion <-> iotagent-json <> mosquitto <-> device.

      However, when I try to issue a command the iotagent does not receive anything.

      The request I used for provisioning the device (to the agent):

      curl -X POST \
      http://localhost1:4041/iot/devices \
      -H 'Content-Type: application/json' \
      -H 'fiware-service: actuatoriot' \
      -H 'fiware-servicepath: /' \
      -d '{
      "devices": [
      {
      "device_id": "actuatorCamera002",
      "entity_name": "urn:ngsi-ld:ActuatorCamera:002",
      "entity_type": "Actuator",
      "protocol": "PDI-IoTA-UltraLight",
      "transport": "MQTT",
      "timezone": "Europe/Berlin",
      "commands": [

      { "object_id": "screen", "name": "Screen", "type": "command"}

      ]
      }
      ]
      }'

      The device created on Agent:

      {
      "device_id":"actuatorCamera002",
      "service":"actuatoriot",
      "service_path":"/",
      "entity_name":"urn:ngsi-ld:ActuatorCamera:002",
      "entity_type":"Actuator",
      "transport":"MQTT",
      "attributes":[

      ],
      "lazy":[

      ],
      "commands":[

      { "object_id":"screen", "name":"Screen", "type":"command" }

      ],
      "static_attributes":[

      ],
      "protocol":"PDI-IoTA-UltraLight"
      }

      The entity created on Orion:

      {
      "id": "urn:ngsi-ld:ActuatorCamera:002",
      "type": "Actuator",
      "Screen_info": {
      "type": "commandResult",
      "value": "aaa",
      "metadata": {}
      },
      "Screen_status": {
      "type": "commandStatus",
      "value": "UNKNOWN",
      "metadata": {}
      },
      "TimeInstant": {
      "type": "ISO8601",
      "value": " ",
      "metadata": {}
      }
      }

      I have tried sending PATCH requests on the entity values but nothing seems to be getting pushed to the iotagent-json.

      (I have been using the iotagent and Orion for sensor measurements and everything works fine.)

        Activity

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Assignee Fermín Galán [ fermin ]
        fla Fernando Lopez made changes -
        HD-Enabler Orion [ 10875 ]
        Description
        Created question in FIWARE Q/A platform on 26-07-2019 at 14:07
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/57220573/how-to-issue-command-to-orion


        +Question:+
        How to issue command to Orion

        +Description:+
        I have a camera and I want to send it a command to take a snapshot. My setup is Orion &lt;--> iotagent-json &lt;--> mosquitto &lt;--> device.

        However, when I try to issue a command the iotagent does not receive anything.

        The request I used for provisioning the device (to the agent):

        curl -X POST \
          http://localhost1:4041/iot/devices \
          -H 'Content-Type: application/json' \
          -H 'fiware-service: actuatoriot' \
          -H 'fiware-servicepath: /' \
          -d '{
         "devices": [
           {
             "device_id": "actuatorCamera002",
             "entity_name": "urn:ngsi-ld:ActuatorCamera:002",
             "entity_type": "Actuator",
             "protocol": "PDI-IoTA-UltraLight",
             "transport": "MQTT",
             "timezone": "Europe/Berlin",
             "commands": [
               { "object_id": "screen", "name": "Screen", "type": "command"}
             ]
           }
         ]
        }'


        The device created on Agent:

        {
           "device_id":"actuatorCamera002",
           "service":"actuatoriot",
           "service_path":"/",
           "entity_name":"urn:ngsi-ld:ActuatorCamera:002",
           "entity_type":"Actuator",
           "transport":"MQTT",
           "attributes":[

           ],
           "lazy":[

           ],
           "commands":[
              {
                 "object_id":"screen",
                 "name":"Screen",
                 "type":"command"
              }
           ],
           "static_attributes":[

           ],
           "protocol":"PDI-IoTA-UltraLight"
        }


        The entity created on Orion:

        {
            "id": "urn:ngsi-ld:ActuatorCamera:002",
            "type": "Actuator",
            "Screen_info": {
                "type": "commandResult",
                "value": "aaa",
                "metadata": {}
            },
            "Screen_status": {
                "type": "commandStatus",
                "value": "UNKNOWN",
                "metadata": {}
            },
            "TimeInstant": {
                "type": "ISO8601",
                "value": " ",
                "metadata": {}
            }
        }


        I have tried sending PATCH requests on the entity values but nothing seems to be getting pushed to the iotagent-json.

        (I have been using the iotagent and Orion for sensor measurements and everything works fine.)
        Created question in FIWARE Q/A platform on 26-07-2019 at 14:07
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/57220573/how-to-issue-command-to-orion


        +Question:+
        How to issue command to Orion

        +Description:+
        I have a camera and I want to send it a command to take a snapshot. My setup is Orion &lt;--> iotagent-json &lt;--> mosquitto &lt;--> device.

        However, when I try to issue a command the iotagent does not receive anything.

        The request I used for provisioning the device (to the agent):

        curl -X POST \
          http://localhost1:4041/iot/devices \
          -H 'Content-Type: application/json' \
          -H 'fiware-service: actuatoriot' \
          -H 'fiware-servicepath: /' \
          -d '{
         "devices": [
           {
             "device_id": "actuatorCamera002",
             "entity_name": "urn:ngsi-ld:ActuatorCamera:002",
             "entity_type": "Actuator",
             "protocol": "PDI-IoTA-UltraLight",
             "transport": "MQTT",
             "timezone": "Europe/Berlin",
             "commands": [
               { "object_id": "screen", "name": "Screen", "type": "command"}
             ]
           }
         ]
        }'


        The device created on Agent:

        {
           "device_id":"actuatorCamera002",
           "service":"actuatoriot",
           "service_path":"/",
           "entity_name":"urn:ngsi-ld:ActuatorCamera:002",
           "entity_type":"Actuator",
           "transport":"MQTT",
           "attributes":[

           ],
           "lazy":[

           ],
           "commands":[
              {
                 "object_id":"screen",
                 "name":"Screen",
                 "type":"command"
              }
           ],
           "static_attributes":[

           ],
           "protocol":"PDI-IoTA-UltraLight"
        }


        The entity created on Orion:

        {
            "id": "urn:ngsi-ld:ActuatorCamera:002",
            "type": "Actuator",
            "Screen_info": {
                "type": "commandResult",
                "value": "aaa",
                "metadata": {}
            },
            "Screen_status": {
                "type": "commandStatus",
                "value": "UNKNOWN",
                "metadata": {}
            },
            "TimeInstant": {
                "type": "ISO8601",
                "value": " ",
                "metadata": {}
            }
        }


        I have tried sending PATCH requests on the entity values but nothing seems to be getting pushed to the iotagent-json.

        (I have been using the iotagent and Orion for sensor measurements and everything works fine.)
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] How to issue command to Orion FIWARE.Question.Tech.How to issue command to Orion.
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: