Chamberlain MyQ Binding

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

Anyone getting the Lamp Module to work? I have an idea to use the motion sensor (turns on light) on the wall mounted opener to trigger other items. In Paper UI, Lamp was not discovered. Added manually and it is
UNINITIALIZED.

It WORKS!
And my wife is really worried about me…

Here’s what I did:
. Used Bitvise to SFTP the file into /usr/share/openhab2/addons
. Opened OH UI on port 8080, and there it was!

I did have some trouble with the settings and having to manually add Things. The Things that showed up at first couldn’t be configured, so I added new ones manually after configuring the binding. Then I deleted the Things that weren’t working.

Now, where’s that sonnet I was working on…

Is there any plan for someone to make a 3.x jar for this?

Hello
I added the 2.5.8 Jar file under the /usr/share/openhab2/addons folder and I am seeing it listed under PaperUi Configuration/Bindings
However I don’t know how to proceed and where to configure the binding to take my Chamberlain ID and Password
Appreciate the help

You need to create a bridge thing for the user/pass. Mine looks like:

Bridge chamberlainmyq:MyQGateway:Garage "MyQ API Services" [ username="your@email.com", password="yourpassword"] {
}

Once you do that, you should see your actual openers show up in your inbox on paperUI. You can create things from there. For some reason I’ve not been able to create the things for the actual doors inside the text configuration. If someone has a working config I’d greatly appreciate that so I can remove the GUI config.

Then just create the items. Mine are configured as:

Switch          MyQSingleGarageDoorState        "Single Garage Door State"              { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:doorstate" }
Rollershutter   MyQSingleGarageDoorRollerstate  "Single Garage Door Rollerstate"        { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:rollerstate" }
String          MyQSingleGarageDoorStatus       "Single Garage Door Status [%s]"        { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:doorstatus" }
Contact         MyQSingleGarageDoorOpen         "Single Garage Door Open"               { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:dooropen" }
Contact         MyQSingleGarageDoorClosed       "Single Garage Door Closed"             { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:doorclosed" }
String          MyQSingleGarageDoorName         "Single Garage Door Name [%s]"          { channel="chamberlainmyq:MyQDoorOpener:Garage:your-device-id:devicename" }

How can I increase the update rate? I think 60 seconds is the default?

In the gateway thing, there is a poll time setting. If you make it too quick, the server may reject the request and you can get more errors in your log files

Would this bridge setting be the correct way to set the poll time:

Bridge chamberlainmyq:MyQGateway:Garage "MyQ API Services" [ username="xxx@yzt.com", password="pppp", refresh=10000] {
}

i.e. refresh without quotation marks?

pollPeriod=60

Thank you @scooter_seh, this seems to work! (sorry for late reply, did not find time to test earlier)!
Where can i find the description for those parameters?

It worked for me however I am not a big fan of these API calls and I am exploring another option alltogether.
I am thinking about flashing a Shelly device with Tasmota and use that to trigger the door to open/close
Will update once I make progress on this

@ltai0001 Shelly seems a good choice to control, but you loose the feedback when somebody manually opens/closes the door…
I don’t like the API much either, since it requires to have your door being controlled via WEB (i.e. not local within the confines or your private LAN anymore), but what can you do if they do not open their local control API…

@sl92656
A reed switch is needed and adding one seems not too difficult

@ltai0001, good point; needs some more detailed technical know how though…

@scooter_seh, any feedback on documentation?
Also any feedback on “how fast is too fast” for the pollPeriod? Is 30s likely too fast? 20s?

@Dave_Baldwin
I use 10s and it seems to work. 10s is fast enough for me to turn on hallway light inside the house. Getting out of car, unlocking the door is normally not done any faster…
I had issues in the past with going faster, they might limit the number of API calls per day?

They are currently only in the source code, I can add it to the bindings wiki