Skip to content

devsli/ifttt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

IFTTT trigger

Simple CLI trigger for IFTTT

$ ./ifttt -h
Usage: ./ifttt [-1 val1] [-2 val2] [-3 val3] [-k ifttt_key] trigger_name

So you can fire custom event as easy as:

$ ./ifttt light_on
No key is provided. Use option `-k` or environment variable IFTTT_KEY to set the key.
You can obtain it here: https://ifttt.com/maker

To do so you have to connect your IFTTT account to IFTTT Maker channel and either use your key as -k option or save it to your init script:

$ ./ifttt -k 123MyDemoKey123 light_on
Congratulations! You've fired the light_on event%
$ grep IFTTT_KEY ~/.bashrc
export IFTTT_KEY="123MyDemoKey123"

$ ./ifttt light_on
Congratulations! You've fired the light_on event%

You can use up to 3 custom variables:

$ ./ifttt -1 "some param" -2 "another one param" -3 "third" light_on
Congratulations! You've fired the light_on event%

Values will be accessible with names Value1, Value2 and Value3.