Author Topic: Chamberlain/Liftmaster MyQ Plugin  (Read 120426 times)

Offline jeff3lo

  • Full Member
  • ***
  • Posts: 110
  • Karma: +1/-0
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #30 on: May 01, 2014, 11:59:43 pm »
For the sake of testing, I also downloaded macrho's version (I was testing with guessed's version earlier).

macrho, you were right.  With your version, I rebooted the Vera a few times and the Username and Password text boxes magically showed up!  I then entered my MyQ login (the same I put in my iPhone app).

Unfortunately, I ended up at the same place:
1. On reboot, UI5 kept saying "startup lua failed" for the new MyQ device I created
2. I do not see any child device created for my connected garage door

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #31 on: May 02, 2014, 06:25:58 am »
@jeff3lo: How many garage door openers do you have? How many places do you have?
Places are in the MyQ app on your phone

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #32 on: May 02, 2014, 10:39:56 am »
@guessed, I had to make a couple of changes:

anywhere where I saw:
Code: [Select]
    return false, "message"

I had to put

Code: [Select]
    return false, "message", "LiftMasterOpener"

also the json library was telling me that the decode method was a nil so I went back to the old json library I was using and it worked

Not sure how to test further

Offline waltzer11

  • Sr. Member
  • ****
  • Posts: 285
  • Karma: +0/-3
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #33 on: May 02, 2014, 04:52:11 pm »
To load @macrho's plugin, you upload all 6x files to Vera.
Then use:
     Apps -> Develop Apps -> Create Device

In that UI, I only fill in:
  Description = LiftMaster Garage Opener and;
  Upnp Device Filename = D_LiftMasterOpener.xml

Then (Create Device) followed by (Save/Reload)

Once it comes up, open it's dialog, select the [Advanced] tab, and enter values for
  Username = your MyQ email address and;
  Password = your MyQ password

Another (Save/Reload) operation, and the child Garage Door Opener device should appear

pardon me, will this plugin also work with chamberlain? if so, shall i change "liftmaster" to "chamberlain" for all the 6 files. i have a chamberlain GDO (newly installed) and a MyQ gateway internet. thanks.

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #34 on: May 02, 2014, 04:58:19 pm »
No need to rename anything. I was having some problems with guessed's upload but give it a try and see if it works. Please note, this is really early on and isn't exactly end user friendly. I'm learning as I go but I have been successful in controlling my garage doors through this

Offline jeff3lo

  • Full Member
  • ***
  • Posts: 110
  • Karma: +1/-0
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #35 on: May 02, 2014, 11:24:48 pm »
@macrho, I have a pretty "standard" setup:  1 LiftMaster GDO, and inside MyQ, I have 1 place called "Home" and 1 associated GDO called "Garage Door".  So I just have 1 of everything.

Thanks for looking into this.

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #36 on: May 03, 2014, 11:50:56 am »
@jeff3lo: I have a new version that incorporates guessed's changes but changed the JSON
I believe this should work (85% chance) -- the MyQ device [or whatever you named it] should be updated with the last time it pinged the services. There's really no error handling built in (yet)
Give it a whirl

Offline jeff3lo

  • Full Member
  • ***
  • Posts: 110
  • Karma: +1/-0
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #37 on: May 05, 2014, 11:06:20 am »
Thanks macrho!  MyQ2.zip worked for me.  Here is my observation:

1. I uploaded the new files, and created a new device
2. When I initially looked at the "Advance" tab, there was no Username and Password
3. I started to reload Vera a few times, and Username showed up
4. I put in my MyQ Username there, and continued to reload a few more times, the Password showed up
5. I put in my MyQ Password there, and continued to reload a few more times, the Child Device "Garage Door" showed up
6. Everything works perfectly after that (including Last Update, Open Garage Door, Close Garage Door)!

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #38 on: May 05, 2014, 11:57:29 am »
I've noticed after about 12 hours or so the token is no longer valid and the parent device doesn't get updated. I have yet to code a check for an expired token, next on my list. I'll do some research into making sure the username and password are visible upon initial reboot -- I'm learning.
Excellent that it worked for you, I'll keep plugging away on the code

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #39 on: May 05, 2014, 06:12:37 pm »
Another small update, should request a new security token if one expires
Still a lot more work to do when I get the time

Offline strat

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #40 on: May 06, 2014, 08:01:37 am »
I have the MyQ Garage (MYQ-G0201) with one door opener which happens to be a Chamberlain. While I'm able to get past the username / password steps, the child device never shows up and "CommFailure" = 1.

Is it possible the MyQ Garage has a different TypeId (GATEWAY_DEVICE) with respect to the MyQ gateway (e.g. not equal to 49)?

I'm not familiar enough with the system to know how to debug this code on the micasaverde such that I can see what type id is returned. Is there a simple way to dump that variable somewhere where I can look at it?

Thanks macrho!  MyQ2.zip worked for me.  Here is my observation:

1. I uploaded the new files, and created a new device
2. When I initially looked at the "Advance" tab, there was no Username and Password
3. I started to reload Vera a few times, and Username showed up
4. I put in my MyQ Username there, and continued to reload a few more times, the Password showed up
5. I put in my MyQ Password there, and continued to reload a few more times, the Child Device "Garage Door" showed up
6. Everything works perfectly after that (including Last Update, Open Garage Door, Close Garage Door)!

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #41 on: May 06, 2014, 01:04:51 pm »
You can do it through your browser, get the security token by going here:

https://myqexternal.myqdevice.com/Membership/ValidateUserWithCulture?appId={0}&username={1}&password={2}&culture=en

but substitute:

{0}=Vj8pQggXLhLy0WHahglCD4N1nAkkXQtGYpq2HrHD7H1nvmbT55KqtN6RSF4ILB%2fi
{1}=Your email address
{2}=Your password


Then use:

https://myqexternal.myqdevice.com/api/UserDeviceDetails?appId={0}&securityToken={1}

with the following substitutions

{0}=AppID from above
{1}=Your security token that is returned from your first call


macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #42 on: May 08, 2014, 05:45:23 pm »
I have USB logging turned on, where does one find the log files? The plugin stops working after about 2 days and I'd like to track down the error message but as best as I can figure, log files only last a day.

Getting closer to having something ready -- anyone with any comments on what has been produced so far in this plugin? I see there are some downloads but not any comments

Offline strat

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #43 on: May 08, 2014, 05:48:58 pm »
With the MyQ Garage the opener is showing up as 49. I changed the number in the code and I get further along before but it doesn't properly get the door status. Tossing in log() calls is only getting me so far. I'm afraid I really want a source level debugger. Is the ZB tool useful?

I should add that I see the token declared invalid must earlier than two days.

I see there are some downloads but not any comments
« Last Edit: May 08, 2014, 05:50:44 pm by strat »

macrho

  • Guest
Re: Chamberlain/Liftmaster MyQ Plugin
« Reply #44 on: May 08, 2014, 05:57:39 pm »
does the plugin enumerate your garage doors correctly?
i need to spend some more time with ZB, I'm not sure how to debug a plugin on restart and watch
I should have some more time to look at this over the weekend