I want to send a device command to a device that connects to the MQTT broker. I have the MQTT publish trigger working in the workflow but would like to be able to write the command in the dashboard.
Maybe I can use a global variable and the input controls block in the dashboard?
Hi @Eduardo_wewer !
We have a How-to Guide that should help get you on the right track: How To Trigger a Modbus Write From an Input Control Block. The objective of this guide is to trigger a command on an Edge Compute Device from an Experience, which is slightly different than what you’re asking, but the underlying mechanisms are similar.
Please give this a look and let us know if you have any remaining questions!
I managed to make it work with the Input Control Block and a Virtual button like so:
The value is saved in storage and used elsewhere in the workflow to send the message.