Hi,
I need some help regarding integrating IFTTT and Spark. I’m trying to use the new IFTTT DO app from my iOS to turn on and off a pin on Spark. Here is my script. However, it’s not working. Can someone tell me what is wrong with it?
At the IFTTT end, I’ve one “Spark to Spark Recipe” which will actually monitor for event name and data to activate the function stored on the Spark. On the IFTTT DO, there is a private recipe to publish the event with event name and data.
I couldn't get your code to even compile, was that what didn't work?
the character ” (sometimes referred to as smart quotes in a Rich document) are not the same as " you have smart quotes in the code you posted, but that may be just a cut/paste problem.
it looks like you changed the variable name here...
@BulldogLowell, Sorry, that was a mistake. I was working on some modifications and I posted this question in the interim. I’ve already corrected the mistake and it compiled properly. The problem was not about getting it to compile. I couldn’t get the IFTTT to trigger the event and get the LED to turn ON. I can do it via CLI via the functions.
Here is a slightly modified version which works partially. I was able to use IFTTT DO app to actually turn the LED ON. Unfortunately it won’t go OFF. Not sure what’s wrong.
Unrelated to the actual problem; why would you want to use a Spark.subscribe()? You could just trigger the function directly by using a function trigger. This eliminates having to do DO -> Event -> Function but rather DO -> function. Seems less prone to errors.
@Moors7, I don’t see a direct function trigger on the new IFTTT DO app. All I see is creating events. I’m not sure if one can create a custom DO recipe yet like the rest of IFTTT recipes. If there is one, please do point me to that link. Thanks in advance.
@BulldogLowell, exactly! It’s a mini project to control door lock and get status of the door via the subscribe events. Let me try out your suggestion and will update soon. Thanks for the instructions.
Seeing as the apps are meant to be used on mobile devices, that’s not really strange, is it? I think a lot of the confusion lies in the fact that people use the search function for Spark, and then find the “event” example.
Hi,
I’m a newbie to Spark. I’m making a small project where I need to turn ON a pin (say D7) on spark via the new IFTTT DO feature. Here is the following code that I’ve been trying to use in conjunction with the IFTTT DO feature. It’s not working as expected. Can someone tell me what’s wrong?
Make sure the public/private settings in the IFTTT form match your subscription on your device. If the IFTTT publish is set to private, then your subscribe should be:
Yes. Yesterday I was looking at their site and there was option only to create recipes for ifttt and not for do. Looks like it’s only possible from their mobile app.
@BulldogLowell , thanks for the snippet. However, it is not working the way I wanted the program to function. I’m going to use the suggestion @Moors7 highlighted (use DO -> Function for the time being.
Thanks all of you guys for helping me out. Much appreciated.