Automation

I have installed openhab and MQTT and ESP EASY to ESP8266 12E.How to control 4 channel relay using ESP8266 12E. Please help me out in automation with openhab,mqtt,esp8266 12E.Thank you in advance

Do it exactly like stated in the MQTT docs:

http://docs.openhab.org/addons/bindings/mqtt1/readme.html#example-outbound-configurations

Switch mySwitch {mqtt=">[mybroker:myhouse/office/light:command:ON:1],>[mybroker:myhouse/office/light:command:OFF:0]"}

You need to specify the gpio where the relay IN is connected to:

Switch Relay "Relay" <switch> {mqtt=">[mosquitto:/esp8266two/gpio/4:command:ON:1],>[mosquitto:/esp8266two/gpio/4:command:OFF:0]"}

So you need four switches with four different gpio configs …