[OBSOLETE] How to: SmartThings_MyQ SmartApp using MyQ Sensors with IFTTT

MyQ for LiftMaster and Chamberlain is not directly supported by Smartthings, so the only way to make it work is by using a SmartApp called SmartThings_MyQ created by brbeaird. SmartThings_MyQ SmartApp works great to open and close the door, but it does not have the ability to natively monitor the MyQ open/closed status. SmartThings_MyQ has a nice feature that allows the ability to add smart tilt sensors to a MyQ controlled garage door for monitoring open/closed status. Smart tilt door sensors can add up in cost depending on how many doors you have and they are not always reliable. Recently MyQ added a premium service feature to support various partner integrations with MyQ. Unfortunately, SmartThings was not one included in the smart partnership, but IFTTT was a selected partner. The service is considered a premium service and normally cost monthly or yearly, but as of 10/25/2020, the service changed from paid to free. Before the limited-time free offer, the cost was only $1/month or $10/year, which can be cheaper than buying smart door tilt sensors with the added bonus of accurate open/closed status. For now, the service can be enjoyed for free unless they make a change to the offer. Unfortunately, starting 10/08/2020 IFTTT has decided for users that need over 3 applets to pay for one of their subscription options. I’ll explain a workaround to this below if you choose not to pay for IFTTT’s subscription model.

IFTTT Subscription:

  • If you only have one garage door you do not need to worry about any IFTTT subscription. You will only need 2 applets.

  • If you have more than one door you have two options.

    • Option 1 (Monthly Payment): Purchase IFTTT’s monthly subscription to have unlimited Applet access. I purchased this and set my price at $1.99 per month. IFTTT is offering this until 10/31/2020. Paying $1.99 per month is fine with me to support IFTTT and have the option to do other things in the future. After 10/31/2020 the cost will start at $3.99 per month.

    • Option 2 (Free): Use additional separate free IFTTT accounts to create your applets. For Example: If you have two garage doors you will need two IFTTT accounts. If you have three doors you will need three IFTTT accounts. Use one account per door.

This guide will explain the steps required to set up your MyQ door sensor status into SmartThings_MyQ SmartApp. If you have questions about setting up SmartThings_MyQ please search the SmartThings community or brbeaird’s Github for additional setup information.

Guide Updated: 10/26/2020

Requirements:

Note1: SmartThings_MyQ SmartApp only supports the ability to add sensors for close/open status.

Note2: IFTTT only supports the ability to add SmartThings switches, locks, and siren/strobes for actions.

The SmartThings_MyQ and IFTTT device compatibility limitations (see Note1 & Note2) requires the need for an all-in-one "simulated (virtual) switch and contact sensor" device. Natively SmartThings does not have a device that can simulate a switch and contact sensor as one. Fortunately, SmartThings gives users the ability to create "device handlers" for use in SmartThings. This section will be the most custom part of the deployment, but since you already setup SmartThings_MyQ you will know most the steps required.

Step 1: Create Device Handler

Here you will create the device handler that will act as an all-in-one switch and contact sensor.

  • 1.1: Login to: https://account.smartthings.com and click “My Locations” and select the location name where the garage door resides.

  • 1.2: Click "My Device Handler"

  • 1.3: Click "Create New Device Handler"
    Pic1

  • 1.4: Select "From Template"
    Pic1

    • 1.4.1: Protocol: "LAN/Other"
      Pic1

    • 1.4.2: Checkbox: "Contact Sensor & Switch"

    • 1.4.3: Enter a Namespace name and device handler name (ex: Simulated Switch and Contact Sensor)
      Pic1

    • 1.4.4: Click "Create"
      Pic1

  • 1.5: Now you will see all the pre-built code after clicking create. You need to replace lines 30-39 with the code below.

// handle commands

def on() {

log.debug "Turning Switch and Sensor On"

sendEvent(name: "switch", value: "on", isStateChange: true, display: true, displayed: true)

sendEvent(name: "contact", value: "open", isStateChange: true, display: true, displayed: true)

}

def off() {

log.debug "Turning Switch and Sensor Off"

sendEvent(name: "switch", value: "off", isStateChange: true, display: true, displayed: true)

sendEvent(name: "contact", value: "closed", isStateChange: true, display: true, displayed: true)

}

Before:

Pic1

After: 

  • 1.6: Click "Save" and then Click "Publish" –> "For Me"
    Pic1

Step 2: Create Device

This step will create your simulated switch/sensor device. You will build one for each garage door opener you have.

  • 2.1: Click "My Devices" at the top of the screen

  • 2.2: Click "New Device"
    Pic1

  • 2.2.1: Here you will name your simulated switch/sensor device. I personally like to name mine with "DO NOT PRESS - Simulated 1 Car Garage Door Switch and Sensor", but you can name the simulated switch any name you would like. Also, the "Device Network ID*" just needs to be unique from any other device. I like to use the same name as the switch with no spaces.
    Pic1

  • 2.2.2: Now under type, you will click the drop down and search for the name of the device handler you created in step 1.
    Pic1

  • 2.2.3: Under Version select "Published"
    Pic1

  • 2.2.4: Under Location Hub select your location, hub information, and Click "Create"

Step 3: Setup IFTTT Applet

Note: myQ’s premium subscription (currently free) needs setup for IFTTT before continuing. See the requirements section for the link.

  • 3.1: Log into IFTTT’s website.

  • 3.2: Click "Create"
    Pic1

    • 3.2.1: Click "If This"

    • 3.2.2: Search for myQ and select

    • 3.2.3: Click "Door closed"

    • 3.2.4: Click "Connect"
      Note: If your myQ account is already linked skip to the next step (3.2.5).

    • 3.2.5: Select the door you want to monitor

    • 3.2.6: Click "Then That"

    • 3.2.7: Search for SmartThings and select

    • 3.2.8: Select "Switch off"

    • 3.2.9: Click "Connect&quot:
      Note1: If your SmartThings account is already linked skip to the next step (3.2.10).
      Note2: When you link your SmartThings you will be asked to select, which devices IFTTT can control. Make sure you select the new devices you created in section 2 at a minimum.

    • 3.2.10: Select the device created in step 2. This will be your simulated switch/sensor device.

    • 3.4.11: Click "Continue"

    • 3.4.12: Click "Finish"

    • 3.4.13: Now go back through "Steps 3.4" and complete these again for the "door open" applet. You will select "Switch On" for this applet. Also, if you have any other doors you will run through the same steps.
      Note: If you did not purchase IFTTT’s subscription service and have more than one door you will run through "Steps 3.4" again, but using a different IFTTT account.

Step 4: Add Simulated Switch From "Steps 2" Into SmartThings_MyQ SmartApp.

This example will be explained using SmartThings app options on an Android device. Most steps should be similar or the same on other platforms. You need to have SmartThings_MyQ setup for this setup to be completed.

  • 4.1: Open SmartThings on your device

  • 4.2: Click "SmartApps"

  • 4.3: Click "MyQ Lite"
    Pic1

  • 4.4: Once open click "Tap to modify account" and connect to your myQ account.

  • 4.5: After you are connected to your myQ account with MyQ Lite, click "Tap to modify devicest"

  • 4.6: Select which garage doors you want to use.

  • 4.7: Under Optional Sensors and Push Buttons select the simulated switch/sensor device you created in "Steps 2" and then select "Next"

  • 4.8: The final page will be your summary page. I already had my doors setup, so my screen says my doors already existed. Click "Done"

  • 4.9: Now go back to the main SmartThings Home page.

  • 4.10: Click the simulated switch/sensor device you created in "Steps 2" and set the switch to "Open".
    Pic1

  • 4.11: Look at your garage door status and check to see if the door now says "Open".
    Note: This will not open the door. This is manually testing the status feature.
    image

  • 4.12: Click the simulated switch/sensor device you created in "Steps 2" and set the switch to "Closed"
    Pic1

  • 4.13: Look at your garage door status and check to see if the door now says "Closed"
    image

  • 4.14: If the simulated switch/sensor device made the correct changes to your garage door, your simulated switch is working correctly within SmartThings. Now let’s test if MyQ and IFTTT will update the simulated switch, which in return will update the "<#> Car Garage Opener" device status.
    Note: This will make your garage door open. Click the open button on your garage door and wait to see if the status changes to "Open" on both your simulated switch/sensor and your garage door devices.
    image

  • 4.16: Close your garage door and check if the status changes to "Closed".
    image

If the open/closed status updates correctly you are all done!

19 Likes

If you have an android control tablet, you can use it to monitor garage status. For free (almost)… I think AutoNotification costs a buck or something, and Sharptools gets a donation iirc.

You’ll need Tasker with AutoNotification, and Sharptools. The setup is simple. I’m doing this from memory so the steps are not ultra detailed, but should be enough to begin to get to where you want to be.

  1. Load the myQ app on the tablet, and get it running with your garage.
  2. In Tasker running AutoNotification, set up a new context. Choose Event, choose plugin, choose Intercept.
  3. Notification App = Chamberlain.

From there, build a new task built on that event. In the task, set it up to act on two things:
A. If %antext contains ‘closed’, do something
B. If %antext contains ‘open’, do something else.
Both the above are done via regex.

The something (and something else) can be your choice. I set up a simulated contact sensor, and Sharptools opens/closes it based on the above.
You could also have Tasker send an http get to a Webcore piston, using %antext to set an argument.

Additionally, if you have an Echo/Alexa setup there’s a chamberlain skill that works to open or close it by voice.

1 Like

Thanks for the information Glen_King! I considered doing something like that while back, but I would rather have everything running on the back end (cloud) and not relying on my phone or tablet. For $10 a year that isn’t much and it provides alerting without a local middle man (android tablet/phone).

Thank you for the clear directions! This worked perfectly. One minor thing: It looks like the device handler coding changed, so that you need to delete and replace lines 39-48 instead.

1 Like

AWESOME tutorial. Works like a charm!

Thanks for the DTH, it makes this so much more user friendly being able to see the status of the door.

One question though, using the new smartthings app, I end up with 2 buttons, one for “Door Control” and one for “Garage Door Control”. Is there anyway to remove the “Door Control” as it doesn’t seem to work half the time and my wife can’t seem to figure out how to use “Garage Door Control” instead…lol.

This was incredibly helpful, thank you!
August 18, 2019: IFTTT has updated how some of their interfaces work. The “+This” will not result in what KV14 has described, but you can still create your own IFTTT routine by going to: https://ifttt.com/create

Then you click the big text +This:

Having issues here and hope that the brain trust here can help. For some reason in IFTTT bringing in the door information from MyQ won’t load and or display. These are the things I’m getting, any help will be appreciated. MyQ was of no help, not that I expected much.

Did you try disconnecting MyQ from your IFTTT account and reconnecting?

I’ve completely removed all items and resubscribed then linked them all back up into IFTTT. I’ve just about got all of these procedures memorized from repeatedly retrying. It’s very strange even if I bring up an applet that is already existing in IFTTT for MyQ it will give me that issue with connecting to service, however it displays the switches that were setup in ST just can’t pull the data for the doors in MyQ. Thanks for the reply by the way, contacting MyQ was pointless and IFTTT would be a hopeful response.

I had this problem initially too. I fixed this by going to https://www.myqservices.com/account/login and adding a free subscription to IFTTT. Hopefully this works for you!

3 Likes

This is great, I really wanted to use for my electric sliding gate. The gate is in MyQ but when i try to create a trigger the only option i’m given is my Garage door and not the Gate. I guess Garage doors and powered gates are handled differently between MyQ and IFTTT? Anyone able to see a gate as a IFTTT trigger?

Hello, I’ve been trying to figure this out but have hit a wall. I’ve followed through all the steps but where I’m stuck is in creating the IFTTT action. When I get to the point of trying to select my virtual switch it does not show up in the drop down. I went in and authorized all my SmartThings devices on IFTTT but the simulated switches show up as contact sensors and not switches. Any ideas?

**Just want to follow up on this and how I fixed it.

I went to the device handler page and then went to Simulator. I added both the simulated switches and cycled them on and off. Then I saved and published for me and they then showed up as switches in IFTTT.

Thanks for the instructions. I got through most of it but after 4.7, MyQ Lite throws an error:

“There was a problem updating devices. java.langNullPointerException: Cannot get property ‘deviceNetworkid’ on null object.
Line number: unknown
Last successful step: Sensor indexing”

Incredible! this is working flawlessly, thank you so much!

Worked like a charm!! Now I can automate porch lights coming on when we pull in after dark. Thanks so much!

Thank you for this! If I’m understanding this correctly, you’ll only need IFTTT if you plan to automate lights/locks other smart devices when the garage opens/closes?
But at a minimum, after adding this device handler, you will be able to see status and control (open/close) garage door through the ST app. Is this correct??
Thanks in advance

You can sync MyQ LIGHTs directly using the same technic. Works like a sharm!

I didn’t even think of this. Good call as there’s no other good way to keep that in sync!

This was my first Smartthings/IFTTT project and it worked perfectly! Not only did I get it working but it helped me with basic understanding of how Smartthings and IFTTT work. Thank you!

After this, I added an Alexa command to close the garage. No problem there.

Now that Smartthings and Alexa can communicate, and Smartthings knows the status of my garage, is there a way to ask Alexa the status of the garage and have Alexa respond based on open/closed?

I tried IFTTT if Alexa voice, then Smartthings but under Smartthings services, I did not see anything that would allow me to tap into this device we just created.