Chamberlain MyQ Binding

:laughing:

When you hit the delete icon in Paper UI, sometimes the node will not delete. All you do is hit the delete icon again, and you’ll get a dialog asking if you want to force remove the thing.

Wow, that was too easy! And it worked. Logs clean and things work.
The other way might have been more fun.

Would that be hand-editing the jsondb file? If so, I’m not sure I agree with your definition of fun. LOL

Well, as you can see Lord Vader demonstrating the move, yes, a hand is involved. :slight_smile:

Just to confirm, when we say to clear cache and tmp, we’re talking /var/cache and /var/tmp, correct? I copied the 1.x jar into my addons folder, but no workie. :frowning:

Anyone have a link to the latest Chamberlain binding? Thinking 2.5 is what it’s at now from a couple messages above? Want to try clearing some things and getting this working again.

Thanks.

JR

The 2.5 jar file referenced in this post is the one I’m using. Not sure if there’s anything more current.

Thanks, are there any dependencies I need to install? When I run the 2.5 jar file it complains so thinking maybe a missing dependency?

Exception occurred while calling thing handler factory ‘org.openhab.binding.chamberlainmyq.internal.ChamberlainMyQHandlerFactory@67837393’: null
java.lang.NullPointerException: null

Hmm. I don’t think so. At least I didn’t install anything else to get it running. Besides, if there was a dependency, I think you would get a different message.

Was there anything else logged other than the above message?

Did you remove all your existing MyQ things before dropping the jar in addons?

Oh yeah, pages and pages of java errors. So I should remove my things, and assume then associated items as well?

Thanks.

Steve

Ugh. That’s not good.

Just try removing the existing things (preceded by a backup, of course). :wink:

Also curious what you see in the karaf console when running this.

list -s | grep myq

It depends on http client for the web requests. I normally install the Philips Hue binding to install the correct dependencies.

Right now can’t get my Garage Door Opener thing to remove. Been saying removing for a while now. The MyQ device is gone but that wouldn’t go quietly either. Had to remove then install another chamberlain binding and then it came online again and then I deleted again and it went away. other won’t leave.

Nevermind, force removed. WIll try again.

EDIT: Looks like it’s working now but won’t know until I get home and can update my items. I do see an odd thing in the logs. So after getting the MyQ Gateway online, it found the Garage Door, but in the logs I got:

2019-03-05 10:20:52.127 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘chamberlainmyq:MyQDoorOpener:XXXXXXXXXXXX’ to inbox.
2019-03-05 10:21:06.638 [INFO ] [ainmyq.handler.ChamberlainMyQHandler] - Initializing a MyQ device:
DeviceID: XXXXXXX
Device Type: Garage Door Opener WGDO
Device Type Id: 17
Parent Id: XXXXXXX
Model Serial: XXXXXXXXX
Description: Garage Door Opener
State: 2
Online: true

2019-03-05 10:21:37.146 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Request Failed: Login error. Please login again.
2019-03-05 10:21:37.146 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: ‘null’

JR

After a bit it started spitting out lots of messages in the openhab log:

2019-03-05 11:05:01.998 [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:163) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:366) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:201) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:283) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:274) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
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) [?:?]
Caused by: java.util.concurrent.TimeoutException: Total timeout 25000 ms elapsed
at org.eclipse.jetty.client.TimeoutCompleteListener.onTimeoutExpired(TimeoutCompleteListener.java:52) ~[?:?]
at org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(CyclicTimeout.java:271) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]

 3 more
2019-03-05 11:05:02.079 [ERROR] [handler.ChamberlainMyQGatewayHandler] - An exception occurred while executing a request to the Gateway: ‘null’
2019-03-05 11:05:37.440 [ERROR] [handler.ChamberlainMyQGatewayHandler] - Requesting URL Failed
java.io.IOException: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@27d3fc52{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,OPEN,fill=-,flush=-,to=77/0}->HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@1817d5a7{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,ISHUT,fill=-,flush=-,to=77/0}{io=0/0,kio=0,kro=1}->SslConnection@76a0f593{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]
at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:163) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.request(ChamberlainMyQGatewayHandler.java:366) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.getMyqData(ChamberlainMyQGatewayHandler.java:201) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.refreshDeviceState(ChamberlainMyQGatewayHandler.java:283) ~[?:?]
at org.openhab.binding.chamberlainmyq.handler.ChamberlainMyQGatewayHandler.lambda$0(ChamberlainMyQGatewayHandler.java:274) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
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) [?:?]
Caused by: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@27d3fc52{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,OPEN,fill=-,flush=-,to=77/0}->HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@1817d5a7{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,ISHUT,fill=-,flush=-,to=77/0}{io=0/0,kio=0,kro=1}->SslConnection@76a0f593{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]
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:684) ~[?:?]
at org.openhab.binding.chamberlainmyq.internal.HttpUtil.executeUrl(HttpUtil.java:146) ~[?:?]

 11 more
Caused by: java.io.EOFException: HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]<-DecryptedEndPoint@27d3fc52{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,OPEN,fill=-,flush=-,to=77/0}->HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]->SocketChannelEndPoint@1817d5a7{myqexternal.myqdevice.com/40.112.59.58:443<->/192.168.0.50:50996,ISHUT,fill=-,flush=-,to=77/0}{io=0/0,kio=0,kro=1}->SslConnection@76a0f593{NEED_WRAP,eio=-1/-1,di=-1}=>HttpConnectionOverHTTP@3b8a63fa(l:/192.168.0.50:50996 ↔ r:myqexternal.myqdevice.com/40.112.59.58:443,closed=false)=>HttpChannelOverHTTP@5975e5b9(exchange=HttpExchange@57b200e7 req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@538d8ec9(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@168f0adc{s=START}],recv=HttpReceiverOverHTTP@60a17d99(rsp=IDLE,failure=null)[HttpParser{s=CLOSED,0 of -1}]]

OK after stopping OpenHAB, removing the chamberlain things, clearing the cache, clearing the tmp, then copying the new jar file, starting OpenHAB, repointing the items, up and running again. I now have a rollershutter also but not sure how to use it. I have up/down/stop buttons. They do not seem to do anything. Does the door have to be in motion for those to do something?

Thanks.

JR

I have been updating the 2.x binding to have more channels similar to the 1.x version. I created a readme file on my github with examples for all of the different channel values. It has examples for the different item types.

Thanks,
Scott

Thanks I tweaked some “Default” settings to “Switch” but probably won’t help. I’m wondering how the rollershutter functionality works. Like when you push the up button does it go up 1%? Does all the garage doors support this?

Side question on some rules. I use my phone to determine someone coming home or not, but it’s an art with coming on the Wi-Fi and how long it takes someone to get in the house. Was thinking of using my on the Wi-Fi check but also tie that to the garage door being closed plus like 10 seconds. From looking at the logs, I can’t use status change from Open to Closed can I? Would need to be Closing to Closed?

Thanks.

JR

The Rollershuttor will be set to zero when the garage door is open, 100 when the door is closed, and 50 when the door is moving/not open/not closed. The door state switch is meant mostly to send the open/close commands to the API. Everytime you switch it on or off it will sent the door open or close command to the MyQ API. The switch will be in the ON state if the door is any state(open/moving/stopped) other than closed, and off when the door is closed. I added the door open and close contacts to help determine the true state of the door. The open contact will only trigger when the door is fully open and has stopped moving. Similarly the close contact will only trigger if the door is fully closed and has stopped moving. The binding goes into a “fast” polling mode when you trigger the garage door through the binding and this should update the state every 2 seconds. In normal polling mode it only gets the device status every 60 seconds. So if you close your garage door with a standard RF remote or the wall button it could take 60 seconds before the status updates. I personally use an arduino with a reed switch and I mounted a magnet on my door to get the status faster.

Thanks,
Scott

I installed the OH2 binding from the Eclipse marketplace, and I am getting this error:

2019-04-01 10:09:38.107 [DEBUG] [org.openhab.binding.chamberlainmyq  ] - BundleEvent STARTING - org.openhab.binding.chamberlainmyq
2019-04-01 10:09:38.110 [DEBUG] [org.openhab.binding.chamberlainmyq  ] - BundleEvent STARTED - org.openhab.binding.chamberlainmyq
2019-04-01 10:09:38.115 [ERROR] [org.openhab.binding.chamberlainmyq  ] - bundle org.openhab.binding.chamberlainmyq:2.5.0.201902170358 (276)Component descriptor entry 'OSGI-INF/*.xml' not found

I added this to my /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg:

log4j2.logger.myq.name = org.openhab.binding.chamberlainmyq
log4j2.logger.myq.level = DEBUG

and I don’t see anything else logged for that package, just the 3 lines above, so it looks like the manifest failure may actually prevent the binding from loading.

Just piping in that the new binding is working just fine for me, with 3x LiftMaster 8550W openers, connecting through an 819LMB LiftMaster Home Bridge. I’m also using an actual reed switch (connected to my security system) to trigger faster updates from manual operation (items named TwoCar_Contact from the alarm, and TwoCar_Rollershutter from MyQ):

    
// These rules trigger based on the alarm system, to provide faster update to the
// roller shutter items from MyQ
rule "Garage Door Closed"
when
  Member of gMyQDoors changed to CLOSED
then
  postUpdate(triggeringItem.name.substring(0, triggeringItem.name.length - 7) + "Rollershutter", "100")
end

rule "Garage Door Opened"
when
  Member of gMyQDoors changed to OPEN
then
  val shutter = triggeringItem.name.substring(0, triggeringItem.name.length - 7) + "Rollershutter"
  postUpdate(shutter, "50")
  // force an update when the door should be completely open
  createTimer(now.plusSeconds(12), [| sendCommand(shutter, "REFRESH") ])
  createTimer(now.plusSeconds(14), [| sendCommand(shutter, "REFRESH") ])
  createTimer(now.plusSeconds(16), [| sendCommand(shutter, "REFRESH") ])
  createTimer(now.plusSeconds(18), [| sendCommand(shutter, "REFRESH") ])
end