EasyESP Digital input Detect ? Openhab2 MQTT Inbound configuration

Hi,

I want to read digital status of GPIO 14 on my easy esp connected to openhab.

I am trying with below inbound mqtt configuration but i am not getting any status update in openhab webpage.

Do i need to configure D5 (GPIO 14) Pin as input or keep it as default ?

Switch Node01Door "DOOR STATUS [MAP(door.map):%s]"(MasterBedRoom){mqtt="<[broker:/EASYESP/gpio/14:State:ON:0],<[broker:/EASYESP/gpio/14:State:OFF:1]"}

Please help.

I assume the type is case sensitive, so try state instead of State

Okay i got it now.

But i have 1 more issue.

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.

How can i do that ?

I am on the move so i cant give you a detailed explanation, maybe someone else has the time :slight_smile:. 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 :smile: