Hi, anyone got a pointer for what i’m trying to achieve?
I just want to show the last message or string from a given topic in a sitemap or habpanel…
Thanks in advance
Hi, anyone got a pointer for what i’m trying to achieve?
I just want to show the last message or string from a given topic in a sitemap or habpanel…
Thanks in advance
Look at the end of my example here where I assign a topic message to a variable (number in this case) then display it on the sitemap;
String Mqtt_info “Title [%s]” {mqtt="<[OH2:home/#:state:JSONPATH($.value)]"}
This is the start of what i want to do… just to show the last message received on a topic. Can i just create an item to show the last received output of a topic? or do i need to format it first in someway?
The info received on a particular topic could be numerical or text, does that matter?
Sorry if i’m being dense…
If the value returned by the JSONPATH transform can be parsed into a number, you can have a Number item if not, it can be a string item.
If the value can only be ON or OFF the item be a Switch item and so on.