[OBSOLETE] MyQ Garage Door Device Type

I just finished and published a complete Device Type for integrating MyQ garage doors into SmartThings. You can get the code for it here:

It’s a 1.0 version, but it should be pretty stable. The newest major release of the SmartThings app has caused a few issues, specifically some odd behavior when reporting the door status while on the overall “Things” window; refreshing or opening the detail view for the door will display the correct status.

For this to work you will need to have doors that you can already control via the MyQ mobile app, as well as the username, password and door name’s used in MyQ.

The type exposes an attribute that contains the current door status: Open, Closed, Opening, Closing and Stopped; as well as two custom commands: Open and Close. It also implements the Switch capability so it can be compatible with existing smart apps that operate switches: On opens the door and Off closes the door.

If you have phantom issues installing your door that don’t seem related to username/password or door name (i.e. they all appear correct) try force-closing the SmartThings app and relaunching. Also, modifying device preferences via the mobile app appears to be a possible source of phantom issues. Modify the preferences using the IDE instead.

Hit me up here or on GitHub for questions, comments, feedback or help getting it setup.

Adam

13 Likes

This is awesome. Thanks, Adam. Thanks for accepting my pull request. Also you can link directly to the code if you like ant it comes into the forum like this:

EDIT: strange - not sure what the preview’s rules are for truncation.

You are probably creating a new Smart App instead of a Device Type handler; I received that error when doing so. Here are the installation instructions:

Installation:

Create the Device Type:
1. Create a new device type, the name can be anything
2. Paste this code into the new device and save
3. Publish the device type, “For Me”

Add a new Device:
1. Create a new device, name it something appropriate
2. Give it a unique Device Network ID
3. Select “MyQ Garage Door” as the Type (should be at the bottom)
4. Make sure “Published” is selected as the Version
5. Select the Location, Hub, etc.
6. Click Create

Setup your Garage Door:
1. Get your Username, Password and Door Name used in the MyQ mobile app
2. Edit your new device’s Preferences and enter the information above

If everything worked correctly, the door should retrieve the current status. If you see “Unknown” there is probably an issue with your username and password; use the logs to capture error information. If you see “Door not Found” your garage door name is not correct.

This looks great but I seem incapable of setting my garage door’s name in a way that this app recognizes it. I’ve tried naming the door in the smartthings IDE with the same name that I see on my MyQ page but I keep getting the “doorStatus: door_not_found” error

Yes, I was creating a new Smart App. Thanks for pointing out my error.

My door is named Garage Door. I’ve tried entering that name to no avail. I’ve renamed my door using the MyQ mobile app to be just Garage. It still doesn’t seem to take.

The door name is not case sensitive, but it it sensitive to punctuation and superfluous characters (spaces, underscores, etc). “Garage” doesn’t seem like it should have that issue. My door name, for example, is “Adam’s Door” and it works fine.

I will add more logging around the door discovery to display the doors it does find, even if they are not matches. That should help resolve door name issues.

Adam

1 Like

Force quitting the Smartthings app and restarting it fixed the problem. I can open my garage door using smartthings now. Thank you so much.

Excellent! I’m glad you got it working.

Adam

Works for me! Like that it all comes together in one ST and do not need to use the Chamberlain app.

Loving this. I was able to get this configured and working quickly before bed last night and am now taking a closer look.

I was hoping to eliminate the need for a separate tilt sensor, but I imagine it’s going to take some additional work on the device type to achieve that. Right now, I am trying to get it working on the Dashboard, but the SmartThings door type of “Garage Door” is currently limited to a standard on/off relay only. When I coupled the opener with a tilt sensor, I can at least get it to show up in the Dashboard. I just can’t open or close it from there yet.

As soon as I get some time, I will play around in the code to see if there is a solution.

I don’t seem to be able to have the opening of my garage trigger my lights the way I can when my windows and doors are opened. Would it be possible to add the Contact Sensor capability to this device type?

We can try emulating the tilt sensor capability within the device type. I’m not familiar with how they work, but we should be able to produce an open/closed value based on the DoorStatus attribute.

Adam

Yes, I can look at adding the Contact Sensor capability.

Adam

1 Like

If you can produce the open/close value, emulating the tilt sensor wouldn’t be necessary. Just the status of open/close, like a standard contact sensor, is all we would need to trigger events.

no matter what i do it always says door not found and im positive i got the login info correct and door name correct as well. i made sure all the info in the preferences were correct in the IDE as well and tried deleting the device and recreating a few times…no luck…can you make the logs show what doors it finds so I can see if it’s written weirdly or something?

this works with this device right?
http://www.chamberlain.com/smartphone-control-products/myq-garage

or is it only compatible with the internet gateway, i figure they both probably use the same API

@a2thejay23 I have the same thing as you and I can’t get it to work either… Just shows Door Status is unknown…

Mine was working fine shortly after installation. Later in the day (and now) I just get the same ? unknown. I did not change anything between when it was working and not. Not sure what’s going on.

In the log I get (when refreshing):

08688a5d-dd55-4f51-974f-b357f2c51543 5:07:45 PM PDT: debug Door Status: unknown
08688a5d-dd55-4f51-974f-b357f2c51543 5:07:45 PM PDT: debug API Error: [ReturnCode:GetMyQErrorMessageFailed, ErrorMessage:Undefined Error]
08688a5d-dd55-4f51-974f-b357f2c51543 5:07:44 PM PDT: debug Door ID: No Door Found!
08688a5d-dd55-4f51-974f-b357f2c51543 5:07:44 PM PDT: debug API Error: [ReturnCode:GetMyQErrorMessageFailed, ErrorMessage:Undefined Error, Devices:[]]
08688a5d-dd55-4f51-974f-b357f2c51543 5:07:43 PM PDT: debug Getting MyQ Devices
08688a5d-dd55-4f51-974f-b357f2c51543 5:07:43 PM PDT: debug Refreshing Door State

That device may have a different internal ID from other MyQ doors. I will add better logging around the door discovery so that information can be discovered.

Adam

Have you tried force-closing the SmartThings app? Someone else was receiving that error and that resolved it. Some weird issues were introduced in the latest version of the app.

Adam