Chamberlain MyQ Binding

This binding works great. Much easier than the 1.x bindings

@scooter_seh if you want help, let me know. If you wouldn’t mind somehow sharing the feedback (beyond the GSON serialization part), I can tackle that too.

1 Like

@scooter_seh. Can you please point me to a post on how i can install this addon manually on openhab2 2.5?

-newbie

Where’s the source code? I’ve worked on a couple of bindings and even made my own. I’d like to help out where I can.

I just moved to a house that has a chamberlain myq system installed and would like to get it working.

Thanks

@ancheta61
See https://www.openhab.org/docs/configuration/addons.html. The last section at the bottom tells you how to install the .JAR binding manually.

Snapshot 2.5 binding is working well for me so far, after ~1 day of experience with goofing around with it.
Just a couple thoughts from me that might help others


If you send too many commands to the garage door before it’s finished its current job, it gets confused, and stops receiving commands. If you look in the official Chamberlain myQ app at that point, a ‘Close Error’ is shown, and you are then instructed to operate the opener locally to get past the error. (This happens even if you send a bunch of commands through the myQ app before the door finishes moving 
 it’s not an openHAB issue as far as I can tell).
Seriously, Chamberlain? I thought the whole point of remote control capability is always being able to control remotely, not just when the stars align. Well, to overcome this, I created additional switch items, a rule with a timer, and visibility conditions on the sitemap that prevent someone from hammering myQ with commands and confusing everything.

(the below is in addition to all of the typical other items and sitemap entries)

Switch preventDoorOpenCommands      "Prevent door open commands during waiting periods"
Switch preventDoorCloseCommands      "Prevent door close commands during waiting periods"
rule "Garage door change inhibit"
when
	Item GarageDoorShutter received command
then
	// rainforest Eagle is rebooting; check 10 min later; if not back up, then reboot again!
	logInfo("myQ", "Inhibiting garage door commands after command was sent..")
    preventDoorCloseCommands.postUpdate(ON)
	preventDoorOpenCommands.postUpdate(ON)
	createTimer(now.plusSeconds(60))
	[
		// after time expires, check state and re-enable the appropriate button
		if (GarageDoorString.state == 'open')
		{ 
			preventDoorCloseCommands.postUpdate(OFF)
		} else {
			preventDoorOpenCommands.postUpdate(OFF)
		}									
	]
end
Switch item=GarageDoorShutter	mappings=[ UP='Open']								visibility=[preventDoorOpenCommands==OFF]
Switch item=GarageDoorShutter	mappings=[ DOWN='Close']							visibility=[preventDoorCloseCommands==OFF]
Text item=GarageDoorString		label="Garage Door Status [MAP(myq.map):%s]"		valuecolor=[open="red",closed="green"]

I found the ‘X’ button in the “default” Rollershutter/switch sitemap option to do nothing, and I preferred buttons anyway, hence the Switch items with my own single-entry mappings.

Hope this helps someone.

@Dave_Baldwin I added it but i still don’t see it installed on paper UI as installed. I also don’t see the other bindings i installed from the paper ui in the addons directory.

[05:01:29] openhabian@openhab:/usr/share/openhab2/addons$ ls -ltr
total 52
-rw-rw-r-- 1 openhab openhab 70 Jan 12 21:53 README
-rw-r–r-- 1 openhabian openhabian 46414 Mar 5 05:46 org.openhab.binding.chamberlainmyq-2.5.0-SNAPSHOT.jar
[05:01:30] openhabian@openhab:/usr/share/openhab2/addons$

OK, the binding had been working great now it has stopped and it says it is uninitialized and in the log file I have ==> /var/log/openhab2/openhab.log <==

2020-03-29 14:47:53.743 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-misc-restdocs, openhab-binding-“Myq”’

I don’t even know where to start should I uninstall and try again, looks like the last time it worked was March 17. Having a stay at home order I didn’t notice it had quit working, till now.

Same here. Was working well but now it is not.

What version of the binding are you using? Can you please share the output from the karaf console “bundle::list” command?

Mine is still working fine - what error are you receiving?

It was not initialized for some reason, I just deleted and added things back and it is working now. Thanks for the help.

I am using 2.5. I rebooted the raspberry pi and forgot it would wipe any bindings not listed so it removed MQTT binding. After I got that fixed MYq was working again

I have the binding loaded by it is not showing any things to add. Is there any directions on setting up the binding?

TIA

I got it working.

Looks like MyQ changed something that broke the binding again or maybe I dont have the latest binding.

My binding version:

Active │ 80 │ 2.5.0.201912261242

Here are some logs:

2020-04-22 21:45:06.003 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Requesting URL Failed
java.io.IOException: java.util.concurrent.TimeoutException: Total timeout 25000 ms elapsed
	at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:148) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:415) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:251) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:331) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:321) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: java.util.concurrent.TimeoutException: Total timeout 25000 ms elapsed
	at org.eclipse.jetty.client.TimeoutCompleteListener.onTimeoutExpired(TimeoutCompleteListener.java:51) ~[?:?]
	at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:282) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_232]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:1.8.0_232]
	... 3 more
2020-04-22 21:45:06.005 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: 'null'






2020-04-22 21:45:41.258 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Requesting URL Failed
java.io.IOException: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:148) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:415) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:251) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:331) ~[?:?]
	at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:321) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_232]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	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:685) ~[?:?]
	at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:128) ~[?:?]
	... 11 more
Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:163) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:444) ~[?:?]
	at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:390) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:574) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1644) ~[?:?]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1490) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) ~[?:?]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) ~[?:?]
	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:154) ~[?:?]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[?:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) ~[?:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[?:?]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[?:?]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~[?:?]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) ~[?:?]
	... 1 more
2020-04-22 21:45:41.265 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: 'null'

forgot to @scooter_seh

I think MyQ changed their endpoint - I’m seeing this in my logs (which stopped about 3 hours ago) this morning:

2020-03-27 05:43:26.509 [ERROR] [org.openhab.io.net.http.HttpUtil    ] - Fatal transport error: java.net.UnknownHostException: myqexternal.myqdevice.com
2020-03-27 05:43:26.509 [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:221) ~[bundleFile:?]
        at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:132) ~[bundleFile:?]
        at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:214) [bundleFile:?]
        at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:206) [bundleFile:?]
        at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:411) [bundleFile:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_242]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_242]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_242]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_242]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]

I restarted my bundle after that point and it’s working fine now (same version as you).

it worked! Thanks!

Given that this binding seems pretty stable, when can we expect to see this submitted for merge?