Chamberlain MyQ Binding

@scooter_seh I hope you can help me here. I have been trying to get this working with my liftmaster, and I have an issue I haven’t seen here. When using the 1.9 Jar file, I get the error we all know. But If I take that out of the addons folder, and place the new one (yours), I am able to access the garage opener controls locally, but I do not see anything saying that I connected to my openHab account. It shows me offline on myopenhab. Any thoughts?

I used this bundle, but replaced the addon jar with yours.

Launching the openHAB runtime…
osgi> 2017-05-11 22:19:32.976 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.3).
2017-05-11 22:19:36.446 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - mDNS service has been started
2017-05-11 22:19:36.507 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl] - Service Discovery initialization completed.
2017-05-11 22:19:39.070 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2017-05-11 22:19:45.289 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap’
2017-05-11 22:19:45.650 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'myopenhab.persist’
2017-05-11 22:19:45.691 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.items’
2017-05-11 22:19:46.680 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2017-05-11 22:19:52.760 [INFO ] [runtime.busevents ] - GarageDoorString state updated to Closed
2017-05-11 22:19:52.763 [INFO ] [runtime.busevents ] - GarageDoorOnline state updated to True
2017-05-11 22:19:52.765 [INFO ] [runtime.busevents ] - GarageDoorSerialNumber state updated to ********
2017-05-11 22:19:52.768 [INFO ] [runtime.busevents ] - GarageDoorShutter state updated to DOWN
2017-05-11 22:19:52.769 [INFO ] [runtime.busevents ] - GarageDoorSwitch state updated to OFF
2017-05-11 22:19:52.770 [INFO ] [runtime.busevents ] - GarageDoorDeviceType state updated to GarageDoorOpener
2017-05-11 22:19:52.772 [INFO ] [runtime.busevents ] - GarageDoorDesc state updated to Garage Door
2017-05-11 22:19:52.773 [INFO ] [runtime.busevents ] - GarageDoorContact state updated to CLOSED
2017-05-11 22:19:52.774 [INFO ] [runtime.busevents ] - GarageDoorDeviceId state updated to *******
2017-05-11 22:19:55.813 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.rules’
2017-05-11 22:19:56.156 [ERROR] [i.t.TTSServiceSpeechDispatcher] - Output device not configured [null]

I think your issues is related to myopenhab binding not the chamberlain MyQ binding. I would make sure you have the newest “myopenhab” binding in your addons folder. Also check you UUID and Secret ID’s for myopehhab. The binding also requires Java 1.8.0_101 for the it to work properly. This wiki has all the instructions of openHAB 1.8. Latest binding can be downloaded from here. Kai has an forum post will a lot more information if needed, See below:

As stated before this fix will not be included in the Paper UI until the next release(2.0.1 or 2.1.0). Rumor is a new release will be out sometime this summer.

I’m new to raspberrypi and openhab and linux. I understand that the PaperUI version of Myq doesn’t work. I went through the steps to download the latest jar file to the /usr/share/openhab2/addons folder, restarted openhab, but the bindings don’t show up in paperUI - maybe they’re not supposed to? But then how do I know if it worked? In /etc/openhab2/services/ there is a myq.cfg file with username/password filled out; I can usually figure this stuff out, but sort of stuck. ty for any help.

@tontonton All 1.9 bindings have to be configured through text files. If you look at you openHAB log files in “/var/log/openhab2” it should show the if the MyQ binding connected to the web service. More information in the link below:
http://docs.openhab.org/addons/bindings/myq1/readme.html

Sigh… this escapes me

2017-05-24 12:27:15.982 [ERROR] [apache.karaf.shell.support.ShellUtil] - Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error installing bundles:
Unable to install bundle /usr/share/openhab2/addons/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)
at org.apache.karaf.bundle.command.Install.execute(Install.java:116)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[55:org.apache.karaf.shell.core:4.0.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.lang.Exception: Unable to install bundle /usr/share/openhab2/addons/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar
at org.apache.karaf.bundle.command.Install.execute(Install.java:79)[38:org.apache.karaf.bundle.core:4.0.8]
… 11 more
Caused by: org.osgi.framework.BundleException: Error reading bundle content.
at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:149)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.apache.karaf.bundle.command.Install.execute(Install.java:77)[38:org.apache.karaf.bundle.core:4.0.8]
… 11 more
Caused by: java.net.MalformedURLException: no protocol: /usr/share/openhab2/addons/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar
at java.net.URL.(URL.java:593)[:1.8.0_121]
at java.net.URL.(URL.java:490)[:1.8.0_121]
at java.net.URL.(URL.java:439)[:1.8.0_121]
at org.eclipse.osgi.storage.Storage.createURL(Storage.java:461)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.Storage.getContentConnection(Storage.java:441)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.Storage.getContentConnection(Storage.java:417)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:145)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
… 12 more
2017-05-24 12:27:45.688 [ERROR] [apache.karaf.shell.support.ShellUtil] - Exception caught while executing command
java.lang.IllegalArgumentException: No matching bundles
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:59)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[38:org.apache.karaf.bundle.core:4.0.8]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[55:org.apache.karaf.shell.core:4.0.8]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[55:org.apache.karaf.shell.core:4.0.8]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

Wait, you said 1.9; but the jar file is 1.10; what am missing here? ty.

1.10 is the new one sorry. Make sure you installed the openHAB 1.x compatibility mode as well in the paper UI.

Hello, new to OpenHab(2). Trying to install it in a pi and test out MyQ but having no luck. I followed the guide to do APT install and have Expert mode enabled. Here are the steps i did to add Myq.

  1. I added the myq addon from addons peperUI

  2. went to the folder /etc/openhab2/items and created home.items with the values:

    Switch GarageDoorSwitch “Garage Door Open” {myq=“0”}
    Contact GarageDoorContact “Garage Door [%s]” {myq=“0”}
    String GarageDoorString “Garage Door [%s]” {myq=“0”}
    Rollershutter GarageDoorShutter “Garage Door Open” {myq=“0”}
    (From this link:https://github.com/openhab/openhab1-addons/wiki/chamberlain-myq-binding)

  3. went to the folder /etc/openhab2/sitemap and created home.sitemap with values:
    Switch item=GarageDoorSwitch
    Text item=GarageDoorString
    Text item=GarageDoorContact
    Switch item=GarageDoorShutter
    (From this link:https://github.com/openhab/openhab1-addons/wiki/chamberlain-myq-binding)

  4. went to the folder /etc/openhab2/services and updated file myq.cfg with username and password and removed the # infront of those two rows (tried without removing the # too.)

  5. rebooted, went to basic ui. I see the switch and when i tried it UI makes changes but nothing happens on the garage.

Can anyone please help? I have tried fresh installs and tried everything i can with what I read but I am getting nowhere unfortunately. Please help.

Thanks in advance,
RK

Here is what I see in /var/log/openhab2.log
2017-06-23 17:48:31.074 [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)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:133)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:173)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:118)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:205)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:197)[208:org.openhab.binding.myq:1.9.0]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:402)[208:org.openhab.binding.myq:1.9.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
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@a7af12; line: 1, column: 2]
at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1192)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:479)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2761)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709)[176:org.openhab.core.compat1x:2.0.0]
at org.codehaus.jackson.map.ObjectMapper.readTree(ObjectMapper.java:1533)[176:org.openhab.core.compat1x:2.0.0]
at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:213)[208:org.openhab.binding.myq:1.9.0]
… 13 more

Looks good to me…just to be sure, can you control your garage door out of openHAB from https://mychamberlain.com or Android/iOS-App?

Yes, I have IOS app installed and it works. looks like there is some java exception which I am not familiar with. I did not download any jar for myq. its all out of the box.

I see in the exception log its running 1.9. should I be running 1.10? not sure if 1.9 is broken? if so how do I go about installing 1.10 version? thanks.

I’m definitively on 1.10:

204 | Active | 80 | 1.10.0.201706211218 | openHAB myq Binding

You can check this if you run this Console-Command:

bundle:list

And how to access the Console:
http://docs.openhab.org/administration/console.html

What you can try is to install latest openHAB-Snapshot. Myself I’m working with openHAB 2.1.0 Build #964 and MyQ is working as expected.

The current version(1.9) included with the released version of OH2 is broken. You have to manually install a newer version(1.10) for the binding to work again. Post #152 about includes the instruction on how to do this for a linux/rasberry pi install. If you are still having issues please let me know.

Thanks,
Scott

okay. I am starting over with a fresh image of raspbian. for getting the snapshot as per documentation do the below?

echo ‘deb JFrog unstable main’ | sudo tee /etc/apt/sources.list.d/openhab2.list
and then
sudo apt-get install openhab2

will it automatically pull the latest snapshot in this case?

thanks do I still need the openhab2 snapshot version or the stable is ok? i will try the steps in #152.

where can I find myq.cfg for this snapshot.jar? I have done what is outlined in#152 and started openhab but i dont see myq.cfg under /etc/openhap2/services anymore.

If you install the stable version of OH2, then you have to follow the steps mentioned in post #152 for the new myq binding with the fix. The snapshot version already has the fix for the myq binding. If you install the snapshot version you can just install the myq binding from the paperUI and it should work out of the box.

You may have to create the “myq.cfg” file manually in the services directory. The only required parameters are username and password. I would restart OH2 after these changes, just to be safe.

username=xxxxxx@xxxxx.com
password=xxxxxxxxxx123

whoo hoo. got it to work after installing the snapshot openhab2. mycfg created automatically when enabled thru paper ui. now the items and sitemap shows in basic ui but not in paperui. any idea why?