Chamberlain MyQ Binding

Have you already tried deleting your bridge and garage door things and re-discovering? I have stopped and restarted my bundle, restarted openHAB, and everything still working fine with my compiled jar.

I removed all traces and restarted/reintalled/recreated… but before anyone feels that they need to do that, I very well may have done something dumb and missed a step or a configuration…

Thanks for the help

Hi All,

This probably isn’t the right thread for this issue, but when my MyQ binding stops working, I see a log entry in my openhab.log file of:

2020-07-22 09:58:23.045 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: ‘null’

I’m going to try compiling a few threads on logging & restarting the service (maybe an email or some notification too) when this happens. Not sure if that’s the best approach, but if not, I only find out it’s not working after it’s been down for potentially days or more.

I use OH to do recurring notifications when the doors are left open for too long, it plays out the Alexa’s with an announcement and also texts me sometimes.

Thanks again for all the work on the binding!

I have been having lots of issues with the myq service not working. Sometimes a restart of openHAB will fix it. This morning, it was not working again. I will try to look into it soon.

I also have been having the issues with the service randomly failing. I setup a rule to write a datetime stamp to an item so I can see when it fails. The errors I get are:

2020-07-25 12:20:03.848 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Requesting URL Failed
java.io.IOException: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
        at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:148) ~[?:?]
        at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:415) ~[?:?]
        at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:251) ~[?:?]
        at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:331) ~[?:?]
        at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:321) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
        at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:685) ~[bundleFile:9.4.20.v20190813]
        at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:128) ~[?:?]
        ... 11 more
Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
        at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:163) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:444) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:390) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:574) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1644) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) ~[bundleFile:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) ~[bundleFile:9.4.20.v20190813]
        ... 1 more
2020-07-25 12:20:03.860 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: 'null'

Hi,

i downloaded the computergeek Code and converted it to new Maven System.
Also i changed the Settings and the Communication.
For now it works and since you can change the Useragent and the Api Version it should work longer than the other builds…

Plz don’t cry it’s my first Time coding in Java :slight_smile:

https://gofile.io/d/30qysV

Thanks for your work on this @mmtnrw. For the first time in a long time I have some control over my doors in OH. Just a couple of questions on this binding. For the rollershutter control, it doesn’t appear that it can control a % (number) for the door opening - essentially it is just an On/Off control with Open/Closed contact. Is it possible with the API/binding to send a number to open the door some percentage (for example, open 20 on the scale of 0 to 100)? Also, it is possible to detect when the door is in motion (opening or closing)? I’m just curious as to whether it’s possible to have the degree of control as the original binding (the 1.x binding).

Thanks again for your work!

@RipNCode The MyQ API will display “Opening”, “Closing” when the door is moving. The hard part it catching it in that state if you only poll every 60 secs. There is no API to open the door a certain percentage. You sent an “open” or “close” command.

@mmtnrw Is your code publicly available? I would like to help if possible.

Thanks,
Scott

Thanks @scooter_seh. I figured it may be possible with the API - wasn’t sure. It seems I can catch at least a portion of the opening/closing state to use with a rule. Essentially, I’d like to update some things based on when the doors are moving (cues to let me know when it’s happening as I’m not always here).

For such a real time type response I’d suggest a local sensor. There are cheap zigbee ones that would accomplish this with precision. (IE SmartThings multipurpose sensor is a contact sensor with acceleration and temperature. Disclaimer being that I don’t use the zigbee stack in OpenHAB anymore so you’d want to confirm elsewhere that all of those fields work with your chosen device.)

Plus you always know the state of your door - regardless of the MyQ api.

I use a zWave tilt sensor on top of the Chamberlain IQ on the garage door itself. I group them together in OH and use the group to base decisions on.

Best, Jay

I just wanted to send it too you, since i only adopted it… Write PN with e-Mail, i will send it to you… I didn’t want to fork on git or something else…

I only adopted scooters Code, so if it was not there, I didn’t added it.

But, after I finish the my Aidoo Wifi Klima PlugIn, i will look for that, or perhaps scooter adds it after i sent him the source…

because i don’t want to fork or something. It’s the work of scooter!!! i added only features coz of i want to open and close my doors :wink: And i don’t want to update the binding every time a new UserAgent or Api is used. Normally I code in other languages so i had to adopt my code features to JAVA :slight_smile:

That’s probably the best solution - not to be tied to an Internet connection, anyway. I was looking at connecting a zWave garage door controller, but it looks like that won’t work out of the box with a myQ setup. I’ll probably take a look at a relay-based solution and getting a full controller…

So, for now it is 14 days working, so new Record :slight_smile:

I just upgraded to your version. Can you provide the user agent and API version you are using so I can minic your setup?

Here’s what I got now:

UserAgent: okhttp/3.10.0
API Version: 5.1

Best, Jay

This is Mine…

So far your updated code base has been working quite well! Here’s my first error which I think could be a one off.

2020-08-22 16:04:15.168 [WARN ] [handler.ChamberlainMyQGatewayHandler] - Could not parse response
java.lang.IllegalStateException: Not a JSON Object: null
	at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91) ~[252:com.google.gson:2.8.5]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:433) [338:org.openhab.binding.chamberlainmyq:2.5.8.202008031231]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.executeMyQCommand(ChamberlainMyQGatewayHandler.java:274) [338:org.openhab.binding.chamberlainmyq:2.5.8.202008031231]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQDoorOpenerHandler.setDoorState(ChamberlainMyQDoorOpenerHandler.java:87) [338:org.openhab.binding.chamberlainmyq:2.5.8.202008031231]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQDoorOpenerHandler.handleCommand(ChamberlainMyQDoorOpenerHandler.java:74) [338:org.openhab.binding.chamberlainmyq:2.5.8.202008031231]
	at sun.reflect.GeneratedMethodAccessor470.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at com.sun.proxy.$Proxy219.handleCommand(Unknown Source) [338:org.openhab.binding.chamberlainmyq:2.5.8.202008031231]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at sun.reflect.GeneratedMethodAccessor463.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Best, Jay

@mmtnrw
@scooter_seh
The gofile link is dead.
Where can I get the .jar for this binding?

Below is the last one I grabbed from the thread, just remove the .txt from it.

org.openhab.binding.chamberlainmyq-2.5.8-SNAPSHOT.jar.txt (47.9 KB)

Best, Jay

1 Like