Chamberlain MyQ Binding

Does someone have a link to the latest JAR file for this?

Hello,
What version of OH are you running?

S-

I’ve just started having some issues. I’m running 2.5.0 M3 currently. I’ve tried the binding 1.14.0.M3 and also 2.5.0.201902280358.

Thanks!

My garage door is not working either tonight.

Error from log:

2019-10-18 22:21:35.207 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Requesting URL Failed

java.io.IOException: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1f44374{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,OPEN,fill=-,flush=-,to=92/0}->HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@27153f{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,ISHUT,fill=-,flush=-,to=93/0}{io=0/0,kio=0,kro=1}->SslConnection@9d51d0{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:163) ~[?:?]

	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:366) ~[?:?]

	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:201) ~[?:?]

	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:283) ~[?:?]

	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:274) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	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) [?:?]

Caused by: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1f44374{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,OPEN,fill=-,flush=-,to=92/0}->HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@27153f{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,ISHUT,fill=-,flush=-,to=93/0}{io=0/0,kio=0,kro=1}->SslConnection@9d51d0{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]

	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]

	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:684) ~[?:?]

	at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:146) ~[?:?]

	... 11 more

Caused by: java.io.EOFException: HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@1f44374{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,OPEN,fill=-,flush=-,to=92/0}->HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@27153f{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.20.10:36872,ISHUT,fill=-,flush=-,to=93/0}{io=0/0,kio=0,kro=1}->SslConnection@9d51d0{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@16b56f3(l:/192.168.20.10:36872 <-> r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@a37552(exchange=HttpExchange@32270c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@1ee9316(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@1fdf73c{s=START}],recv=HttpReceiverOverHTTP@5919b4(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.earlyEOF(HttpReceiverOverHTTP.java:338) ~[?:?]

	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1557) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.shutdown(HttpReceiverOverHTTP.java:209) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:147) ~[?:?]

	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) ~[?:?]

	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) ~[?:?]

	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155) ~[?:?]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) ~[?:?]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) ~[?:?]

	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:291) ~[?:?]

	at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:151) ~[?:?]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) ~[?:?]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) ~[?:?]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) ~[?:?]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) ~[?:?]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) ~[?:?]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) ~[?:?]

	... 1 more

2019-10-18 22:21:35.290 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: 'null'

2019-10-18 18:23:34.037 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: ‘null’

Not working since early this afternoon. They must have changed something. I am seriously thinking about using a zigbee outlet and relay to connect to the garage door opener. Would be more reliable this.

The HASS guys are saying the v4 API was shut down. The MyQ binding used the v4 API, I guess I have to update the binding to use the v5 API. I will see what I can do.

8 Likes

I was able to create a new 1.x binding that uses the v5 MyQ API. As part of the rewrite, I changed how the items are configured. The configuration is based on the MyQ devices serial number. The “easiest” way to get the serial numbers is to start openHAB in debug mode and look in the log files for MyQ Devices info. See the photo below for an example.

Here is an new example item file.

Switch LightModule               "Light Module On"              {myq="CG0670818352" autoupdate="false"}

Switch GarageDoorSwitch         "Garage Door Open"              {myq="CG0810243E7F"}
Contact GarageDoorContact       "Garage Door [%s]" <contact>    {myq="CG0810243E7F"}
String GarageDoorString         "Garage Door [%s]"              {myq="CG0810243E7F"}
Rollershutter GarageDoorShutter "Garage Door Open"              {myq="CG0810243E7F"}

I had to remove the “attribute” support as it no longer is available. I have done very little testing with it so it may lock out your account if you use the wrong password. I will try to update the 2.x binding soon. Link to the 1.x binding is below.

Thanks,
Scott

Hi Scott,
I am getting the following error below.
Cookie rejected: “$Version=0; TS01dfdd0d=01474093dcfa22fb2823d672cc63192e62d4eb9b9d10316b300aaed0a33648b4d2212639395b771b7f17e1f0f5b52801c82055f81d; $Path=/; $Domain=.api.myqdevice.com”. Illegal domain attribute “.api.myqdevice.com”. Domain of origin: “api.myqdevice.com

That is a common error from openHABs http client, it can be ignored.

I recognized that getting the serial number is hard, so I updated the binding to support configuring the items with either the serial number or the name from the myQ app. You can now just use the name from the app, as shown in the screenshot below. It is case sensitive, and must match exactly. I was testing the binding with 2.4 and getting some unexpected errors(it was working though), so I may have to update it some more.

Switch LightModule               "Light Module On"              {myq="Garage Light"}
Switch LampModule               "Lamp Module On"                {myq="attic Light"}
Switch GarageDoorSwitch         "Garage Door Open"              {myq="CG0810243E7F"}

Thanks,
Scott

Hello,
I’ve been having issue with the binding for the past week. I’m receiving error “no MyQ device found with index: 0”.

I’m currently on binding 1.14.0-snapshot.

Thank you

Hi Scott,
First, Thanks for the hard work! I have the 1.14.0 working with the item names from the MyQ app. I can test the 2.4 jar as well once you post it.

Chris

Hey @scooter_seh… Nice work!!! I just installed the 1.14 binding and I was getting the “Could not connect to MyQ service” error. Turned up the logs and saw this error message

19:23:26.254 [TRACE] [nhab.binding.myq.internal.AccountData] - myq accountId: <Truncated>
19:23:26.259 [TRACE] [.openhab.binding.myq.internal.MyqData] - Requesting URL **https://api.myqdevice.com/api/v5.1/Accounts/%ACCOUNT_ID%/Devices**
19:23:26.611 [WARN ] [che.commons.httpclient.HttpMethodBase] - Cookie rejected: "$Version=0; TS01dfdd0d=015ca84662b9d0775c19839e2ae91f43dc9b82bbb60dbffd8b3142384de887496831d26dad562c5ee013e13cac0deda8e0df62c510; $Path=/; $Domain=.api.myqdevice.com". Illegal domain attribute ".api.myqdevice.com". Domain of origin: "api.myqdevice.com"
19:23:26.617 [TRACE] [.openhab.binding.myq.internal.MyqData] - Received MyQ JSON: {"code":"404.401","message":"Not Found","description":"Account not found."}
19:23:26.622 [TRACE] [.openhab.binding.myq.internal.MyqData] - myq ReturnCode: 404.401
19:23:26.629 [TRACE] [.openhab.binding.myq.internal.MyqData] - myq ReturnCode: 404.401
19:23:26.634 [ERROR] [enhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service

However, the call to https://api.myqdevice.com/api/v5/My/?expand=account had a response that was pointing to a v5 API instead of v5.1

"Devices": {
        "href": "http://api.myqdevice.com/api/v5/Accounts/<AccountID>/Devices"
    },

I tried a POSTMAN call to the v5 API from the response and I was getting a proper response without the errors.

So… Would you be able to update the binding to pick the API URL from response instead of hard coding it? Pretty please? :slightly_smiling_face:

edit: Corrected the binding version

Hi Scott, thank you for providing the update, appreciate it. Is the binding available in OpenHab repo or do I have to download it here? If I download it here can you please tell me how to upgrade it on the existing binding? I am a little rusty with 1.4 and 2.4 as well and not sure which one to use. I am using 1.4 with latest OpenHab.
TIA

see Post 313

Hey Scott. Seems like I’m in the same boat as Jay. Could not connect, 404.401 error. Thanks.

Thanks for all your work, but I still can’t get it to work. I am on the latest 2.5 snapshot. Is there any way you could post the 2.4 binding for me to test? Thanks.

I am also not yet able to connect - it looks the the api url is wrong - i get a similar error.

Could not connect to MyQ service
java.io.IOException: Request Failed: Unknown resonse

I am having the same problem.
Can’t connect to the myq hub.
Please see below, I’m sorry if I’m not following the fencing rules properly:
openhab log
e.com". Illegal domain attribute “.api.myqdevice.com”. Domain of origin: “api.myqdevice.com

2019-10-27 18:25:38.405 [ERROR] [nhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service
java.io.IOException: Request Failed: Unknown resonse at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:282) ~[314:org.openhab.binding.myq:1.14.0.201910221119]at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:123) ~[314:org.openhab.binding.myq:1.14.0.201910221119]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:205) [314:org.openhab.binding.myq:1.14.0.201910221119]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:197) [314:org.openhab.binding.myq:1.14.0.201910221119]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:388) [314:org.openhab.binding.myq:1.14.0.201910221119]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
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) [?:?]

I put the binding in the addons folder and then added ‘myq1’ to adding.cfg. I see in PaperUI that the binding is installed. But it says that the items cannot be parsed correctly and then null response from myq server.

I am sure you will need more info to troubleshoot so please let me know what I can provide you.

2019-10-28 20:54:47.613 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorOnline' could not be parsed correctly.

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:90) ~[?:?]

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:68) ~[?:?]

2019-10-28 20:54:47.632 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorDeviceId' could not be parsed correctly.

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:90) ~[?:?]

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:68) ~[?:?]

2019-10-28 20:54:47.651 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorDeviceType' could not be parsed correctly.

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:90) ~[?:?]

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:68) ~[?:?]

2019-10-28 20:54:47.676 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorSerialNumber' could not be parsed correctly.

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:90) ~[?:?]

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:68) ~[?:?]

2019-10-28 20:54:47.702 [thome.event.ExtensionEvent] - Extension 'binding-myq1' has been installed.

2019-10-28 20:56:37.346 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorSwitch' could not be parsed correctly.

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:90) ~[?:?]

	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:68) ~[?:?]

2019-10-28 20:57:37.473 [ERROR] [nhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service

java.io.IOException: Null response from MyQ server

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:247) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]

	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:277) ~[?:?]

at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:138) ~[?:?]