I have been trying to manipuate the TXTI text (true/false) for the lights from the mqtt server and make it in to a picture instead. (Palettes)
Can you help me with ideas or ESL ?
We usually create an event triggered by TXTI input tag. There we process the value of TXT (be it text, JSON, or XML) and based on value, you can set some boolean tag (user variable or item of structured value).
Based on this boolean tag, you can set various attributes (fill color, text color, background, blinking) using the Display palette.
Or just write True/False or map this True/False information into arbitrary text (On/Off) using Status text object connected to “Text palette” of a tag.
Also integer values can be mapped in a similar way (creating a Status text and configuring it as tag’s “Text Palette”.
To a HI user, such a variable will be displayed having a “text” value obtained from the Status text , e.g. “2=Cooling” instead of a plain numerical 2.
Would it be possible to see an example for 1 mqtt device thats using text format, some code snippet with pictures to understand this better?
Thanks
Please look at our documentation of MQTT protocol.
At the end, there is a section titled “An example of communication”. From there, you can download a zip file containing XML export of lines, stations, I/O tags and a picture. After importing to your application, you will have a working example (supposed that you have a locally running Mosquitto broker).