<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paul Newman on Medium]]></title>
        <description><![CDATA[Stories by Paul Newman on Medium]]></description>
        <link>https://medium.com/@prnewman?source=rss-d795ed591ae0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*L1M-zU7RleiXug33sWYyVg.jpeg</url>
            <title>Stories by Paul Newman on Medium</title>
            <link>https://medium.com/@prnewman?source=rss-d795ed591ae0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:16:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prnewman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making Your Garage Door Smart,
Part 2]]></title>
            <link>https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-2-eaf126353799?source=rss-d795ed591ae0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaf126353799</guid>
            <category><![CDATA[ifttt]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[smart-home]]></category>
            <dc:creator><![CDATA[Paul Newman]]></dc:creator>
            <pubDate>Wed, 09 Jun 2021 12:39:32 GMT</pubDate>
            <atom:updated>2021-06-09T12:42:25.569Z</atom:updated>
            <content:encoded><![CDATA[<p>In <a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1">part 1</a> of this article, we installed a smart garage door controller and used Home Assistant and IFTTT to control it with Amazon Alexa. In this part, we’ll integrate the garage door controller with Apple CarPlay.</p><p>To get a garage door to appear in CarPlay, its smart controller needs to support Apple <a href="https://www.apple.com/ios/home/accessories/">HomeKit</a>. Since some controllers — in my case, Tailwind — don’t offer a HomeKit integration, we have to use a workaround. This involves:</p><ol><li>Creating Home Assistant webhooks</li><li>Creating IFTTT Applets to call the Home Assistant webhooks</li><li>Creating a Template Cover in Home Assistant</li><li>Connecting Home Assistant to Apple HomeKit</li></ol><p>At the end of this article, you should be able to tap a button on your car’s dashboard touch screen to open or close your garage door.</p><h3>Creating Home Assistant webhooks</h3><p>Previously, we created <a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1#2402">two IFTTT webhooks</a> that we called from Home Assistant to open and close the garage door. This time, we want to do the opposite: Call two <a href="https://www.nabucasa.com/config/webhooks/">Home Assistant webhooks</a> from IFTTT. These will update the garage door’s state whenever it opens or closes.</p><h3>Updating the garage door’s state</h3><p>To store the garage door’s state, we need to add a Boolean (or true/false) variable to Home Assistant using the following steps:</p><ul><li>In Home Assistant, choose <strong>Configuration</strong>, then<strong> Helpers</strong>.</li><li>Click <strong>Add Helper </strong>and select<strong> Toggle</strong>.</li><li>Enter Garage Open in the Name field.</li><li>Enter mdi:garage-open in the Icon field.</li><li>Click <strong>Create</strong>.</li></ul><p>Home Assistant converts the name to input_boolean.garage_open, which is how we’ll refer to it later. (If you want to rename the Boolean variable, click <strong>Garage Open</strong> in the list of Helpers, enter a new value for the Entity ID, and click <strong>Update</strong>.)</p><p>Next, we’ll create two Home Assistant automations that are triggered by calling a webhook. Each of these automations will update the value of input_boolean.garage_open.</p><h3>The Garage Opened webhook</h3><p>Let’s create the IFTTT: Garage Opened webhook first.</p><ul><li>In Home Assistant, choose <strong>Configuration</strong>, then <strong>Automations</strong>.</li><li>Click <strong>Add Automation</strong>, then<strong> </strong>click <strong>Start with an Empty Automation</strong>.</li><li>Enter IFTTT: Garage Opened in the Name field.</li><li>Under “Triggers,” choose <strong>Webhook</strong>.</li><li>Enter garage-door-opened as the Webhook ID.</li><li>Under “Actions,” select <strong>Call service</strong>.</li><li>Under “Service,” select <strong>input_boolean.turn_on</strong>.</li><li>Under “Targets,” click <strong>Pick entity</strong> and choose <strong>Garage Open</strong> (aka input_boolean.garage_open).</li><li>Click <strong>Save</strong>.</li></ul><p>You may want to add another action to this automation that sends a notification to your phone when it runs. This is useful for testing, and you can always remove it later.</p><h3>The Garage Closed webhook</h3><p>Duplicate the automation above to create the IFTTT: Garage Closed webhook, using garage-door-closed as the Webhook ID, and <strong>input_boolean.turn_off</strong> as the service call.</p><p>When you create <a href="https://www.nabucasa.com/config/webhooks/#triggering-automation-with-a-webhook">automations that are triggered by webhooks</a>, Home Assistant automatically generates the webhook URLs for you. To find them, go to <strong>Configuration</strong>, then <strong>Home Assistant Cloud</strong>, and scroll down to the “Webhooks” card. Click the toggle button to make each webhook externally accessible and copy the URLs for later.</p><h3>Creating IFTTT Applets to call the Home Assistant webhooks</h3><p>To update the state of the garage_open Boolean, we’re going to use IFTTT Applets to call the Home Assistant webhooks we just created whenever the garage door opens or closes.</p><h3>The “Garage door is opened” Applet</h3><p>This Applet will call the IFTTT: Garage Opened webhook in Home Assistant.</p><ul><li>Log into IFTTT and click <a href="https://ifttt.com/create"><strong>Create</strong></a>.</li><li>Next to “If This,” click <strong>Add</strong>.</li><li>Search for your garage door controller and select it.</li><li>Click the <strong>Garage door is opened </strong>trigger (or whatever your smart garage door service calls it).</li><li>Select your garage door and click <strong>Create trigger</strong>.</li><li>Next to “Then That,” click <strong>Add</strong>.</li><li>Search for and select the <strong>Webhooks</strong> service.</li><li>Click <strong>Make a web request</strong>.</li><li>Enter the garage-door-opened webhook URL you copied from Home Assistant earlier.</li><li>Choose the <strong>POST</strong> method and the <strong>application/x-www-form-urlencoded</strong> content type.</li><li>Click <strong>Create Action</strong>.</li></ul><h3>The “Garage door is closed” Applet</h3><p>Repeat the steps above to create the Applet that calls the IFTTT: Garage Closed webhook in Home Assistant. Make sure to select the <strong>Garage door is closed </strong>trigger in IFTTT (or whatever your smart garage door service calls it) and enter the garage-door-closed webhook URL you copied earlier.</p><p>You may be wondering, “Why do we need to call these Home Assistant webhooks from IFTTT?” If we’re opening the garage door via Alexa and CarPlay, we already know its state. True. But what happens if you use the remote or wall switch? These webhooks ensure that however you open or close the garage door, its state will always be accurately tracked by Home Assistant.</p><h3>Creating a Template Cover in Home Assistant</h3><p>At this point, we have a Boolean variable that stores the garage door’s state, and two Home Assistant webhooks that we call from IFTTT to update that state. Now we finally get to the fun part: creating a <a href="https://www.home-assistant.io/integrations/cover.template/">Template Cover</a>.</p><h3>What is a Template Cover?</h3><p>To get a garage door controller to appear in CarPlay, we need to add it to Apple HomeKit. And to be recognized by <a href="https://www.home-assistant.io/integrations/homekit/#supported-components">HomeKit</a>, a garage door controller in Home Assistant needs to implement a <a href="https://www.home-assistant.io/integrations/cover/">cover</a> interface. (Covers include blinds, shades, garage doors, and more.) Tailwind doesn’t offer a Home Assistant integration, but it does provide enough information (via IFTTT) to enable us to create our own custom cover. Here’s how:</p><ul><li>In Home Assistant, open configuration.yaml using File Editor.</li><li>Scroll to the end of the file and insert the following markup:</li></ul><pre>cover:</pre><pre>  - platform: template</pre><pre>    covers:</pre><pre>      garage_door:</pre><pre>        device_class: garage</pre><pre>        friendly_name: &quot;Garage Door&quot;</pre><pre>        value_template: &quot;{{ is_state(&#39;input_boolean.garage_open&#39;, &#39;on&#39;) }}&quot;</pre><pre>        open_cover:</pre><pre>          service: script.open_garage_door</pre><pre>        close_cover:</pre><pre>          service: script.close_garage_door</pre><ul><li>Click the red <strong>Save</strong> button.</li><li>On the Home Assistant sidebar, select <strong>Configuration</strong>, then <strong>Server Controls</strong>.</li><li>Scroll down to the “YAML configuration reloading” card and click <strong>Template Entities</strong> to pick up your changes without restarting Home Assistant.</li></ul><p>To verify that the Template Cover works, select <strong>Developer Tools</strong> on the sidebar. Search for cover.garage_door in the list of entities. You should see something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ST_aM0vYMrpwyhLs" /><figcaption>The garage door cover in Developer Tools</figcaption></figure><p>If you are unable to find the cover entity, restart Home Assistant.</p><h3>Understanding the code</h3><p>Let’s take a look at the markup we just added to configuration.yaml.</p><p>The first two lines simply enable the Template Cover in your Home Assistant installation.</p><pre>cover:</pre><pre>  - platform: template</pre><p>Lines 3 to 6 define a cover with a friendly name and an optional device class.</p><pre>    covers:</pre><pre>      garage_door:</pre><pre>        device_class: garage</pre><pre>        friendly_name: &quot;Garage Door&quot;</pre><p>The remaining lines define the cover’s three supported features: a state and two services.</p><pre>        value_template: &quot;{{ is_state(&#39;input_boolean.garage_open&#39;, &#39;on&#39;) }}&quot;</pre><pre>        open_cover:</pre><pre>          service: script.open_garage_door</pre><pre>        close_cover:</pre><pre>          service: script.close_garage_door</pre><p>The value_template variable uses the value of input_boolean.garage_open to expose the state of the garage cover. This is the same value we update by calling the Home Assistant webhooks from IFTTT.</p><p>The last four lines define the two cover services that we can call to open and close the garage door. You can test them using Developer Tools:</p><ul><li>On the sidebar, select <strong>Developer Tools</strong> and then <strong>Services</strong>.</li><li>Search for and select the <strong>Cover: Open</strong> service.</li><li>Click <strong>Pick Entity</strong> and choose <strong>Garage Door</strong>.</li><li>Click <strong>Call Service</strong>.</li></ul><p>Behind the scenes, the cover.open_cover service calls the <a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1#de3c">Open Garage Door script</a> we created in part 1.</p><h3>Connecting Home Assistant to Apple HomeKit</h3><p>We’re almost there. The last step is connecting Home Assistant and Apple HomeKit.</p><p>Remember when I said that <a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1#aee1">Home Assistant avoids the need to purchase a separate smart home hub</a>? Unfortunately, CarPlay integration does require an <a href="https://support.apple.com/en-us/HT207057">Apple home hub</a>. The good news is that if you have an iPad, HomePod, HomePod Mini, or Apple TV, you already have an Apple home hub.</p><h3>Installing a HomeKit integration</h3><p>Home Assistant provides two options to install a <a href="https://www.home-assistant.io/integrations/homekit/">HomeKit integration</a>. The first and easiest is described below. The second requires you to <a href="https://www.home-assistant.io/integrations/homekit#setup">add HomeKit to your configuration file</a>. It’s best to choose one option now to avoid creating multiple instances of the integration (like I did).</p><p>To install a HomeKit integration via the Home Assistant user interface, complete the following steps:</p><ul><li>In Home Assistant, choose <strong>Configuration</strong>, then <strong>Integrations</strong>.</li><li>HomeKit is usually auto-discovered. If you don’t see it, click <strong>Add Integration</strong>, then search for and select <strong>HomeKit</strong>.</li><li>Follow the prompts to choose any domains and entities you want to expose to HomeKit via a Home Assistant bridge.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gA44i1TZsTNMJT6C" /><figcaption>Configuring the HomeKit integration in Home Assistant</figcaption></figure><p>When you’re done, a notification should appear on the Home Assistant sidebar with a QR code. You’ll use this code to add the Home Assistant bridge to the Apple Home app.</p><h3>Adding the Home Assistant bridge to the Home app</h3><p>Now that we’ve installed the HomeKit integration, we need to add the Home Assistant bridge to the Apple Home app.</p><ul><li>If you haven’t already, install the Apple <a href="https://apps.apple.com/us/app/home/id1110145103">Home</a> app on your iOS device.</li><li>Launch the Home app, tap the plus (+) button, and select <strong>Add Accessory</strong>.</li><li>Scan the QR code on the Home Assistant sidebar to add the bridge. You may get a warning that the accessory is uncertified. Tap <strong>Add Anyway</strong>.</li><li>Follow the prompts in the Home app to add the entities you exposed earlier. In the example below, I added the Garage Door entity exposed by the Home Assistant (or HASS) bridge.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*YwsxIZ3ANSgsKcSPzFEJsw.png" /><figcaption>Adding the garage door entity to the Home app</figcaption></figure><p>For each entity, you have the option to use the name provided or enter your own. The Home app also suggests automations, such as opening the garage door when the first person arrives home.</p><p>When you’re finished, you should see the garage door entity and any others you selected on the main screen of the Home app. If you tap the Garage Door icon, it should trigger the IFTTT open_garage_door webhook and open your garage door.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*EMQu2BHdYLxESwYNokrd4w.png" /><figcaption>Opening the garage door using the Home app</figcaption></figure><h3>Controlling the garage door with CarPlay</h3><p>Now it’s the moment of truth. Take your iOS device to your car and connect it to CarPlay. Select the CarPlay dashboard view. Do you see an icon for your garage door? Tap it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a82Lnlvm1cPBNycE" /></figure><p>The CarPlay touch screen should update to indicate that your garage door is opening. Congratulations! You survived the smart garage door odyssey and can now impress your friends and family.</p><h3>Wrapping it up</h3><p>One of the best lessons I’ve learned as an engineer is do what frightens you and don’t be afraid to fail. (OK, maybe that’s two lessons.) It takes far more effort <em>not</em> to do something than to just give it a shot. What’s the worst that could happen? You try again.</p><p>My home automation journey was filled with detours, blind alleys, and hurdles that required learning new skills to overcome them. At times it was frustrating, and I wondered why I began it, but in the end, I got to experience the gratification of completing my original goals.</p><p>This is exactly what appeals to me about software development. No two projects are the same, and every one requires learning and mastering new skills, facing and solving new puzzles and challenges. In the end, it’s the satisfaction of figuring it out that keeps us coming back. That moment when you compile the app and it finally works — it does what it’s supposed to do without crashing.</p><p>The next time you think you can’t learn to play guitar, or bake sourdough bread, or install a smart garage door controller, remember that, as a software engineer, you already have all the skills you need to accomplish it. Just give it a shot.</p><p>— Paul Newman, senior director of engineering at WW</p><p>Interested in joining the WW team? Check out the <a href="https://www.weightwatchers.com/us/ww-corporate-careers">Careers</a> page to view technology job listings as well as open positions on other teams.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf126353799" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-2-eaf126353799">Making Your Garage Door Smart,
Part 2</a> was originally published in <a href="https://medium.com/ww-tech-blog">WW Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Your Garage Door Smart, 
Part 1]]></title>
            <link>https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1?source=rss-d795ed591ae0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8313dac90bc1</guid>
            <category><![CDATA[smart-home]]></category>
            <category><![CDATA[alexa]]></category>
            <category><![CDATA[ifttt]]></category>
            <category><![CDATA[home-automation]]></category>
            <category><![CDATA[home-assistant]]></category>
            <dc:creator><![CDATA[Paul Newman]]></dc:creator>
            <pubDate>Wed, 28 Apr 2021 13:50:37 GMT</pubDate>
            <atom:updated>2021-04-28T13:50:37.906Z</atom:updated>
            <content:encoded><![CDATA[<h3>Making Your Garage Door Smart, <br>Part 1</h3><p>At WW, we try to automate our workflows as much as possible, so it’s not surprising that some of us try to automate our lives.</p><p>My first foray into home automation was making my garage door smart. This was born out of necessity: My wife and I have two cars and only one remote, and I wanted the garage door to open automatically when she returned from work after dark. My ultimate goal was to open and close the garage door using Siri, Alexa, and Apple CarPlay. Little did I realize what I was getting myself into.</p><p>In the end, my home automation journey took me down the following path:</p><ol><li>Installing a smart garage door controller</li><li>Installing Home Assistant on a Raspberry Pi</li><li>Enabling Home Assistant Cloud</li><li>Creating IFTTT webhooks</li><li>Creating Home Assistant automations</li><li>Creating Alexa routines</li><li>Creating Home Assistant webhooks</li><li>Creating a Home Assistant Template Cover</li></ol><p>Does this seem like a lot of work when you can just buy a second remote? You betcha. But that’s not the point. This process reminded me of what I love about software development: the pure satisfaction of finding elegant solutions to complex problems. Puzzle-solving.</p><p>Since we’ll have to save steps 7 and 8 for part 2 of this story, let’s get started.</p><h3>Installing a smart garage door controller</h3><p>I chose a <a href="https://gotailwind.com/">Tailwind</a> controller because it doesn’t have a monthly fee, but there are lots of other good solutions out there. Most of them tap into the existing wiring of your garage door opener or its wall switch and use sensors to determine the current state of the door (open or closed). Before you buy, make sure that your garage door opener is supported and that the controller offers integrations with services that matter to you, such as Amazon Alexa, Siri, Google Home, or Apple HomeKit.</p><p>Since most garage controllers rely on cloud services, read the customer reviews to ensure the product doesn’t suffer from periodic outages.</p><p>Installing the controller shouldn’t take more than an hour or two. When you’re done, you should be able to open and close your garage door with the manufacturer’s mobile app. If you want to do more than that, read on.</p><h3>Installing Home Assistant on a Raspberry Pi</h3><p>With my new garage door controller, I was able to open and close the garage door with a Siri shortcut. I soon realized that if I also wanted to control the garage door with Alexa and Apple CarPlay, I would need a smart home hub. After researching many different options, I decided on the open-source <a href="https://www.home-assistant.io/">Home Assistant</a> platform, which typically runs on a Raspberry Pi computer (or a Docker container).</p><p>The name Raspberry Pi may sound intimidating — it did to me — but installing Home Assistant on a Pi is much easier than you think. It’s also less expensive than buying a smart home hub, like <a href="https://hubitat.com/">Hubitat</a> or <a href="https://www.smartthings.com/">SmartThings</a>. Best of all, using Home Assistant means you don’t have to commit to a single ecosystem: You can pick and choose what works for you.</p><p>For my setup, I purchased the <a href="https://www.adafruit.com/product/4292">Raspberry Pi 4 Model B</a> with case, power supply, and heat sink for just over $50. To install the Home Assistant operating system, I bought a 64-gigabyte micro SD card (yes, the <a href="https://github.com/home-assistant/operating-system">Home Assistant OS</a> can boot from an SD card) and a portable card reader.</p><p>Following <a href="https://www.home-assistant.io/installation/raspberrypi">these detailed instructions</a>, I used the <a href="https://www.balena.io/etcher/">Balena Etcher app</a> to download the Raspberry Pi’s 64-bit disk image and flash it onto the micro SD card. After that, I simply inserted the SD card into the Pi, connected an Ethernet cable, attached the case, and plugged in the power supply. A few minutes later, Home Assistant was up and running at http://homeassistant.local:8123.</p><p>If you don’t want to fuss with installing Home Assistant on a Raspberry Pi, you can purchase a <a href="https://www.home-assistant.io/blue">Home Assistant Blue</a> bundle, which comes with the software preinstalled. All you have to do is plug it in.</p><h3>Enabling Home Assistant Cloud</h3><p>I resisted signing up for <a href="https://www.nabucasa.com/">Home Assistant Cloud</a> (created by Nabu Casa) because I didn’t want to pay for another subscription service, but my WW colleague <a href="https://www.linkedin.com/in/aliillyas/">Ali Illyas</a> reminded me that the monthly $5 fee also supports ongoing Home Assistant development.</p><p>What’s the benefit? As you might expect, Home Assistant Cloud provides you with remote access to Home Assistant, which is useful if you want to open the garage door outside of your Wi-Fi network. Home Assistant Cloud also enables two key features: simplified connection to voice assistants (Amazon Alexa and Google Assistant) and webhooks. Plus, Home Assistant Cloud exposes all your Home Assistant automations and scripts, something that will come into play later.</p><p>To <a href="https://www.nabucasa.com/config/">enable Home Assistant Cloud</a>, go to the Configuration panel in Home Assistant, create an account, and log in. From there, you can turn on remote control and sync entities to Alexa or Google Assistant.</p><h3>Creating IFTTT webhooks</h3><p>Since Tailwind has an <a href="https://ifttt.com/search/query/garage?tab=services">IFTTT integration</a>, I decided to use <a href="https://ifttt.com/maker_webhooks">IFTTT webhooks</a> to trigger my garage door to open and close via Alexa. (Tailwind has an Alexa skill, but you have to say, “Alexa, ask Tailwind to open garage door 1,” to trigger it.) You’ll find your webhook URL by logging into your IFTTT account and navigating to <strong>Webhooks</strong>, then <strong>Settings</strong>. It should look something like this:</p><pre><a href="https://maker.ifttt.com/use/[api_key]">https://maker.ifttt.com/use/<strong>[api_key]</strong></a></pre><p>Before we create the webhooks, add the <a href="https://www.home-assistant.io/integrations/ifttt">IFTTT integration</a> to Home Assistant. In Home Assistant, choose <strong>Configuration</strong>, then <strong>Integrations</strong> and click <strong>Add Integration</strong>. Search for “ifttt” and follow the instructions to install the integration.</p><p>Next, we need to save the IFTTT API key to our Home Assistant configuration.yaml file. To do this, complete the following steps:</p><ul><li><a href="https://www.home-assistant.io/common-tasks/os/#installing-and-using-the-file-editor-add-on">Install the File Editor add-on</a>. (Find it in <strong>Supervisor</strong>, then <strong>Add-on store</strong>.)</li><li>Select <strong>File Editor</strong> in the menu on the left.</li><li>Click <strong>Browse Filesystem</strong> (the folder icon).</li><li>Select <strong>configuration.yaml</strong> from the list.</li><li>Create a new entry in the file with your API key:</li></ul><pre>ifttt:<br>  key: <strong>[api_key]</strong></pre><p>Click the red <strong>Save</strong> button. Restart Home Assistant by choosing <strong>Configuration</strong>, then <strong>Server Controls</strong>, and then <strong>Restart</strong>. It’s good practice to click <strong>Check Configuration</strong> before you restart to ensure that you don’t have a syntax error in configuration.yaml.</p><p>The next step is to create the webhooks that will open and close the garage door.</p><h4>The Open Garage Door webhook</h4><p>To create an IFTTT webhook Applet, complete the following steps:</p><ul><li>From your IFTTT account, click <strong>Create</strong>.</li><li>Click <strong>Add</strong> and search for “webhooks.”</li><li>Click <strong>Webhooks</strong>, then click <strong>Receive a web request</strong>.</li><li>Enter an event name (e.g., open_garage_door) and click <strong>Create Trigger</strong>.</li><li>Click <strong>Add</strong>, then search for your garage door controller (in my case, Tailwind).</li><li>Choose the <strong>Open garage door</strong> action.</li><li>Select your garage door controller and click <strong>Create Action</strong>.</li><li>Click <strong>Continue</strong> and enter a title (e.g., Open Garage Door Webhook).</li><li>Click <strong>Finish</strong>.</li></ul><p>Now that you’ve created the webhook Applet, it’s time to test it. The easiest way is to run a cURL command. Append the API key from earlier to the end of the following command:</p><pre>curl -X POST <a href="https://maker.ifttt.com/trigger/open_garage_door/with/key/[api_key]">https://maker.ifttt.com/trigger/<strong>open_garage_door</strong>/with/key/<strong>[api_key]</strong></a></pre><p>Notice that the event name you created (open_garage_door) is also part of the URL.</p><p>Run this on a command line. If you enabled the “Get notifications when this Applet is active” option in IFTTT, you should receive a push notification on your phone. And with any luck, your garage door just opened.</p><h4>The Close Garage Door webhook</h4><p>Create a Close Garage Door webhook using the same steps as above, and name the event close_garage_door. Test it using this cURL command:</p><pre>curl -X POST <a href="https://maker.ifttt.com/trigger/close_garage_door/with/key/[api_key]">https://maker.ifttt.com/trigger/<strong>close_garage_door</strong>/with/key/<strong>[api_key]</strong></a></pre><p>Did the garage door close? Congratulations!</p><h3>Creating Home Assistant automations</h3><p>Now that we have IFTTT webhooks to open and close the garage door, we need to call them from Home Assistant. We do this by creating automations — specifically, scripts that invoke the webhooks.</p><h4>The Open Garage Door script</h4><p>To create the Open Garage Door script, navigate to <strong>Configuration</strong>, then <strong>Scripts</strong> in Home Assistant and click <strong>Add Script</strong>.</p><ul><li>Name the script Open Garage Door.</li><li>Enter your desired icon. (I entered mdi:garage-open-variant from <a href="https://materialdesignicons.com/">Material Design Icons</a>.)</li><li>Under “Action type,” choose <strong>Call service</strong>.</li><li>Under “Service,” choose <strong>ifttt.trigger</strong>.</li><li>Under “Service data,” enter event: open_garage_door (or whatever you named your IFTTT event).</li><li>Click <strong>Save Script</strong>.</li></ul><p>The final Open Garage Door script should look something like this in the visual editor:</p><figure><img alt="Open Garage Door script in Home Assistant visual editor" src="https://cdn-images-1.medium.com/max/1024/1*Suij1PSNHkmEuweSJ9dMZw.png" /><figcaption>Open Garage Door script in Home Assistant visual editor</figcaption></figure><p>If you’re curious, you can select the three dots on the top right of the page (not shown above) and choose <strong>Edit as YAML</strong> to reveal the underlying markup language:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10b71f66c4a864423fcb430f609106ce/href">https://medium.com/media/10b71f66c4a864423fcb430f609106ce/href</a></iframe><p>After saving the script, click <strong>Run Script</strong> to test it. The IFTTT webhook should be called, and your garage door should open.</p><h4>The Close Garage Door script</h4><p>Duplicate the script above to create the Close Garage Door script, replacing the service data with event: close_garage_door (or whatever you named your IFTTT event). Save the script and click <strong>Run Script</strong> to verify that it works.</p><h4>Exposing the scripts to Alexa</h4><p>To expose the Home Assistant scripts you just created, navigate to <strong>Configuration,</strong> then <strong>Home Assistant Cloud</strong> and scroll down to Alexa. Click <strong>Manage Entities</strong>. Confirm that your Close Garage Door and Open Garage Door scripts appear. (Home Assistant scripts are called “scenes” in Alexa.)</p><figure><img alt="Garage door entities in Home Assistant Cloud" src="https://cdn-images-1.medium.com/max/1024/0*iUCN_z3PcVm86-zY" /><figcaption>Garage door entities in Home Assistant Cloud</figcaption></figure><p>Now open the Amazon Alexa app on your phone or tablet and tap the <strong>Devices</strong> tab. Scroll through the list at the top and tap <strong>Scenes</strong>. You should see your two scripts (mine have been associated with a Garage group in this example):</p><figure><img alt="Garage door scripts in Alexa app" src="https://cdn-images-1.medium.com/max/1024/1*xVgeb0kDtamJb7gP7W_WYw.png" /><figcaption>Garage door scripts in Alexa app</figcaption></figure><p>If you don’t see your two scripts, click <strong>Sync Entities to Amazon </strong>in Home Assistant (go to <strong>Configuration</strong>, then <strong>Home Assistant Cloud</strong>) and try again.</p><h3>Creating Alexa routines</h3><p>Now that we have access to the garage door scripts from Alexa, let’s create a routine that’s triggered by the phrase, “Alexa, open the garage.”</p><ul><li>In the Alexa app, select the <strong>More</strong> tab and tap <strong>Routines</strong>.</li><li>Click the plus (+) button to create a new routine.</li><li>Call the routine “Open the garage”<strong> </strong>and tap<strong> Next</strong>.</li><li>Click <strong>When this happens</strong> and choose <strong>Voice</strong>.</li><li>Enter the phrase “Alexa, open the garage” and tap <strong>Next</strong>.</li><li>Tap <strong>Add action</strong> and choose <strong>Smart Home</strong>.</li><li>Tap <strong>Control Scene</strong> and choose <strong>Open Garage Door</strong>.</li><li>Tap <strong>Next</strong>, then <strong>Save</strong>.</li></ul><figure><img alt="The “Open the garage” routine in the Alexa app" src="https://cdn-images-1.medium.com/max/585/1*8xDtjMClFg3w-pLkXjT01g.png" /><figcaption>The “Open the garage” routine in the Alexa app</figcaption></figure><p>To test this routine, tap the blue arrow. If that works, try triggering it with the phrase “Alexa, open the garage.” You may need to alter the phrase slightly if Alexa says, “Garage doesn’t support that.”</p><p>Repeat the steps above to create a Close the Garage routine, then test it by saying, “Alexa, close the garage.”</p><h3>Summary</h3><p>In part 1 of this article, we installed a smart garage door controller and used Home Assistant and IFTTT to control it with Amazon Alexa. In part 2, we’ll complete this home automation journey and use Home Assistant and IFTTT to integrate the smart garage door with Apple CarPlay, so you can open or close the garage by tapping your car’s dashboard touch screen.</p><p>— Paul Newman, senior director of engineering at WW</p><p>Interested in joining the WW team? Check out the <a href="https://www.weightwatchers.com/us/ww-corporate-careers">Careers</a> page to view technology job listings as well as open positions on other teams.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8313dac90bc1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ww-tech-blog/making-your-garage-door-smart-part-1-8313dac90bc1">Making Your Garage Door Smart, 
Part 1</a> was originally published in <a href="https://medium.com/ww-tech-blog">WW Tech Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>