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

FIWARE.Question.Tech.FIWARE: IotAgent-json over MQTT.

    Details

      Description

      Created question in FIWARE Q/A platform on 10-08-2022 at 12:08
      Please, ANSWER this question AT https://stackoverflow.com/questions/73306361/fiware-iotagent-json-over-mqtt

      Question:
      FIWARE: IotAgent-json over MQTT

      Description:
      I'm working on connecting sensors to a FIWARE system.
      The sensor can report the monitoring data with MQTT in json payload.
      With a public mqtt broker(hivemq), I can get the monitoring data payload as below:
      {
      "src":"shellyplus1pm-7c87ce64d540",
      "dst":"shellyplus1pm-7c87ce64d540/events",
      "method":"NotifyStatus",
      "params":{
      "ts":1659606613.35,
      "switch:0":{
      "id":0,
      "apower":38.04
      }
      }
      }.
      my questions are:
      (1) the sensor can only publish data on topic DeviceId/events/rpc, but if I use FIWARE IotAgent-json, the IotAgent-json expects subscribing data on topic /json/api-key/device-id/attrs (according https://github.com/yanpengwuIoT/tutorials.IoT-over-MQTT), how can I let the IotAgent-json subscribe data on topic DeviceId/events/rpc, which is sensor firmware defined and can't be changed.
      (2) the sensor publishs monitoring payload as a nested multi-level json object as showed above, but the IotAgent-json can only support a single level json object (like '

      {"h": 70, "t": 15}

      ' as described in https://github.com/telefonicaid/iotagent-json/blob/master/docs/usermanual.md), how can I parse the multi-level json object in IotAgent-json?
      Any comment, sample or documentation for this are very appreciated! Thank you very much.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        4d 5h 21m 1 Jason Fox 15/Aug/22 12:53 PM
        In Progress In Progress Answered Answered
        18h 38m 1 Backlog Manager 16/Aug/22 7:31 AM
        Answered Answered Closed Closed
        6d 1h 37m 1 Jason Fox 22/Aug/22 9:08 AM

          People

          • Assignee:
            jason.fox Jason Fox
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: