Chamberlain/Liftmaster MyQ Plugin

Ok, I just did a hard reset. Pulled the power and restarted the unit. Now the unit is working.

Having issues also… I am wondering if it might be the boxes we have. I am using Vera 3 and have done as suggested. I have updated the lua files both on and off the box, remove the program, reinstalled the program, rebooted, etc. I have confirmed my credentials work, logged into the website, saw my doors, open/closed them from there. MyQ App still works. I’ve even changed my password and done the above again.

Looked at my logs, and it appears something is definitely happening, but not working…

50 07/10/19 13:46:25.105 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): called <0x2cac9680>
02 07/10/19 13:46:25.111 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): POST request URL: [https://myqexternal.myqdevice.com/api/v4/User/Validate] Headers [{ [“Culture”] = en,[“Content-Type”] = application/json; charset=utf-8,[“Accept”] = /,[“BrandId”] = 2,[“Host”] = myqexternal.myqdevice.com,[“Content-Length”] = 58,[“User-Agent”] = Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari,[“App-Version”] = 3.88.30470,[“MyQApplicationId”] = JVM/G9Nwih5BwKgNCjLxiFUQxQijAebyyg8QUHr7JOrP+tuPb8iHfRHKwTmDzHOu,[“ApiVersion”] = 4.1,} ] Data [{“username”:““,“password”:””}] <0x2cac9680>
02 07/10/19 13:46:25.177 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): received response: NIL <0x2cac9680>
01 07/10/19 13:46:25.178 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): Unsuccessful at connecting with the authorization URL! <0x2cac9680>
01 07/10/19 13:46:25.178 luup_log:160: (MyQGateway::startupdeferred): INITIAL API LOGIN FAILED Attempting WEB MODE fallback <0x2cac9680>
01 07/10/19 13:46:25.179 LuaInterface::CallFunction_Timer-5 function startupDeferred failed [string “local version = “v1.60 10-Nov-2017” – @Cyb…”]:430: attempt to index field ‘?’ (a nil value) <0x2cac9680>

So I turned on troubleshooting mode… In my mind, it stands to reason perhaps Vera 3 did not get updated to support TLSV1.2. Changelogs for OpenSSL says we need version 1.0.1 at a minimum.

See Here - Changes between 1.0.0h and 1.0.1 [14 Mar 2012] you can see Initial TLS v1.2 support.

My Vera 3 shows that we have the following:
root@MiOS_30011616:~# openssl version
OpenSSL 1.0.0d 8 Feb 2011 (Library: OpenSSL 1.0.1l 15 Jan 2015)

So it looks like we have the right library installed, but the openssl-util is a previous version. Looking at the pkg, we have openssl-util - 1.0.0d-1 installed under listed packages.

I used opkg to see what was available and MIOS servers had version 1.0.11 out there. So, next I tried to do an update to the package as so far, it continues to fail.

root@MiOS_30011616:/tmp/opkg-lists# opkg install openssl-util Upgrading openssl-util on root from 1.0.0d-1 to 1.0.1l-1... Downloading http://download.mios.com/firmware/openwrt/ramips/packages/openssl-util_1.0.1l-1_ramips.ipk. Configuring openssl-util.

Now, when I look at the installed version:

root@MiOS_30011616:/tmp/opkg-lists# openssl version
OpenSSL 1.0.1l 15 Jan 2015

I now assume that OpenSSL should be updated completely thereby allowing tlsv1_2. After this, I rebooted the Vera 3, logged back in to make sure changes have persisted. It did persist, but still is not connecting.

50 07/10/19 15:20:07.102 luup_log:160: (MyQGateway::startupDeferred): Status refresh on your opener(s) will be called every:120 <0x2cab9680> 50 07/10/19 15:20:07.103 luup_log:160: (MyQGateway::startupDeferred): Configuring for brand [Liftmaster]. <0x2cab9680> 50 07/10/19 15:20:07.104 luup_log:160: (MyQGateway::startupdeferred): ATTEMPTING INITIAL API LOGIN <0x2cab9680> 50 07/10/19 15:20:07.105 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): called <0x2cab9680> 02 07/10/19 15:20:07.107 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): POST request URL: [https://myqexternal.myqdevice.com/api/v4/User/Validate] Headers [{ ["Culture"] = en,["Content-Type"] = application/json; charset=utf-8,["Accept"] = */*,["BrandId"] = 2,["Host"] = myqexternal.myqdevice.com,["Content-Length"] = 58,["User-Agent"] = Mozilla/5.0 (Linux; Android 4.4; Nexus 4 Build/KRT16E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.105 Mobile Safari,["App-Version"] = 3.88.30470,["MyQApplicationId"] = Vj8pQggXLhLy0WHahglCD4N1nAkkXQtGYpq2HrHD7H1nvmbT55KqtN6RSF4ILB/i,["ApiVersion"] = 4.1,} ] Data [{"username":"********","password":"********"}] <0x2cab9680> 02 07/10/19 15:20:07.210 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): received response: NIL <0x2cab9680> 01 07/10/19 15:20:07.211 luup_log:160: (MyQGateway::MYQ_API::retrieveSecurityToken): Unsuccessful at connecting with the authorization URL! <0x2cab9680> 01 07/10/19 15:20:07.212 luup_log:160: (MyQGateway::startupdeferred): INITIAL API LOGIN **FAILED** Attempting WEB MODE fallback <0x2cab9680> 01 07/10/19 15:20:07.223 LuaInterface::CallFunction_Timer-5 function startupDeferred failed [string "local version = "v1.60 10-Nov-2017" -- @Cyb..."]:430: attempt to index field '?' (a nil value) <0x2cab9680>

Next I unplugged everything and let it sit for 15 minutes. Plugged in back in. And nothing. If I make a change to the username/password or anything and it goes back to Please wait… Re-initializing myQ. Logs look the same as previous.

Next I checked to see if tlsv1_2 is actually working. I wish I had done this before upgrading openssl, but I didn’t. Checking this now, I get the following:

openssl s_client -connect google.com:443 -tls1_2

CONNECTED(00000003)
depth=1 C = US, O = Google Trust Services, CN = Google Internet Authority G3
verify error:num=20:unable to get local issuer certificate
verify return:0

Certificate chain
0 s:/C=US/ST=California/L=Mountain View/O=Google LLC/CN=*.google.com
i:/C=US/O=Google Trust Services/CN=Google Internet Authority G3
1 s:/C=US/O=Google Trust Services/CN=Google Internet Authority G3
i:/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign

*** snipped rest for brevity ***

Since it shows connection, and gets the actual certificates, tlsv1_2 is working… Any other ideas?

1 Like

I have a Veralite on UI5. I am starting to think it will not support tlsv1_2 since mine is not working either.

@Pabla your fix worked for me as well. I do have one minor question concerning my Vera Dashboard. My garage door shows as a door lock instead of a garage door. Is there a way to change this on the dashboard?

Go into the MyQ Device and set UI7 GDO Mode to ENABLED.

UI7 GDO Mode is enabled, yet it still looks like a door lock instead of a garage door. Anything else need to be done?

Did you do a hard refresh of your browser?

Yes I’ve refreshed both Chrome and Firefox on my PC and tried both browsers, Icon still appears as a door lock. The Vera app shows a door lock as well.

Got to advanced settings for each garage door, and change the category to 32

I thought it was category 7 for garage doors unless it changed. That’s what I used in the past.

http://wiki.micasaverde.com/index.php/Luup_Device_Categories

Categories changed

Update: Found some information on another thread… although it is for the ecobee thermostat, Link here

Vera 3 is running firmware: Backfire (10.03)

Apparently, according to the thread and @rafale77 this firmware and openssl are too old to support the protocol tlsv1_2.

So, my guess is that a vera 3 and below, unless Mios releases an update, is out of luck on this one.

That is absolutely incorrect.

category_num is set to 32, garage door still looks like a door lock. Is there anything else I can try?

1 Like

@cybrmage, you are definitely the one who would know when it comes to this app so I’d love to see what I need to do to get this working on a Vera 3. I’d definitely rather be incorrect and get this working as opposed to being right. I’ve made the changes in the lua as others have, still not working.

I am attaching my Lua log from a complete restart in case I did not give enough information in the MyQ snip… {I’ve removed email/password in file}

Lualog from restart.zip (230.4 KB)

Totally makes sense that if mios provided a newer openssl on their repo for the vera3, TLS V1_2 should work. My report on the ecobee plugin was based at the time on the official openWRT repo which did not have a newer openssl library compiled. I did not have a vera 3 and did not know the mios repo address. It is great that mios actually compiled and posted newer libraries.

@rafale77 Good to know that it dealt with a particular moment in time and not necessarily the hardware.

As far as the library being out there, I don’t know if it was meant for consumption or not. It’s not working any differently having it installed so… I’ve used a lot of different varieties of Linux but don’t often mess around with openwrt or others that generally are flashed in order to upgrade. That being said, it was a shot in the dark. I found that openwrt does have a package system, and using the command in putty:

opkg list

You end up with a list of all available packages in a text file. From there I did the install as noted above. It hasn’t helped but it does show installed.

To be honest, this library is quite old and is compiled, I am guessing from the C coded source. I have compiled and updated a lot of packages on my vera plus myself which ended up forcing me to modify some shell scripts on the vera due to syntax changes. I do not think this newer library should cause any problems and I would be surprised if they did not work.
Be careful with opkg: You have to know what repo source you are pulling from. By default, the vera should only have the mios source. Unless you changed/added the openWRT sources, you will not see them. I suspect mios did the compilation and posted the binaries and libraries on their repo as a package. Your problem is likely elsewhere if this is the case…

I just used the default mios repository as I didn’t want to get into compiling or installing something that wasn’t meant for Vera… this means there’s a problem somewhere else but no idea where else to look.

Following.@terrox category_num is set to 32, garage door still looks like a door lock. Is there anything else I can try?

I to am having the same thing happening. :slight_smile: