Limited scope of IFTTT triggers

I set up my Photon to maintain a counter of home many times it ran loop() with a delay of 1 second built into the loop. I set IFTTT to monitor the counter variable and to text me when it exceeded 1000. I did get the text that the variable hit 1000 and then once every minute, I receive another text with the current value which, since it is an incrementing counter, certainly also exceeds 1000. I turned off the IFTTT recipe after this test.

It seems that IFTTT recipes are limited in that they only have a simple condition to test. There is greater then AND less than if you wish to check a range. Of course you can change from monitoring the variable to publishing an event if the value is greater than or less than a range.

But what comes to mind is a temperature application where you wish to be alerted if your Air Conditioner might have failed and to text you if the home temperature goes above 75 degrees. If you do this by monitoring a temperature variable then you will keep getting text messages over and over again while the temperature is too high. If you change the application to publish the temperature excess instead, then you need to be concerned if sending a single event to IFTTT gives you enough assurance that you were alerted properly. You would probably need to periodically post 'temperature to high events to insure you get the text message. I suppose you can then create an IFTTT Do function to tell the Photon to stop publishing excess temperature events until further notice.

It would be nice if I had more control on IFTTT (ranges, filters, conditions - only do this 5 times, etc.). But I suppose the logic here is to do that work in your application and program in being aware of the capabilities of IFTTT.

I love IFTTT but perhaps pushover is a better API for your application. Just code in the parameters you want to receive notifications on the Particle device.

webhook:

{
  "event": "pushover",
  "url": "https://api.pushover.net/1/messages.json",
  "requestType": "POST",
  "query":
  {
    "user": "yourApiUserName",
    "token": "YourApiToken",
    "title": "Spark Notification",
    "message": "{{SPARK_EVENT_VALUE}}"
  },
  "mydevices": true
}

then setup in your program(s) to push notifications like this:

  char myMessage[60] = "";
  sprintf(myMessage, "Kitchen Dimmer now set to %d%%", map(ledStrip.setPoint(), 0, 255, 0, 100));
  Spark.publish("pushover", String(myMessage), 60, PRIVATE); // Spark WebHooks Rock!!!

as an example…

2 Likes