Chamberlain MyQ Binding

How did you install, by adding it to the addons folder or by using the CLI console to install/update? It will work fine with milestone releases. I would uninstall the binding completely if you are adding it to the addons folder.

I added to the addons folder. And I just downloaded the newest build, added it to the folder and restarted OpenHAB. And it’s working again! Thanks again, @digitaldan

1 Like

Just wanted to add a note that I’m having zero problems with the new binding by updating to the OpenHAB SNAPSHOT build. don’t even need to manually install the binding or jsoup. Just used openhabian-config to switch to snapshots in the openhab-related menu, and it installed and restarted openhab and everything was happy. Seemed simpler than manually installing the individual binding, and its dependencies.

I had to install it manually since I’m not using openhabian, but it is working flawlessly now.

I finally got the binding to connect, but I am not seeing any auto-discovered things.

Does that need to be kicked off? I have two garage door openers, but don’t see how to add them.

It should do that automatically, but you can manually kick it off in the UI by going to “Settings” → “Things” and then click on the “+” symbol at the bottom of the screen:

Select the “MyQ” binding from there, and then press “Scan”:

It should find your devices, which will also now be in the “Inbox”.

That was it I had to go and force the scan by binding. It discovered the new door.

I did still need to go into the admin console and delete the old garage door opener to get it working again.

Thank you!

1 Like

hey man, I really appreciate you taking the time to update this binding and deal with all of us novices in learning how to use it!

1 Like

Hi I’m migrating from OH2.4 to OH3 because the old binding is no longer supported and can’t be rebuilt.

I’m on OH3.2 Snapshot and tried installing the Snapshot binding and the binding from

I’ve installed JSoup
Clean-cache between installs.

The Account initially shows online then switches to offline with Comm Error.
What’s the correct set of steps to get this to connect?

@digitaldan

I figured why my bridge wasn’t connecting or why it would connect and flap.

I’m one of the few that have over 5 MyQ items (1 GDO, 5 lamp units and 7 switches)
Once I have 5 or more items added to my account the bridge becomes unstable. Once all items are added it won’t connect at all.

I can provide logs. I had debug turned on but I couldn’t see anything obvious. All I could gather was it didn’t really like it when it was getting the list of items but I couldn’t see the error message just that was retrying and that’s what lead me to remove items from my accounts to test.

My bridge operation has been incredibly spotty. I’ll download the daily build, get the bundles operating and all seems fine, then again this morning I’m back to the same “ERROR:COMM” status on my bridge thing.
The log error however is down to a single line now:

2021-09-19 09:25:29.351 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing 'myq:account:home' updated: OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 : 

Unsure what his happening to make the binding so continuously unstable? Is it something Chamberain is doing on their end?
***update: And now, as soon as I type this and hit save, the thing is working again, then off again?!?

This from the DEBUG files:

2021-09-19 09:38:30.451 [DEBUG] [q.internal.handler.MyQAccountHandler] - MyQ communication error
org.openhab.binding.myq.internal.handler.MyQAccountHandler$MyQCommunicationException: Invalid Response Code 0 : 
	at org.openhab.binding.myq.internal.handler.MyQAccountHandler.parseResultAndUpdateStatus(MyQAccountHandler.java:435) ~[?:?]
	at org.openhab.binding.myq.internal.handler.MyQAccountHandler.getDevices(MyQAccountHandler.java:349) ~[?:?]
	at org.openhab.binding.myq.internal.handler.MyQAccountHandler.fetchData(MyQAccountHandler.java:271) ~[?:?]
	at org.openhab.binding.myq.internal.handler.MyQAccountHandler.normalPoll(MyQAccountHandler.java:259) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
1 Like

I’m having a similar problem.
It gets increasingly unstable the more items I have on my MyQ account, even if I don’t add them as things.

My debug shows something similar.

@digitaldan
EDIT:
Did some more testing.
Basically I can’t have more than 4 MyQ devices added to the account or the binding will fail to connect or refresh the token.

The number of things don’t seem to matter.

Running OH3.2 snapshot build 2499

Binding is 3.2.0.20210918623
Jsoup 1.8.3

Hmm, an http response should never be 0, thats very odd, I’m not sure how that can be, i would think the Jetty HTTP client would not even allow that. I’ll take a look and see if my logs show something similar.

Since it’s a general communication error, we only mark the binding offline, but will still continue to try and poll every 60 seconds ( or lower if configured) , so it sounds like the next poll worked. It would be helpful to know from your logs the pattern of off and online. I guess its possible this is MyQ throttling requests, but again the 0 response code is suspicious.

So we don’t poll any differently due to number of devices, nor does the number devices have anything to do with the token. I’m not sure how yet that would cause issues.

It would be helpful to have debug logs (and possibly trace as well) as this does not sound like the other issue yet. Also can you let me know how you have this configured (through the UI or thing files)?

Hi Dan

Everything is done in UI. I’m starting from scratch trying to redesign everything on the new OH3 Paradigm. Trying to do away with the cfg files.

I have a tracelog where the binding is the only one running. In the process I started 4 MyQ items on my Account. Then I added a 5th and during the next refresh for a token the Bridge fails to the error below.
I then remove the 5th item from my account without making any changes to OH3 and during the next refresh it get the token and it’s working fine.

[INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing 'myq:account:home' updated: OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :

Where should I send the log to?

I set the log to DEBUG, stopped then restarted the bundle. Here’s what logged:

2021-09-19 20:38:00.623 [DEBUG] [q.internal.handler.MyQAccountHandler] - Login Code 200 Response <!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
    <title>MyQ Security</title>
    <link rel="stylesheet" href="/Styles/Reset.css" />
    <link rel="stylesheet" href="/Styles/FontAwesome.css" />
    <link rel="stylesheet" href="/Styles/SelectInput.css" />
    <link rel="stylesheet" href="/Styles/Site.css" />
    <link rel="stylesheet" href="/Styles/automotiveConsent.css" />
    <link rel="icon" type="image/png" href="/favicon-32x32.png" />
<script type="text/javascript">
//<![CDATA[
window["_tsbp_"] = { ba : "X-TS-BP-Action", bh : "X-TS-AJAX-Request"};
//]]>
</script><script type="text/javascript" src="/TSbd/0830cd8dbfab20007dbbb921b3465235e10d6eca5a5a073aa36d044fdf7d5eae9370095178eb7ee3?type=2"></script></head>
<body>
    

<div class="container body-content">
    <div class="standard-page">
        <div class="logo"></div>
        <div class="title">Sign In</div>
<form action="/api/Account/LoginWithEmail?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DIOS_CGI_MYQ%26code_challenge%3DZ3P5NND1PElQbGCFmgpHtgxJFvtG_YEMfJOMxPx-K0g%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access" method="post"><input id="ReturnUrl" name="ReturnUrl" type="hidden" value="/connect/authorize/callback?client_id=IOS_CGI_MYQ&amp;code_challenge=Z3P5NND1PElQbGCFmgpHtgxJFvtG_YEMfJOMxPx-K0g&amp;code_challenge_method=S256&amp;redirect_uri=com.myqops%3A%2F%2Fios&amp;response_type=code&amp;scope=MyQ_Residential%20offline_access" />            <div class="form-fields">
                <input type="email" class="form-control email" placeholder="Email" autofocus autocomplete="false" data-val="true" data-val-required="The email field is required." id="Email" name="Email" value="" />
                <input type="password" class="form-control" placeholder="Password" autocomplete="false" data-val="true" data-val-required="The password is required." id="Password" name="Password" />
                
                <div class="validation-summary-valid" data-valmsg-summary="true" id="validation-errors"><ul><li style="display:none"></li>
</ul></div>
                <input type="submit" id="btn-signin" class="btn btn-default" value="Sign In" />
                <div class="forgot-password">
                    <a href="/api/Account/ForgotPassword?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DIOS_CGI_MYQ%26code_challenge%3DZ3P5NND1PElQbGCFmgpHtgxJFvtG_YEMfJOMxPx-K0g%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access" class="link">
                        <span>
                            Forgot Password
                        </span>
                        <i class="fa fa-angle-right" aria-hidden="true"></i>
                    </a>
                </div>
            </div>
<input name="__RequestVerificationToken" type="hidden" value="CfDJ8IET59l0am5LrkJTS_9dHDfPtlEQY17Yddie4X4d3SM3nfn12woI6ZTYrzxkqXP6zAbRhK-heQYFQ8tTv26vyVP5RNcWvRAagUKSMfLXEE8Cma2XqnhJoqHeh82a3LzuXUwT6qZM1-Ta6r-1oNIG85s" /></form>    </div>
</div>



<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.0.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.16.0/jquery.validate.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js"></script>
<script src="/Scripts/iPhoneXFix.js"></script>



</body>
</html>
2021-09-19 20:38:00.628 [DEBUG] [q.internal.handler.MyQAccountHandler] - Posting Login to https://partner-identity.myq-cloud.com/api/Account/LoginWithEmail?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DIOS_CGI_MYQ%26code_challenge%3DZ3P5NND1PElQbGCFmgpHtgxJFvtG_YEMfJOMxPx-K0g%26code_challenge_method%3DS256%26redirect_uri%3Dcom.myqops%253A%252F%252Fios%26response_type%3Dcode%26scope%3DMyQ_Residential%2520offline_access
2021-09-19 20:38:00.926 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing 'myq:account:home' updated: ONLINE
2021-09-19 20:38:00.927 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from UNKNOWN to ONLINE
2021-09-19 20:38:01.124 [DEBUG] [q.internal.handler.MyQAccountHandler] - Auth Token Refreshed, expires in 3600
2021-09-19 20:38:01.894 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing 'myq:garagedoor:home:cg286348ceb3' updated: ONLINE
2021-09-19 20:38:01.895 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:garagedoor:home:cg286348ceb3' changed from UNKNOWN to ONLINE
2021-09-19 20:38:01.895 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'garage_door_status' updated to closed
2021-09-19 20:38:01.896 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'garage_door_switch' updated to OFF
2021-09-19 20:38:01.896 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'garage_door_rs' updated to DOWN
2021-09-19 20:38:01.896 [INFO ] [openhab.event.ThingStatusInfoEvent  ] - Thing 'myq:garagedoor:home:cg286348c683' updated: ONLINE
2021-09-19 20:38:01.897 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:garagedoor:home:cg286348c683' changed from UNKNOWN to ONLINE
2021-09-19 20:38:01.897 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'shop_door_south_status' updated to closed
2021-09-19 20:38:01.897 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'shop_door_south_switch' updated to OFF
2021-09-19 20:38:01.897 [INFO ] [openhab.event.ItemStateEvent        ] - Item 'shop_door_south_rs' updated to DOWN

Please PM it to me. I’m still not sure that the number of things or items is really at play, or if its just a coincidence, there is no relationship to items and the logic of this binding that would cause that afaik.

That error has nothing todo with getting a token, its being thrown trying to the general device API.

Thanks, thats all normal, and your MyQ things should be online. What i was hoping is if you could send logs when it fails. But actually, i can see this in my logs too. It seems to have happened a few times starting on the 14th (see logs below)

If it does happen, and stays offline for more than a min (so does not come back on the next poll), please PM me the relevant logs. I’ll see about catching this error specifically and recovering from it quicker in the mean time. It has not happened today, so this seems fairly random on my system.

2021-09-09 20:36:56.043 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :
2021-09-09 20:37:26.284 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE
2021-09-14 23:40:10.660 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 503 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2021-09-14 23:40:41.121 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 503 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2021-09-15 22:04:29.399 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :
2021-09-15 22:04:59.696 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE
2021-09-16 02:10:32.678 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 503 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2021-09-16 02:11:12.679 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 503 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
2021-09-16 02:15:03.132 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE
2021-09-16 02:16:14.471 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :
2021-09-16 02:18:04.855 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE
2021-09-16 02:19:14.978 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :
2021-09-16 02:20:25.366 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE
2021-09-16 02:21:05.368 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :
2021-09-16 02:22:55.591 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'myq:account:home' changed from OFFLINE (COMMUNICATION_ERROR): Invalid Response Code 0 :  to ONLINE

Hello,

I just upgraded to 3.2 from 2.5, install the new binding and now I have this error when I create the bridge

Invalid Response Code 400 : { “SecurityToken”: “”, “ReturnCode”: “0”, “ErrorMessage”: “please contact customer care, supportID: 3927793507507441104”, “CorrelationId”: “” }

I believe you need to re-install the add-on per instructions above after upgrading, until it is merged with the code release code. I could be wrong about this, but reinstalling the the jar worked for me.

I’m assuming you mean the 3.2 snapshot build and not milestone? Can you post the build version? If it is the snapshot build, can you try pausing and starting the account thing from the UI and see if that helps? that will cause a new token to be requested. It sounds like there is an issue getting the token, which is odd since i would expect the error to happen earlier in the login process, and this error happens after that.

The code has been merged and is available in the 3.2 snapshot distribution.