FIWARE / tutorials.IoT-over-MQTT

:orange_book: FIWARE 203: Provisioning Ultralight with an alternative transport: IoT over MQTT
https://fiware-iotagent-ul.rtfd.io
MIT License
62 stars 44 forks source link

How do I add seven levels in my topic #19

Closed hacralo closed 4 years ago

hacralo commented 4 years ago

I have a message broker deployed in my home which listens to multiple sensors at topic /xxxx/xxxx/xxxx/xxxx/xxxx/xxxx/xxxx. I am trying to connect the broker to iot-agent, but from fiware guide I can see the topic should be of format api-key/device-id/attrs. Is it possible to modify this topic structure to use my original seven level topic? I am new to this whole fiware setup, any help would be appreciated, thanks!

jason-fox commented 4 years ago

You won't be able to use a Standard IoT Agent for that, you will need to create your own custom IoT Agent.

The definition of the MQTT Topics to subscribe to can be found within MQTTBinding.js

The reading of incoming messages can be found in commonBindings.js

To alter the path you will need to follow the instructions found in 205 - Custom IoT Agent

Obviously same applies if using the JSON IoT Agent.

hacralo commented 4 years ago

that was helpful, thanks Jason!