If X then send infrared signal.
Turn on TV at 08:00 AM on Mon Tue Wed Thu Fri.
Turn on Air Conditioner when Bot Tweets.
Prepare clientkey and deviceid.
clientkey authenticates the client, in this case IFTTT.
deviceid identifies the IRKit device which you want to send infrared signals from.
First, issue a POST /keys request to IRKit.
see http://getirkit.com/#IRKit-Device-POST-keys for details.
# Search for IRKit on Wi-Fi network.
% dns-sd -B _irkit._tcp
Browsing for _irkit._tcp
DATE: ---Sun 15 Feb 2015---
22:48:57.082 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
22:48:57.427 Add 2 4 local. _irkit._tcp. irkitae42
# Get IRKit's IP address.
% dns-sd -G v4 irkitae42.local
DATE: ---Sun 15 Feb 2015---
22:49:22.863 ...STARTING...
Timestamp A/R Flags if Hostname Address TTL
22:49:23.159 Add 2 4 irkitae42.local. 192.168.1.72 15
% curl -i "http://192.168.1.72/keys" -d ''
HTTP/1.0 200 OK
Access-Control-Allow-Origin: *
Server: IRKit/2.1.2.9.ge55ad73
Content-Type: text/plain
{"clienttoken":"0DA15AE27F0A4615981227FA38023B72"}
Next, issue a POST /1/keys request to our server on Internet using the clienttoken.
see http://getirkit.com/#IRKit-Internet-POST-1-keys for details.
% curl -i -d "clienttoken=0DA15AE27F0A4615981227FA38023B72" "https://api.getirkit.com/1/keys"
HTTP/1.1 200 OK
Server: ngx_openresty
Date: Mon, 16 Feb 2015 06:52:09 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 94
Connection: keep-alive
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: X-Requested-With
X-Content-Type-Options: nosniff
{"deviceid":"3D191C478FAC431E805DC0B1FA0FC6C1","clientkey":"942711A9FBF947E3BD1E84BFD105FD6B"}
Now you've got a clientkey and deviceid.
Prepare the Infrared Signal JSON representation.
Press your boring Infrared remote's button towards IRKit, and issue a GET /messages request to IRKit.
This signal is going to be sent from IRKit when the trigger fires.
% curl -i "http://192.168.1.72/messages"
HTTP/1.0 200 OK
Access-Control-Allow-Origin: *
Server: IRKit/2.1.2.9.ge55ad73
Content-Type: text/plain
{"format":"raw","freq":38,"data":[18031,8755,1190,1190,1190,3341,1190,3341,1190,3341,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,1190,1190,3341,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,1190,3341,1190,3341,1190,3341,1190,3341,1190,3341,1190]}
The response JSON is the Infrared Signal JSON representation.
Create a Recipe on IFTTT, and Activate WordPress Trigger.
Open IFTTT and Sign in, and click the "Create a Recipe" button.
Choose any Trigger Channel.
And choose WordPress Action Channel.
Click Activate.
Input Blog URL, Username and Password field.
Blog URL must be http://ifttt.getirkit.com/,
Username and Password field can be anything.
Click Activate again.
Input clientkey, deviceid and the Infrared Signal JSON Representation.
Click Create a post.
Input your clientkey in the Title field,
and your Infrared Signal JSON representation in the Body field,
and your deviceid in the Categories field.
Press "Create Action"!
Your done!