hi, I want to send values to an mqtt broker.
I defined an things, added channels and linked them to items, all using paperui.
The only thing that works is the display of a status end settings topic. but for the values to be send to topics, I do not have any input fields.
What i basically want to do is send a string, for example 2345, and this being a value which is read by an esp32 subscribing to the topic.
When i try to use a dimmer, or switch, the corresponding icon is shown, but when i just want to enter a number/string, i do have an input field ?
Anybody can help?
attached a screen copy of the config and the classicui (basicui is same, but i does not allow to show the complete text for the status and settings topics
Nothing to do with MQTT. No, there are no general purpose “free text entry box” widgets in the sitemap based UIs.
You can enter numerics with a Setpoint widget, or choose from predefined strings with a Selection widget, or a Switch widget with mappings.
sorry for the delay, and thank you for your answers.
my problem is that I am confused with either using files to define things, and then to use the builder to define them.
I never know what has to be done where. I have very little experience with OpenHab so far.
Again, my objective is to send strings to a microcontroller using mqtt. The strings represent mainly digits, like time in the format 1210 for 10 past 12, or 1815 for quarter past 6 pm, or 20 for duration of 20 minutes, or 3450 which is another value.
so basically the strings represent numeric values, so a slider could be the best solution.
This slider than has to be available on the user interface and when I change it, the information should be send to a topic. I defined the topics, but the data input part is missing.
It would be nice to have a step by step tutorial, but I have not found one so far
Most recommend using PaperUI for creating the Thing and use files for your items. The important thing is to only create the Thing in one place, either via PaperUI or files, not both. The same goes for items and links.
First make sure OH can send the info and the device receives it. After that you can create a rule with a proxy item and use the proxy item (slider added to sitemap??) to update the value that needs to be sent to the device.
In addition to what @H102 just posted, once you have managed to send the values via a rule you could have a look into HABPanel. This other UI for openHAB can be configured to have input fields. I’m using such for a text input, numerical should be possible as well or even a timepicker. But stick to the suggested steb-by-step and start with using a rule to send the values!