Hello, i’m new to openhab and i need some assistance for reading the state of a switch via mqtt launching a query.
I explain why: i’m using some esp board that report output status after a query.
for example to read the status of gpio4 i need to write via mqtt topic
espboardname/toesp/{out14?}
espboardname/toesp/ is the topic and
{out14?} is the payload
and after a second or so the board reply:
espboardname/fromesp/OFF
or
espboardname/fromesp/ON
as the status of gpio is ON or OFF.
I have successfully made and item to change the gpio state, but i’m here stuck with the reading of the state.
I need that becouse i can change the state also outside openhab2 ambient