Hi there
I'm trying to activate a Maker recipe on IFTTT to cycle my Philips Hue light on and off.
I'm using a curl command supplied by Maker. It works fine on terminal, but won't fire the recipe through arduino.
Here's the code. Any suggestions?
#include <Process.h>
#include <Wire.h>
#include <Console.h>
Process p;
void setup() {
Bridge.begin(); // Initialize the Bridge
Console.begin();
// Wait for Console port to connect
// while (!Console);
}
void loop() {
delay(500);
p.begin("curl -X POST https://maker.ifttt.com/trigger/Turn_Off/with/key/nYU642YiFwwuJApYyJTRBo2kXAWjEHAPieY9lG7grla");
p.run();
Serial.println("Turning Off");
while (p.available()>0) {
char c = p.read();
Serial.print(c);
}
// Ensure the last bit of data is sent.
Serial.flush();
delay(20000);
delay(500);
p.begin("curl -X POST https://maker.ifttt.com/trigger/Turn_On/with/key/nYU642YiFwwuJApYyJTRBo2kXAWjEHAPieY9lG7grla");
p.run();
Serial.println("Turning On");
while (p.available()>0) {
char c = p.read();
Serial.print(c);
}
// Ensure the last bit of data is sent.
Serial.flush();
delay(20000);
}