I am curious why simply going to the Amazon Devices webpage will trigger another cycling of the relays. Here is what I see in the serial port log. Has anyone seen this and come up with a solution?
request:"1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>
Got Turn on request
Switch 1 turn on ...########## Responding to /upnp/control/basicevent1 ... ##########
"1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>
Here is a portion of the sketch
void headOn() {
Serial.print("Switch 1 turn on ...");
// digitalWrite(relayPin1, LOW); //relay on
pinMode(relayPin1, OUTPUT); //Open Drain
;delay(3000); //wait for milliseconds 1000ms = 1 second
// digitalWrite(relayPin1, HIGH); //relay off
pinMode(relayPin1, INPUT); //Open Drain
}