Modeling a Command / service on MQTT Thing


I’m trying to model a “reset” command / service on a MQTT Thing (that just publishes a static json).
I’m not really sure how to do that the OH way ? Shall I create a channel ? What would be the type ? Ideally I would like to link it to an item that renders as a button (note sure what type of Item to use either…)

Thank you in advance.

There are two ways you could do it, a rule or a Channel on a Generic MQTT Thing.

Sure. From what you describe it sounds like a switch Channel would be use. Put your static JSON into the on value/off value fields. When the Switch Item receives a command it will publish the JSON.

Rendering the widget as a button is going to take some configuration to make it look like you want. But set the widget action to command ON to the Item when clicked.

Ok, thank you … I’m really confused by all those Smart Home paradigms.
My goal was to model a couple of device twins and rely on out of the box rendering behavior to generate basic UI.

I have now successfully moved all of my automations to the edge devices and gateways. As a result, I plan to discontinue using an Home orchestrator altogether and just go for Grafana / prometheus for historization and basic dashboads.