Sending Commands from ThingsBoard to RAK3172 to Control a Relay

I have successfully connected my RAK3172 module to the RAK7289 gateway and integrated it with ThingsBoard Community Edition.

Currently, I am able to send data from the MCU to ThingsBoard. Now, I want to implement downlink communication to control a relay connected to the RAK3172 by sending a command from ThingsBoard.

I have added a switch widget to the ThingsBoard dashboard, but I am unsure about the next steps. Should I configure an MQTT integration in the ThingsBoard rule chain, modify the RAK3172 firmware to handle downlink messages, or take another approach? Any guidance on how to properly set up the downlink communication to activate the relay would be greatly appreciated.


Thank you!

I’m not very sure, but I think this is the path by using rule chain like in the picture .

Image

I think I can send data to the gateway rak7289, I didn’t know actually how to link the switch control to the rule chain and if I’m obliged to use even RPC I just need to the order from the switch to the gateway rak7289

Not sure about how to initiate downlinks from ThingsBoard. Never used ThingsBoard.

But we have an example code to control a relay RUI3-Relay-Class-C

thanks for the help mr @beegee