@Marco-Avallone Please use the code syntax for your code snipet. Like this it's very hard to read. Also why do you use caps so much? For me your question isn't clear. What have you tried to actually do that did not work? for 1: just add another child to your sketch for another relay... basically duplicate most of your code for 2: then safe the last state and check it before sending a message Hope that helped.