Chamberlain/Liftmaster MyQ Plugin

Thanks @ember1205

I turned off enhanced status and left GDO mode on. Debug is off. Rebooted VP and same issue. I then did an update i myq control with same username and password, same result.

In the app I changed the password and updated myq without the new password, I proved I get an authentication error.

luup_log:247: (MyQGateway::MYQ_API::retrieveSecurityToken): Authentication error! <0x74de6520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL API LOGIN FAILED Attempting WEB MODE fallback <0x74de6520>

Blue bar at top remains as “initializing” and does nothing.
Now I used the new password in the plugin.

Back to the same issue after the security token was retrieved.

Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numDoors was: ERROR: Could not initialize connection. now: ERROR: Could not initialize connection. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x74de6520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numLights was: Check brand, username and password. now: Check brand, username and password. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x74de6520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL inspectDevices FAILED Attempting WEB MODE fallback <0x74de6520>

I remember a while back people talked about the app ID, not sure if that is an issue. Odd it works for you guys and not others.

According to your earlier log snippet, when the plugin attempts to get the list of devices AFTER it has successfully logged in, it is receiving an http 217 response code which is some sort of failure code. I am not able to find much about an http response code 217 other than one that suggests a system configuration issue. I compared the UserDeviceDetails/Get request headers to mine and they look correct. We need to determine the root cause for the 217 http response error code (should be 0). Also, my doors are LiftMaster.

Have you by any chance changed/installed any lua libs on your system?

Thanks @blacey

I have not installed or changed anything or mucked around in the unit.

They talk about this code with similar use of MyQ for another platform here:

They talk about the same error 217. One idea was the app ID which didn’t work, the other was something in json but since the systems are different I’m not able to follow it really.

@tomtcom, can you temporarily set the plugin brand to Craftsman instead of Chamberlain, reload Lua and try again? It is possible that the plugin that I posted uses an outdated Chamberlain app id and purportedly, Craftsman and Chamberlain are the same and the Craftsman is correct in the current version.

@blacey

Setting it to Craftsman causes an authentication error.

JobHandler_LuaUPnP::HandleActionRequest device: 247 service: urn:macrho-com:serviceId:MyQGateway1 action: SetBrand <0x728c1520>
luup_log:247: (MyQGateway::UPnP::SetBrand): lul_settings [{ [“serviceId”] = urn:macrho-com:serviceId:MyQGateway1,[“newBrand”] = Craftsman,[“action”] = SetBrand,[“DeviceNum”] = 247,} ] <0x728c1520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Brand was: Chamberlain now: Craftsman #hooks: 0 upnp: 0 skip: 0 v:0x1278b70/NONE duplicate:0 <0x728c1520>
luup_log:247: (MyQGateway::task): task [Please wait…Re-initializing myQ.] <0x728c1520>

luup_log:247: (MyQGateway::MYQ_API::retrieveSecurityToken): Authentication error! <0x75302520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL API LOGIN FAILED Attempting WEB MODE fallback <0x75302520>

@tomtcom, ok, what happens if you configure it for Liftmaster? Trying to rule in/out the brand app id.

@blacey I don’t see the 217 error and it does pull a security token but initial inspect devices fails.

@tomtom, please share the logs so I can take a look. Thanks.

@blacey

Here’s everything, scrubbed the token if it even matters.

JobHandler_LuaUPnP::HandleActionRequest device: 247 service: urn:macrho-com:serviceId:MyQGateway1 action: SetBrand <0x7267b520>
luup_log:247: (MyQGateway::UPnP::SetBrand): lul_settings [{ [“serviceId”] = urn:macrho-com:serviceId:MyQGateway1,[“newBrand”] = Liftmaster,[“action”] = SetBrand,[“DeviceNum”] = 247,} ] <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Brand was: Chamberlain now: Liftmaster #hooks: 0 upnp: 0 skip: 0 v:0xf4fbd0/NONE duplicate:0 <0x7267b520>
luup_log:247: (MyQGateway::task): task [Please wait…Re-initializing myQ.] <0x7267b520>
luup_log:247: (MyQGateway::init): MyQ Gateway Plugin v1.61 11-Nov-2019 - ************** STARTING ************** <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: PLUGIN_VERSION was: v1.61 11-Nov-2019 now: v1.61 11-Nov-2019 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Gateway_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Opener_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Light_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
luup_log:247: (MyQGateway::init): MyQ Gateway Plugin Options - BRAND [Liftmaster] DEBUG_MODE [DISABLED] UI7_GDO [ENABLED] <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: DEBUG_MODE_TEXT was: DISABLED now: DISABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: UI7_GDO_TEXT was: ENABLED now: ENABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: ENH_STATUS_TEXT was: DISABLED now: DISABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7267b520>
luup_log:247: MyQGateway::Init): Gateway_CSV [{ } ] <0x7267b520>
luup_log:247: MyQGateway::Init): Opener_CSV [{ } ] <0x7267b520>
luup_log:247: MyQGateway::Init): Light_CSV [{ } ] <0x7267b520>
luup_log:247: (MyQGateway::startupDeferred): Status refresh on your opener(s) will be called every:120 <0x744bc520>
luup_log:247: (MyQGateway::startupDeferred): Configuring for brand [Liftmaster]. <0x744bc520>
luup_log:247: (MyQGateway::startupdeferred): ATTEMPTING INITIAL API LOGIN <0x744bc520>
luup_log:247: (MyQGateway::MYQ_API::retrieveSecurityToken): called <0x744bc520>
luup_log:247: (MyQGateway::MYQ_API::getUserData): called. <0x744bc520>
luup_log:247: (MyQGateway::MYQ_API::getUserData): finished - UserData [{ [“CultureId”] = 1,[“BrandName”] = Chamberlain,[“BrandId”] = 2,[“LastName”] = ******,[“FirstName”] = ******,[“CorrelationId”] = 5e8a7c14-8236-46fc-bdbc-c964755a863e,[“BusinessPhone”] = ,[“TimeZoneId”] = 16,[“ErrorMessage”] = ,[“RegionCode”] = ,[“CountryCode”] = USA,[“ReturnCode”] = 0,[“TimeZone”] = 16#DST,[“Street2Name”] = ******,[“Email”] = ********,[“CountryId”] = 9,[“CityName”] = ******,[“UseDaylightSavings”] = false,[“StreetPostalCode”] = ******,[“StreetName”] = ******,} ] <0x744bc520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Timestamp was: Sat Apr 04 2020, 11:45:10 now: Sat Apr 04 2020, 11:46:51 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x744bc520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL API LOGIN SUCCESSFUL!! <0x744bc520>
luup_log:247: (MyQGateway::startupdeferred): Our initial security token is token <0x744bc520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Timestamp was: Sat Apr 04 2020, 11:46:51 now: Sat Apr 04 2020, 11:46:51 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x744bc520>
luup_log:247: (MyQGateway::task): task [Clearing…] <0x744bc520>
luup_log:247: (MyQGateway::MYQ_API::inspectDevices): called - SecurityToken [token] <0x744bc520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numDoors was: ERROR: Could not initialize connection. now: ERROR: Could not initialize connection. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x744bc520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numLights was: Check brand, username and password. now: Check brand, username and password. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x744bc520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL inspectDevices FAILED Attempting WEB MODE fallback <0x744bc520>
Device_Basic::m_eConfigured_set device 247 was 0 now 0 startup <0x7763d320>
JobHandler_LuaUPnP::Run device 247 ptr 0xfb48b0 MyQ Control room 16 type urn:schemas-macrho-com:device:MyQGateway:1 cat 0:-1 id parent 0/0x1141e38 upnp: 0 plugin:7386 pnp:0 mac: ip: <0x7763d320>
luup_log:247: (MyQGateway::init): MyQ Gateway Plugin v1.61 11-Nov-2019 - ************** STARTING ************** <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: PLUGIN_VERSION was: v1.61 11-Nov-2019 now: v1.61 11-Nov-2019 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Gateway_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Opener_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Light_CSV was: now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): input size [2486]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): output size [1243]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::create_png): writing PNG Data for file [/www/cmh/skins/default/img/devices/device_states/MyQ_garage_faulted.png] <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): input size [3302]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): output size [1651]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::create_png): writing PNG Data for file [/www/cmh/skins/default/img/devices/device_states/MyQ_garage_opening.png] <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): input size [3180]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): output size [1590]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::create_png): writing PNG Data for file [/www/cmh/skins/default/img/devices/device_states/MyQ_garage_stopped.png] <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): input size [4090]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): output size [2045]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::create_png): writing PNG Data for file [/www/cmh/skins/default/img/devices/device_states/MyQ_garage_offline.png] <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): input size [3086]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::decode_hex_string): output size [1543]. <0x76b8a520>
luup_log:247: (MyQGateway::DEVICE_ICONS::create_png): writing PNG Data for file [/www/cmh/skins/default/img/devices/device_states/MyQ_garage_closing.png] <0x76b8a520>
luup_log:247: (MyQGateway::init): MyQ Gateway Plugin Options - BRAND [Liftmaster] DEBUG_MODE [DISABLED] UI7_GDO [ENABLED] <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: DEBUG_MODE_TEXT was: DISABLED now: DISABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: UI7_GDO_TEXT was: ENABLED now: ENABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: ENH_STATUS_TEXT was: DISABLED now: DISABLED #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x76b8a520>
luup_log:247: MyQGateway::Init): Gateway_CSV [{ } ] <0x76b8a520>
luup_log:247: MyQGateway::Init): Opener_CSV [{ } ] <0x76b8a520>
luup_log:247: MyQGateway::Init): Light_CSV [{ } ] <0x76b8a520>
luup_log:247: (MyQGateway::startupDeferred): Status refresh on your opener(s) will be called every:120 <0x7498a520>
luup_log:247: (MyQGateway::startupDeferred): Configuring for brand [Liftmaster]. <0x7498a520>
luup_log:247: (MyQGateway::startupdeferred): ATTEMPTING INITIAL API LOGIN <0x7498a520>
luup_log:247: (MyQGateway::MYQ_API::retrieveSecurityToken): called <0x7498a520>
luup_log:247: (MyQGateway::MYQ_API::getUserData): called. <0x7498a520>
luup_log:247: (MyQGateway::MYQ_API::getUserData): finished - UserData [{ [“CultureId”] = 1,[“BrandName”] = Chamberlain,[“BrandId”] = 2,[“LastName”] = ******,[“FirstName”] = ******,[“CorrelationId”] = 3e853a5e-18ff-468a-9a23-864fb523c25b,[“BusinessPhone”] = ,[“TimeZoneId”] = 16,[“ErrorMessage”] = ,[“RegionCode”] = ,[“CountryCode”] = USA,[“ReturnCode”] = 0,[“TimeZone”] = 16#DST,[“Street2Name”] = ******,[“Email”] = ********,[“CountryId”] = 9,[“CityName”] = ******,[“UseDaylightSavings”] = false,[“StreetPostalCode”] = ******,[“StreetName”] = ******,} ] <0x7498a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Timestamp was: Sat Apr 04 2020, 11:46:51 now: Sat Apr 04 2020, 11:47:47 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x7498a520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL API LOGIN SUCCESSFUL!! <0x7498a520>
luup_log:247: (MyQGateway::startupdeferred): Our initial security token is token <0x7498a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: Timestamp was: Sat Apr 04 2020, 11:47:47 now: Sat Apr 04 2020, 11:47:47 #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7498a520>
luup_log:247: (MyQGateway::task): task [Clearing…] <0x7498a520>
luup_log:247: (MyQGateway::MYQ_API::inspectDevices): called - SecurityToken [token] <0x7498a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numDoors was: ERROR: Could not initialize connection. now: ERROR: Could not initialize connection. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7498a520>
Device_Variable::m_szValue_set device: 247 service: urn:macrho-com:serviceId:MyQGateway1 variable: numLights was: Check brand, username and password. now: Check brand, username and password. #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:1 <0x7498a520>
luup_log:247: (MyQGateway::startupdeferred): INITIAL inspectDevices FAILED Attempting WEB MODE fallback <0x7498a520>

@tomtcom, thanks. Please set DEBUG_MODE_TEXT to ENABLED and make sure DEBUG is set to 1, retry and post the logs. If you want to reduce scrubbing, you can PM them to me.

@blacey sent now, thanks.

Thanks Tom. So even with the Liftmaster APPID, we are still seeing the 217 response code.

(MyQGateway::MYQ_API::inspectDevices): response [{“ReturnCode”:“217”,“ErrorMessage”:“Error processing request (217)”,“CorrelationId”:“e16c8e3a-d7aa-49a0-8ebc-ca446a6f3207”}]

I have looked at the Home Assistant, SmartThings and Homebridge plugin implementations, and they all seem to use a single APPID that is the same as the Liftmaster APP ID that the MyQ plugin uses when the brand it set to Liftmaster. Chamberlain and Liftmaster are close cousins so perhaps they have converged on a single App ID instead of independent APP IDs. Still searching to see if there is a Chamberlain-specific APP ID but I haven’t found one yet.

1 Like

Alright, thanks. No worries, you’ve done a lot and others on this forum. Not the end of the world if it doesn’t work.

I saw aeotec had a garage door opener, they said they stopped selling it in the US due to some patent issue a while back. Too bad, researching the gocontrol unit for zwave after reading all the posts on Amazon it looks to be one crab a$$ device. I’m a bit surprised there isn’t a few more solutions. How many different light bulbs do we need? Anyways. Thanks again.

What if you delete the opener from the app and set it up again from scratch there first? Then try retrieving the opener through the plugin in Vera?

1 Like

@tomtcom, I found a homebridge plugin for Chamberlain and modified the MyQ plugin on a branch for you to test (uses different Chamberlain APPID). Please download the changes from the chamberlain branch using https://github.com/bblacey/Vera-MyQGateway/archive/chamberlain.zip

You only need to update the L_MyQGateway.lua on your V+. Be sure to change the plugin brand back to Chamberlain, reload and confirm in the logs that the plugin version is 1.62. Give it a try and let’s see if it makes a difference.

@blacey didn’t work, logs update and PM’d. New version is reflected.

@tomtcom, Ok, I’ll keep looking. Do you know how to use Wireshark to sniff the traffic from your phone while you use the Chamberlain app to login? If not, would you be willing to “lend” me your Chamberlain credentials and let me know which Chamberlain app you use so I can try?

@blacey I have wireshark on my computer. I can google what I need to filter and I’ll open the garage and record the packets during that time but now the lawn is awaiting me. It needs cutting. :frowning:

Let me get back to you, thanks very much!

I suspect Wireshark will not help because the traffic is encrypted.

Try removing the opener in the app and re adding it there.

Good point.

@tomtcom, definitely worth @ember1205’s recommendation because the plugin is working for others. I don’t know who is using it with Chamberlain, personally I have LiftMaster. @ember1205, which brand opener do you have?

That said, I downloaded and decompiled the Android MyQ app but was not able to find the App ID (probably obfuscated or retrieved) however the OpenHab guys updated their Chamberlain MyQ plugin in Feb 2019 to use this App ID. I have updated the the chamberlain branch in my repo accordingly so you can also test with that APP ID by following the same steps that you did here

1 Like