Using IFTTT - Controlling my lights from Touch Bar.

Its very easy to add a button on your Touch Bar to control (Toggle) your "smart" lights, or anything IFTTT can control. Im not going through all the setup unless people are interested, but here's a quick synopsis.

  1. Create your IFTTT "applet" using a Webhook control.
  2. Take note of your Webhook key {your key} in your IFTTT account, and the name you gave your applet {event}.
  3. Create your BetterTouchBar Button with the following AppleScript.

return do shell script "curl -X POST{event}/with/key/{yourKey}"

My Example: return do shell script "curl -X POST"

NOTE: I have 100% success with this, but would like to work a way to check the status of the light (On or Off). Right now this will toggle your light, but if its remote (can't see the light) it would be nice to poll the status of the light to know if its on or off. Completely unnecessary, but would be nice.

A full writeup can be found here:

I haven't had the time to look at your write up, but since already using webhooks the setup literally took only 3 minutes. Great idea! I don't wanna flood my limited touchbar real estate with all my switches and outlets, but it is handy for my bedroom lights. You've inspired me to bring all my switches and sensors into a webview HTML overlay though using the webhook method. Thank you for sharing.