Craftsman/Liftmaster Assurelink Garage Door Opener

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Experienced User
Posts: 86
Joined: Fri Sep 21, 2012 7:41 pm

Craftsman/Liftmaster Assurelink Garage Door Opener

Post by rdgerken » Sat Oct 26, 2013 1:04 pm


I have one of these garage door openers from Craftsman/Liftmaster that has an internet gateway module. As far as I know, there is no API or anything available to interface with this directly. It is, however, controllable through an https web page. Does anyone know how I could possibly mimic a login to this secure page, and then issue commands to open/close the doors from EG? In the past, I looked at some python projects like Scapy or Mechanize - and another one I found that looks super interesting (spynner), but otherwise, I'm pretty clueless. I had thought about using something like wireshark to reverse engineer the communications directly to the gateway module, but I'm sure there is probably some kind of rolling code or something to their servers. (Not positive of this, but I wouldn't know for sure until I sniffed those communications a few times). I was leaning towards integrating with the web interface anyways, as I have a Bryant thermostat that works the same way - so if I could figure it out, I could apply it there as well.

Also, most of these packages, like spynner, require quite a few dependencies and installation procedures that I am having a hard time understanding. For example, spynner says to install, you run the command "easy_install spynner" - when I open the python shell in EG, and type this, it not only thinks I'm smoking crack, it knows it. Anyways... total newb here, and I'm hoping one of you more advanced developers can get me at least started on how to install some of these other libraries so I can play around.

Thanks for any input you might have.

Posts: 1
Joined: Mon Nov 04, 2013 10:56 pm

Re: Craftsman/Liftmaster Assurelink Garage Door Opener

Post by jboone9731 » Mon Nov 04, 2013 11:25 pm

If you find what you're looking for can you update your post?
I'm actually working on figuring out this exact thing.

Experienced User
Posts: 86
Joined: Fri Sep 21, 2012 7:41 pm

Re: Craftsman/Liftmaster Assurelink Garage Door Opener

Post by rdgerken » Fri Nov 08, 2013 8:39 am


I do think that Spynner is going to be our best bet for this. The trick is getting that installed to where EG can make use of it. (But really, installing and using Spynner looks like a real challenge as well!)

I found these instructions for a different package in another post, that might work for Spynner - but it's kind of a long shot.

Install Python 2.6
Install Spynner
Copy or move all files from python26/Lib/site-packages to the EventGhost/lib26/site-packages.

Let me know what you think...


Experienced User
Posts: 86
Joined: Fri Sep 21, 2012 7:41 pm

Re: Craftsman/Liftmaster Assurelink Garage Door Opener

Post by rdgerken » Sat Nov 23, 2013 6:12 pm


Well, made a little progress on this. Not quite the exact direction I want to go long term here, but this might be helpful for folks who want to at least get events when the doors open or close. I don't have a way to control them yet. As a disclaimer, there are probably about 400 other ways this could have been done, and I'm betting most of them would have been easier / more robust.

OK - so here are the steps.

1. Get a GMail account if you don't already have one. It does not appear that craftsman allows you to change your email address once you register your internet gateway - I fortunately happened to register with my gmail account. I'm guessing you'd have to reregister with a gmail account if you did not do so initially.
2. In GMail:
A. create a label - I called mine "Alerts"
Add a label to GMail
B. in gmail settings/filters/create a filter - enter "AssureLink Alert" in the subject line, hit create in the bottom right hand corner, then select "Skip Inbox" and "Apply the label" - selecting the label you created in 2A
Create Filter
Set Filter Properties
C. be sure to have IMAP enabled
3. Log into your assurelink account online, create email alerts for all of your doors.

Whenever this script runs (you'll have to schedule it to run every X number of seconds or whatever - as we are polling) - it will generate an event from all the outstanding emails that are marked not read, and then mark them read.

Code: Select all

import urllib2 as req
import HTMLParser
import re
import imaplib

h = HTMLParser.HTMLParser()

# ----------------- USER SECTION -----------------
# login data
realm = 'New mail feed'  #I don't think this one should be changed
url = '' 
user = ''
passwd = 'yourgmailpassword'
alertlabel = 'Alerts'  #Set this to the label you have configured in Gmail

# feed url
feed_url = '' + alertlabel

# codec for subjects
# for available codecs visit
codec = 'latin_1'
# -------------- END OF USER SECTION --------------

# authentication
auth_handler = req.HTTPBasicAuthHandler()
opener = req.build_opener(auth_handler)

# find beginning and end of unread mail count 
# by finding the two instances of the word 'fullcount'

fc_start = response.find('fullcount')+10
fc_end = response.find('fullcount',fc_start+1)-2
unread_count = response[fc_start:fc_end]

if unread_count != '0':
    titles = []; links=['']; ti_start=0; ti_end=0; en_start=0; en_end=0;
    for i in range (1,int(unread_count)+1):
        # find positions of keywords
        en_start = response.find('entry',en_end)+6
        ti_start = response.find('title',en_start)+6
        ti_end = response.find('title',ti_start+1)-2
        li_start = response.find('link rel=',ti_end)+27
        li_end = response.find('type=',li_start)-2
        en_end = response.find('entry',en_start+1)+6
        # extract subject
        utf8_subject = response[ti_start:ti_end]
        # decode subject
        decoded_subject = utf8_subject.decode('utf_8','ignore')
        # encode subject
        subject = decoded_subject.encode(codec,'ignore')
        subject = h.unescape(subject)
        #print subject
        #Parse event from email subject
        evtparse ='AssureLink Alert: (.+) just (.+)',subject)
        #Generate Event from alert email
        eg.TriggerEvent('AssureLink.' +' ','') + '.' +

    #Mark all Alert Label items as read to prevent duplicate events generated
    obj = imaplib.IMAP4_SSL('', '993')
    obj.login(user, passwd)
    typ ,data =,'UnSeen')[0].replace(' ',','),'+FLAGS','\Seen')
  • You might want to set up an autostart script that marks all emails read before you periodically check for alerts. This will prevent a mass flood of events getting created if you don't have the script running for a while. (Just reuse code from bottom of script I posted above.
  • I do not have it currently parsing the date/time, but that would probably be useful to include as a payload or something.
  • I think it might be better to have the emails deleted rather than marked as read... but that's up to you.
  • If we find this thing useful, probably would be best to roll it into a plugin, so that we don't have to dirty up the log with every time it polls. This should be pretty easy to do. I think Pako's network watcher plugin would be a real good starting point for something like this. (I'm a python noob)
*Special thanks to tom.luft for his work on GMail feed reading

Experienced User
Posts: 86
Joined: Fri Sep 21, 2012 7:41 pm

Re: Craftsman/Liftmaster Assurelink Garage Door Opener

Post by rdgerken » Mon Dec 26, 2016 10:13 pm

I have released an actual plugin for this functionality if you search the forum for "Chamberlain MyQ" that should work much better. I still feel like this is an interesting approach I have laid out here for obtaining the door status without the need for polling (like the plugin requires) - so we'll leave this here in case anyone still wants to use a more passive approach.


Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm

Re: Craftsman/Liftmaster Assurelink Garage Door Opener

Post by pearbear » Tue Dec 27, 2016 2:13 am

Link to Chamberlain MyQ plugin thread:

Post Reply