IFTTT doesn't trigger a function

Hey guys,
as my first project I wanted to trigger a function with IFTT, but nothing happens :disappointed:.

I hope you can help me.

void setup() {
Particle.function("status",statusToggle);
}

void loop() {

}
int statusToggle(String command)
{
if(command.equals("on")) {
    system("monitor_on.sh");
    return 1;
}
else if (command.equals("off")) {
    system("monitor_off.sh");
    return 0;
}
else {
    return -1;
}

Try blinking an LED first? How are you checking that “it is not working”?

Thnx for responding!!
The scripts are working all right on their own, but when disconnecting/connecting to the wifi the scripts aren’t activated.

Do they work when you call the function manually?
You can use the Console, CLI, app, or my page to test that easily.

1 Like

I found my mistake!!!:smiley:
The path in system() was too unaccurate.