I have a function on my Core and I have just tested it successfully from the CLI by calling spark call *Core_name *function_name
I created a Recipe in IFTTT with the coming_home as the Function Input. This is what I have as an argument passed in via a web page I made which also works successfully. Testing the Recipe from IFTTT did not trigger my Core.
I guess maybe I am unclear as to what should be entered in the Function Input box within IFTTT.
@jasonhodges, I successfully triggered my core using function. I am not sure what you are trying to do, can you give more information, your function is a trigger or an action?
I have Spark.function("coming_home", coming_home); in my *void* setup()
all this function does is make a servo turn back and forth a number of times and then it stops.
When I call the function from the CLI it works.
When I send "coming_home" as the arg through the API via web it works.
IFTTT sees my Core name and this function when I create Recipe but I have not had success with calling the function. Do I need to enter anything in the Function Input box of the Recipe in IFTTT? if so I guess this is where I am stuck. I have tried "coming_home" and coming_home
If you have a function which does not require an input for the âString commandâ, then you shouldnât put anything in the input box. Simply leave it empty, and try again
thanks @Moors7, I have tried leaving the box blank as well with no success. When I run spark list from CLI it returns the name of my Core, ID and that it is online. Next is the following Functions: int coming_home(String args)
Would you mind sharing your full code (or at least the coming_home part)? Also, could you perhaps try to rename it to something without the underscore (ComingHome)? It could be that that causes some unforseen problems, which can then be avoided.
The IFTTT box should show your list of cores, and let you select that function on your core. Are you using a âtriggerâ, or an âactionâ on IFTTT to call the function? Can you provide a screenshot of your ifttt form?
Also got reading a published variable to work but canât get calling a function with parameters to work. I works through CLI but think I donât have the right function input on IFTTT. How should you write the arguments as inputs from the functions below in IFTTT properly?
Oke it works! I was trying a recipe that used gmail as input and it just took like 30 minutes to refresh. Input from spark to output on android notification seems to go quite quick but always notifies double. Maybe because of only having one boundaryâŚ
@Dave Thanks, I did try my âFunction Inputâ with and without quotes with no success. For now I am just triggering via original web app I made. Perhaps Iâll have better luck with other IFTTT/Spark projects
Have you tried leaving the Function Input field blank? Not all functions need params passed to it - I have a recipe working great that merely calls the Function NameâŚ
Did anyone figure this out. I am new to Particle and ifttt and im having the same problem. Just trying to turn D7 on I can get this to work from web browser, but not from call a function. Function list does show up correctly and I can select the function, but it never runs. I have it setup without function input and same issue. Note that it does work from publish an event if I rewrite the Particle code.