I would like to use one master ESP8266 (with press buttons attached) to send commands to several slave ESP8266 boards, each slave to have several relays connected to it. It would be nice to have some kind of acknowledge returned from the slaves - to confirm that the command has been correctly executed. The main point is to get the master to control the slaves, so I can do without the acknowledge for a start. Ideally, I would like all the ESP8266 boards to communicate through a router, so that at some time in the future, I can control the relays over the internet.
I have thus far controlled relays on an ESP8266 board (Wemos D1), using wi-fi from my phone, through a router, using the code from https://pastebin.com/mjW9CZpr The Arduino IDE is my system of choice. I now need to expand that example.
Any help would be appreciated.