Chamberlain MyQ Binding

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.

Yes, I did uninstall the 1.9 version via PaperUI. Also with service stops/restarts for configuration changes. I’ve done all of my work logged in via ssh. Additionally, for what it’s worth, the module resolving error goes away if I completely delete the 1.10 version (with a stop before and restart after deleting). I’m just getting started with OpenHab2, so I won’t lose anything significant by completely wiping the installation and config files and restarting fresh.

My primary openhab2 install is on a ubuntu server but when I am having issues, I recommend just running a clean install on Windows 7(since most ppl use windows normally) then try to setup the binding manually. In post 170 I tried explaining how to test the web calls manually. If you need any help please let me know.

@scooter_seh I finally got around to playing with Postman tonight like you suggested. I realized that my password has a double quote in it. If I added a \ before the double quote in Postman, the call would work, but fail otherwise. Maybe your new code isn’t escaping double quotes, but the old code did? I ending up changing my password to a single quote and all is well! Thank you for your tip and for all of your work on this addon!

I did remove the code to URL Encoding for the username and password. I assumed because it is now in a JSON Post it was not needed but maybe it is still necessary. I will experiment with it some more and see if I can fix it. Thanks for the help in finding the issue.

Any timeline for when install through paperui will be functional?

Thanks!