telefonicaid / iotagent-json

IoT Agent for a JSON based protocol (with HTTP, MQTT and AMQP transports)
https://fiware-iotagent-json.rtfd.io/
GNU Affero General Public License v3.0
50 stars 89 forks source link

Subscribe to a specific MQTT topic #711

Closed NunopRolo closed 1 year ago

NunopRolo commented 1 year ago

Hello I have a sensor that sends data by MQTT on a specific topic that it is not possible to change. Topic looks like this: device_type/device_id/phase/power

How can I configure this topic in Fiware IOT Agent? From what I understand from the IOT Agent documentation, the MQTT topic is something like this: apikey/device_id/power/attrs, but I haven't found anything on how to set up a customizable MQTT topic.

Thank you!

mapedraza commented 1 year ago

The IoT Agent specification defines the topic in which is expected to receive the data. This is something that defines the IoT Agent behaviour (you can't change verbs and routes on an external REST API, just consume it).

Being said this, there is a MQTT Broker functionality that allows to synchronise data between two different topics (either different brokers, or the same). This functionality is called MQTT Bridging. This probably could be a solution to your problem. Please consider to close the issue if this comment solve your problem.