I have an ESP8266-01 setup running Sonoff firmware and want to use it as a door switch. I have been searching through the help files and posts here but haven’t found the information on using CONTACT in the items file. If I open and close the door switch connected to the 8266-01 I can see the following errors in the log file
2019-07-08 12:13:29.406 [WARN ] [eneric.internal.generic.ChannelState] - Command 'OFF' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.OFF
2019-07-08 12:13:29.457 [WARN ] [eneric.internal.generic.ChannelState] - Command 'ON' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.ON
I have the door contact set like this in the items file.
I think in your MQTT channel, you want to get rid of the command topic. You do not want incoming MQTT to trigger an openHAB command, you want a state update.
Then you need to convert incoming ON/OFF payloads from the Tasmota into OPEN?CLOSED suitable for a Contact type Item. The binding has a handy tool to do that - fill in the “Custom xxx value” boxes with ON and OFF as required.
Well I was working with the circuit and code yesterday and got it working as a switch to where I can open and close a switch connected to the ESP8266-01 and it will show ON and OFF on the Basic UI. So now I need to figure out how to convert that to show the door OPEN and CLOSE.