IFTTT / BTT Controlling Smart Lights/Garage Door from Touch Bar using IFTTT

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 https://maker.ifttt.com/trigger/{event}/with/key/{yourKey}"

My Script Looks like this:

return do shell script "curl -X POST https://maker.ifttt.com/trigger/SunRoomLight/with/key/c4j433LR4l6KfXdbfg1SSp"


UPDATE:
Made a few changes (adding a notification popup when light is turned on/off) and added Smart Garage door opener to Touch Bar.

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: https://www.imore.com/how-use-ifttt-touch-bar-macbook-pro

Enjoy my work?
paypal.me/K2DesignLab

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.

I create a separate group for "smart" devices. I have others I may add in the future, for now a single button on my "tools" bar opens the full group of lights. (House Icon on far left)

Enjoy my work?
paypal.me/K2DesignLab

Do you mind @K2DesignLab if you could share your preset? Looks awesome to me!

1 Like

I haven't created this as a preset to share. The idea came from another preset Aqua, found here (4 main menus - on the right). I currently have many code entries that are specific to my setup. I can show you all the tools I have created and will work on a preset that I am able to share publicly soon enough.

Main/Blank

Finder Tools:

Finder Sub Menus:


Weather:

Tool Menu Main:

Tool Sub Menu Extras:

Tools Sub Menu Volume:

Tool Sub Menu Smart Home:

Calendar, Sports schedules and Events

Applications and Network/IP tools

Looks great! Would live to tryout this preset as soon it's ready!

Made a few changes (adding a notification popup when light is turned on/off) and added Smart Garage door opener to Touch Bar.

Made a few more changes to my Preset. Adding Smart Home Group/Menu to my Main Menu selections. Saving room on my other control group and allowing for more devices in the future. Still needs some tweaking... but now shows the light relay status for each TP-Link smart plug/device (Red-Green).

Imprint | Privacy Policy