My project works, but fustratingly I’m it also gets activated at random and I can’t work out why. Any experience or advice gratefully received.
I’m using IFTTT to take instructions from Amazon Alexa, and link to a Particle Photon. The code works fine, with voice controls being sent to IFTTT and triggering the IFTTT Applet, as shown in the IFTTT log. However, I also get random actions triggered every hour or so and I can’t work out why. There’s no trace of them in the Alexa or IFTTT logs, and the Particle Log only seems to show events published by the Photon, not actions triggered by IFTTT.
My code is pretty innocuous, with setup subscribing to the appropriate IFTTT Applets:
Particle.subscribe("doorClose", closeTheDoor);
Particle.subscribe("doorOpen", openTheDoor);
…and subroutines that just lift specific pins (which in turn throw relays):
void closeTheDoor(const char *event, const char *data) {
digitalWrite(closeDoor, HIGH);
delay(24000);
digitalWrite(closeDoor, LOW);
}
void openTheDoor(const char *event, const char *data) {
digitalWrite(openDoor, HIGH);
delay(24000);
digitalWrite(openDoor, LOW);
}
…happy to provide more details, but any advice or pointers for places to look would be greatly appreciated.
Bill.