Search code examples
mqttiotfiwarefiware-orion

Sending MQTT messages to Orion Context broker


I have a relatively simple switch that sends data whenever the button is pressed (either 1 or 0). The message protocol it uses is MQTT. It is connected to Mosquitto via Wi-Fi and successfully sends data to it (i am able to see it using mosquitto_sub -v -t "#". However, I would like to be able to send this data to Orion Context Broker and then receive it using REST commands and store it using Fiware-Cygnus afterwards.

the topic that sensor publishes messages to is tt/sergo/demo/sw

the name of the sensor presented in mosquitto_sub when sensor is first connected: DMS-A01

the IP - address of sensor: 192.168.0.108

I have installed Iot-Agent UL, which is working, but I don't know how to make it listen to the specific sensor that sends data to Mosquitto. I read the manuals but either missed something or did not find the solution to my problem. I tried using the manual below, but could not apply it to my problem.

Connecting "thing" to Fiware

Thank you in advance, stack overflow community.


Solution

  • Before sending measures you need to do a provision operation for the device using the IOTA-UL API. That provision operation "creates" the device in the IOTA-UL and map it with the corresponding entity at CB. Then, you can start sending measures using MQTT.

    You can have a look to this piece of documentation for more detail.