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

[fiware-stackoverflow] FIWARE-IoT Agent: send command to device via MQTT

    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 23-11-2015 at 11:11
      Please, ANSWER this question AT https://stackoverflow.com/questions/33869017/fiware-iot-agent-send-command-to-device-via-mqtt

      Question:
      FIWARE-IoT Agent: send command to device via MQTT

      Description:
      I am using the FIWARE IoT agent [1] to communicate with my devices using MQTT protocol, I create a command to be able to update my device value, Here is my request to create a device:

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

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

      ] } ] }'

      Since I am using MQTT, the filed endpoint is not used on my case but if I delete it the MQTT does not notify my device.
      This request is working but is it the correct way to create a device to be able to send a command to my device via MQTT?

      Thanks in advance for your help!

      [1]https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:17|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:17|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:12|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:12|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:12|UPDATED status: transition Finish| # answers= 1, accepted answer= True

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: