I have 1 switch which turns fan on, Now Fan is operated by Openhab and also manually. I am reading feedback on another digital input on ESP Whether fan has been on by manual button on wall and want to read its status on same switch in openhab. how can i do it ?
Sending Command to Turn fan on by openhab Switch LIGHT1 "Bed Side Light" (MasterBedRoom){mqtt=">[broker:/EASYESP/gpio/16:command:ON:0],>[broker:/EASYESP/gpio/16:command:OFF:1]"}
Reading Fan AC 230 Status (using optocoupler and giving to Digital input of nodemcu) Switch LIGHT1 "Bed Side Light" (MasterBedRoom){mqtt="<[broker:/EASYESP/FEEDBACK1/feedback1:command:ON:0],<[broker:/EASYESP/FEEDBACK1/feedback1:command:OFF:1]"}
I want to read the same status ON/off in same openhab switch how can i do it ? above statements are true ? but i am unable to read status. In MQTT fx i am able to read 0 and 1.
in short i want to use switch for turning on Relay through openhab and want to read status of AC signal of the same using digital input.
I am on the move so i cant give you a detailed explanation, maybe someone else has the time . Just a quick shove ib the right direction: you have to map the 1 and 0 from mqtt to on and off. Looking in the log you should see some errors as well. Here is the end of my item with a working switch: “feedback1:state:MAP(de.map)]”}"
Hope it helps, otherwise i will be certain there are a couple on this board who are able to give a more detailed explanation