Chamberlain MyQ Binding

You should just have to add an item like this. If you start the binding with trace logging you can see all the available attributes.

String GarageDoorDesc "Garage Door Desc [%s]" { myq="0#desc" }

Thanks for the binding! I was able to replace my clunky Sinatra app running in a docker w/ this binding in about 10 minutes, works great!

Things I noticed:

  • The Rollershutter GarageDoorShutter needs to be defined, even if not using it, or errors/warnings get logged on the sitemap - even if it doesn’t reference it
  • I adjusted the text on my button as such:
    Switch item=GarageDoorSwitch  icon="_1" label="Open garage!"   visibility=[GarageDoorContact!="OPEN"]
    Switch item=GarageDoorSwitch  icon="_0" label="Close garage!"  visibility=[GarageDoorContact!="CLOSED"]

Now the button text changes based on the garage state

  • I manually set the icon to garagedoor, it dissappeared sometimes otherwise.

@60tonangel I love it! I have been wanting to do that
 but this was the first binding I set up last month and wasn’t sure how to do it. Now I have moved the garage door opener to the top level so the Open, Close buttons and Opening, Closing status text replace each other.

Thank you for the inspiration!

Switch item=GarageDoorOpenericon="garagedoor-closed" label="Garage Door" visibility=[GarageDoorStatus=="Closed"] mappings=[ON="Open"]
Switch item=GarageDoorOpener icon="garagedoor-open" label="Garage Door" visibility=[GarageDoorStatus=="Open"] mappings=[OFF="Close"]
Text item=GarageDoorStatus icon="garagedoor" label="Garage Door [%s]" visibility=[GarageDoorStatus=="Closing"]
Text item=GarageDoorStatus icon="garagedoor-ajar" label="Garage Door [%s]" visibility=[GarageDoorStatus=="Opening"]
1 Like

After lots of fidding, I have a new lamp control to add to the confirmed working list, it’s a Chamberlain PILCEVC. In the event you might want the JSON dump I’ve attached that too.

pastebin link

@Hum, thanks for sharing! I just ordered the Liftmaster branded version of this box (825LM) and am glad to know it will work.

First, thanks for creating this binding!

Do I need to do anything different to get this running on OpenHab2? (I’m fairly new to OpenHab but do it have it working well with my Nest and DSC Alarm)

I have the myq.cfg configured in /conf/services with my login info

This is my items:

*MYQ Garage */
Switch GarageDoorSwitch         "Garage Door Open"                      { myq="0" }
String GarageDoorString         "Garage Door [%s]"                      { myq="0" }
Contact GarageDoorContact       "Garage Door [%s]" <contact>            { myq="0" }
Rollershutter GarageDoorShutter "Garage Door Open"                      { myq="0" }
String  GarageDoorCustomerName  "Garage Door Name [%s]"                 { myq="0#customerName" }
String  GarageDoorDesc          "Garage Door Desc [%s]"                 { myq="0#desc" }
String  GarageDoorOnline        "Garage Door Online [%s]"               { myq="0#online" }
String  GarageDoorDeviceId      "Garage Door Device Id [%s]"            { myq="0#MyQDeviceId" }
String  GarageDoorDeviceType    "Garage Door DeviceType [%s]"           { myq="0#MyQDeviceTypeName" }
String  GarageDoorSerialNumber  "Garage Door SerialNumber [%s]"         { myq="0#SerialNumber" }

Sitemap:

Frame label="Garage Doors" {
	Switch item=GarageDoorSwitch
    Text item=GarageDoorString
    Text item=GarageDoorContact
    Switch item=GarageDoorShutter
    Text item=GarageDoorCustomerName
    Text item=GarageDoorDesc
    Text item=GarageDoorOnline
    Text item=GarageDoorDeviceId
    Text item=GarageDoorDeviceType
    Text item=GarageDoorSerialNumber
    }

I see the bundle is Active:

222 | Active | 80 | 1.9.0.201604040111 | openHAB myq Binding

I see 2 ServiceEvents registered and than 1 BundleEvent started

-[DEBUG] [org.openhab.binding.myq             ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/command/*, service.pid=org.openhab.myq, password=*************, component.name=org.openhab.binding.myq.binding, component.id=173, username=my.email@gmail.com, service.id=294, service.bundleid=222, service.scope=bundle} - org.openhab.binding.myq
-[DEBUG] [org.openhab.binding.myq             ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.myq.MyqBindingProvider}={component.name=org.openhab.binding.myq.genericbindingprovider, component.id=174, service.id=293, service.bundleid=222, service.scope=bundle} - org.openhab.binding.myq
20:43:20.518 [DEBUG] [org.openhab.binding.myq             ] - BundleEvent STARTED - org.openhab.binding.myq

Then I see a bunch of errors like this in the log for each MYQ item in the items file

-[ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'myq' of item 'GarageDoorCustomerName' could not be parsed correctly.
    java.lang.NumberFormatException: For input string: "0#customerName"
    	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_77]
    	at java.lang.Integer.parseInt(Integer.java:580)[:1.8.0_77]
    	at java.lang.Integer.parseInt(Integer.java:615)[:1.8.0_77]
    	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.parseBindingConfig(MyqGenericBindingProvider.java:76)[222:org.openhab.binding.myq:1.9.0.201604040111]
    	at org.openhab.binding.myq.internal.MyqGenericBindingProvider.processBindingConfiguration(MyqGenericBindingProvider.java:63)[222:org.openhab.binding.myq:1.9.0.201604040111]
    	at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:48)[178:org.openhab.core.compat1x:2.0.0.201603280103]
    	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:378)[108:org.eclipse.smarthome.model.item:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:350)[108:org.eclipse.smarthome.model.item:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:168)[108:org.eclipse.smarthome.model.item:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:413)[108:org.eclipse.smarthome.model.item:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:200)[107:org.eclipse.smarthome.model.core:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:116)[107:org.eclipse.smarthome.model.core:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:240)[107:org.eclipse.smarthome.model.core:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:235)[107:org.eclipse.smarthome.model.core:0.8.0.201604041814]
    	at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:117)[107:org.eclipse.smarthome.model.core:0.8.0.201604041814]
    	at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:95)[88:org.eclipse.smarthome.core:0.8.0.201604041814]
    	at java.lang.Thread.run(Thread.java:745)[:1.8.0_77]

What am I missing? (Probably something simple!)

Does the format in the items file need to be different for OH2?

Thanks!

Sorry, it turns out a few of the items are working but the bottom 6 are not:

https://www.evernote.com/l/AAuK7fO-uLdEgJ5PGZX3EvKApLEt00evdjUB/image.png

At least I can open and close it from OpenHab!

The version of the binding you are using probably doesn’t support the #attributes feature as it is not merged into the main openhab github repo yet. If you download the JAR file I build and put it in your addons folder(make sure you remove the old one) then you should be able use the attributes feature in your item configurations. Download link is below if you want to try it out.

https://drive.google.com/open?id=0Bx6EpCMtJQHVRWZKSmV0NUtZU0E

Thanks,
Scott

Scott,

Is the wiki describing a version of the binding that people can’t yet install with openHAB? If so, could you clarify the wiki?

The myq wiki page on the openhab1 github does not talk about attributes or light module support. This topic and my personal github fork’s wiki does have information about it. I was waiting until my pull request gets accepted before I add it to the main wiki.

1 Like

Scott I am now remembering you asked me to review some changes you were
making, which I promptly forgot to do :wink: If you do a PR I will gladly
take a look.

Thanks Scott!

I will try the version you linked too.

Hi. Can anyone tell me if they tried this binding with Liftmaster MyQ? If so, what did you do to make if work? Thanks in advance. Cheers.

I believe they both use the same API. My login worked with both the Liftmaster and Chamberlain MyQ apps so I think there is no difference. I know the Craftsman Assurelink API has a different URL and it doesn’t currently work with the binding. If the binding doesn’t work with your login, please let me know and I can look into it.

Thanks,
Scott

It does not work for me unless I am doing something wrong.
I use the iPhone Liftmaster MyQ app and https://www.myliftmaster.com/

Thanks very much for looking into it Scott.

Add this line to your logback.xml.

<logger name="org.openhab.binding.myq" level="TRACE" />

Then in your log there will be some lines starting with “Received MyQ JSON:” If you could send me the JSON I can look into what is happening.

Thanks,
Scott

I put the logger line in my xml. The events are posting but I can not find that line in any log file. Which log file should it be in? My system is creating events.log, openhab.log, .request.log, and temperatures.log

Thanks again.

Gordon

openhab.log