Chamberlain MyQ Binding

Are the changes now merged back into the official binding, or do we need to continue to use the temporary fix binding?

The PR was merged five days ago, so any build after that ought to include it.

Now that I found the note on the update to the apt repository location, just updated so appreciate that. Thanks for all the work.

1 Like

Fresh install of openhab2 on Ubuntu using apt and the new jfrog.io SNAPSHOTS. Installing the MyQ binding from PaperUI seems to load a version from February 14th (pre-fix). If I download the .jar and drop it in addons all works fine, and I can get a more recent build. Just curious how the online repository is picking which version to fetch?

Any ideas? Thanks

Thank you for your work on this! I installed the fix, but still having trouble getting it to connect. I’m using OH 2. I had it working before they changed the API, but after installing the fix I’m still getting this:

2017-03-04 14:54:13.200 [WARN ] [org.openhab.io.net.http.HttpUtil    ] - Method failed: HTTP/1.1 500 Internal Server Error
2017-03-04 14:54:13.251 [ERROR] [nhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service
java.io.IOException: Request Failed: Unknow resonse
	at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:248)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:144)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:183)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:128)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407)[211:org.openhab.binding.myq:1.10.0.201702210212]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_121]
	at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.8.0_121]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_121]
	at java.lang.Thread.run(Unknown Source)[:1.8.0_121]

and

20:09:48.059 [ERROR] [org.openhab.io.net.http.HttpUtil    ] - Fatal transport error: java.net.SocketException: Connection reset
20:09:48.059 [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:218)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:144)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:183)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:128)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407)[211:org.openhab.binding.myq:1.10.0.201702210212]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_121]
        at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.8.0_121]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.8.0_121]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_121]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_121]

Any ideas?

Can confirm the same issue. Wondering if it’s related to the new App Marketplace being deployed - Distributing bindings through the IoT Marketplace

Looking through my list of installed bindings. It appears the 2.1.0 SNAPSHOT and 0.9.0 Eclipse Smarthome bindings are getting very recent builds. All 1.10.0 bindings are stuck on the February 14th builds.

I think part of the problem is that I have a LiftMaster brand myQ gateway (and garage door opener) and this binding seems to be specific to Chamberlain. I guess I just got lucky before the API changed.

I ended up using the mios plugin on my vera edge and having openhab control that. (I know this isn’t helpful to people trying to get this binding working, but I wanted to share my work around.)

New OH2 SNAPSHOT build 838. MyQ binding updated to a March build and is working quite nicely on my LiftMaster MyQ gateway. Thanks.

I just tried and mine installed the 2/14 binding…

Something is very strange with the builds. On build 838 the downstream build for openhab-linuxpkg succeeded and I ended up with a working March version of the binding. On build 839 the downstream build for openhab-linuxpkg failed and I reverted back to the 2/14 binding. Today’s build 840 failed, so no update attempt today. I’m just going to put a working version of the jar in addons and wait until the builds settle down.

I am using openhab 1.83 and updated myq binding from wget http://pictures.scott-hanson.com/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar

But still error
2017-03-15 12:40:07.484 [ERROR] [inding.myq.internal.MyqBinding] - Could not connect to MyQ service
java.io.IOException: Request Failed: Unknow resonse
at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:248) ~[bundlefile:na]
at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:144) ~[bundlefile:na]
at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:183) ~[bundlefile:na]
at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:128) ~[bundlefile:na]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210) [bundlefile:na]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202) [bundlefile:na]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407) [bundlefile:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]

That’s still using the old API according to the error
I’m using the jar from Scott’s Google Drive.

https://drive.google.com/open?id=0Bx6EpCMtJQHVVzlQSmtWT3AwWDg

Works perfectly.
Make sure to remove your old binding from your Addon folder.

The JAR on my google drive and website should be exactly the same.

@j_higs Liftmaster and Chamberlain use the same API. The Liftmaster and Chamberlain android app are the same sourcecode if you decompile one app all the code for the other app is included. If you want to try using the API manually I recommend using Postman app for Google Chrome. If you match my settings below you should get a return code of zero when you click send. The MyQApplicationId is “NWknvuBd7LoFHfXmKNMBcgajXtZEgKUh4V7WNzMidrpUUluDpVYVZx+xT4PCM5Kx”

All the settings are in the binding sourcecode if you want to copy them. You could also try using the Chamberlain MyQ Phone app(the API I am simulating) if your gateway works with the app it should work with the binding. If you figure anything else out please let me know. I will keep searching and see if any other projects have this problem too(none I found so far)

Thanks,
Scott

I’m getting the same error. I’ve tried removing the Chamberlain Binding in the PaperUI, and adding the .jar file mentioned above into the openhab/addons dir and it didn’t seem to do anything. I then tried (with the .jar still in the addons dir) installing the Chamberlain Binding and get the error again. I’m kinda new to openhab and trying to get my doors working, but could be doing something wrong too…

any advice would be greatly appreciated!

This is the error.
2017-03-31 19:04:15.500 [ERROR] [nhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service
java.io.IOException: Could not parse response
at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:242)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:133)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:173)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:118)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:205)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:197)[198:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:402)[198:org.openhab.binding.myq:1.9.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_112]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_112]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_112]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_112]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_112]
Caused by: org.codehaus.jackson.JsonParseException: Unexpected character (’<’ (code 60)): expected a valid value (number, String, array, object, ‘true’, ‘false’ or ‘null’)
at [Source: java.io.StringReader@d9ef585; line: 1, column: 2]
at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1192)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:479)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2761)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709)[190:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1533)[190:org.openhab.core.compat1x:2.0.0]
at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:213)[198:org.openhab.binding.myq:1.9.0]
… 13 more

Looks like you have binding 1.9 instead of 1.10, I think the link to 1.10
is in a post above.

I just installed OpenHab2 on Raspbian Jessie via apt-get. I originally installed the Chamberlain MyQ Binding v 1.9. via PaperUI. At that point, I got the “Could not connect to MyQ service java.io.IOException: Could not parse response”, so I followed the instructions in this post

I’m now getting the following error in /var/log/openhab2/openhab.log:

2017-03-31 21:48:00.561 [ERROR] [org.openhab.binding.myq ] - FrameworkEvent ERROR - org.openhab.binding.myq
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.myq [195]
Unresolved requirement: Import-Package: org.openhab.core.binding

at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

did you make sure you removed the 1.9 binding through the PaperUI first?

You should uninstall the binding through the PaperUI. Don’t know if its necessary but I always stop the openhab service before adding addon manually. Some of the openhab 1 binding were written to only load config setting on startup and will not reload config changes on the fly. I pretty sure the MyQ binding doesn’t have this issue but I always stop and restart the openhab service just in case. If you are running openhab2 on a rasberrypi you have to SSH into it. Then run the commands in the post 150 above. After you install a binding manually do not try to install it with the PaperUI. When a new version of openhab2 comes out (2.1 or 2.0.1) this bug should be fixed and you will be able to install the binding from the PaperUI again.