share your current network and your master + slave code.
given its a 'home' wired network I am going to assume you are using some thing as RS485 as you physical network.
that sounds, simple enough....
the way I would go about is to create a message frame ( Serial Input Basics - updated is a good material for that) with a header byte and at least a data byte.
the header will be a a 'unique ID' for each slave and master node and the data byte will contain the value to be worked on.
you did not share much but I will again assume that the slaves do not need to be constantly transmitting stuff among themselve ie unless the master ping them there as silent.
so with that, whenever the master wants to turn a slave on/off, it will first send out a message frame to request its status the following said slave reply, the master can then 'decide' when it actually needs to do the intended action.
hope that is not too confusing!