home automation

I am Using ESP8266 wi-fi module for Home Automation, but I have one question Suppose I am Using Two ESP 8266 Wifi module And Connect Relay With D0 Pin Of Both Module, Then How Can I Operate Both D0 pin Differently at a same time?

something like this ?

schematic

PS: common ground between your esp and driver circuit