Text input sitemap (mqtt)

Hi everyone,

I’m quite new to OpenHAB so I hope someone can help me with my question. How can I add an text widget in my sitemap which sends his data to a mqtt server on a certain topic?

Kind regards,
Ruben

Sorry if not understanding.

Are you asking, how to get mqtt data when you click a button on your sitemap?

No, I want to be able to type text in a textbox (within the sitemap) and that the inputted data is transmitted to a mqtt server when I click on a confirm button or something like that.
Do you understand?

Yes, I now understand what your saying, thank you.

I’m not sure if you can type text into a sitemap, if not, you can create a proxy item and label it on your sitemap with whatever text you like. Actually you can have multiple item and text like this. Then write a rule that will do whatever you need when the item is selected in the sitemap.

There is no way to enter arbitrary text on the Sitemaps short of writing your own web page with the form and posting the entry to OH through the REST API. Put the web page into conf/http and put it on your sitemap using a Webview element.