Chamberlain MyQ Binding

The paperui only displays “things” not “items”. OH1 bindings do not have the concept of “things” so they will not appear. Until a OH2 myq binding is released you have to use the basicui, clasicui and/or habpanel to control the items.

ok thanks for clearing that up.

I notice that the new OpenHab 2.1.0-1 release includes the 1.10.0 MyQ bindings. I’m still having issues getting this to connect at to the MyQ service when initiating the binding through the Paper UI.

2017-07-01 14:29:34.022 [ERROR] [org.openhab.io.net.http.HttpUtil ] - Fatal transport error: java.net.SocketTimeoutException: Read timed out
2017-07-01 14:29:34.024 [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:218)[222:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:129)[222:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210)[222:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202)[222:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407)[222:org.openhab.binding.myq:1.10.0.201702210212]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

My service/myq.cfg file contains only : username,password, refresh, timeout. The username is an email address, so it contains an @ symbol. Does this need value to be escaped?

I’m also a little confused as to where the items and sitemap configurations need to go. I’ve seen others reference using /etc/openhab2/items and /etc/openhab2/sitemaps, but initially thought they might be part of the service configuration. The official OpenHAB2 documentation has not been completely clear on this.

I appreciate your help.

Anyone else notice issues with Chamberlain’s server in the last day or two?

Yup, not working for me today.

Phew ok. I thought it was trouble with my account that maybe they were limiting requests.
As their native iOS app was also either not responding or very slow.

It looks like 1.10.0 comes with openhab2 now. I did a fresh install on my rpi last night and it worked right out of the box (after creating an items file and a sitemap). I have a LiftMaster 41D7675 with a LiftMaster 828LM.

I also created a .rules file that automatically closes the garage after a set amount of time (see gist below).

I also connected up to openhab cloud and then shared the GarageDoorSwitch with it. Then connected it to IFTTT. I have an echo dot and connected it to IFTTT so now I can open and close the garage door with Alexa using “Alexa trigger open garage”.

Very new here to OpenHAB. I have a Craftsman Assuelink that I just installed, the craftsman app works fine, but I want to switch over to OpenHAB and begin this jurney…

I am on Ubuntu and I installed follwing the instructions here and didn’t use the snap version in the default ubuntu repo.

Now I have a couple of questions… I grabbed the 1.10.0-Snapshot version from this thread, does that have craftsman support or should I be using the 1.09.0-Snapshot from the thread or the 1.10 version that is listed in PaperUI?

I tried to just copy the 1.10-Snapshot version to my addons folder and I am not sure what I should see. I don’t see it in bindings, I don’t see it when I “add device”. Do I have to do the manual config and then I can see it in PaperUI? (I did stop, copy, restart the service, but have not created the files for setup yet). Assuming I will need to add the one line to say it is a craftsman version as stated earlier in the thread.

I have installed this binding and it is working great with my Chamberlain garage door opener.
The wall button that came with the garage door opener also has a motion sensor in it to turn off the light after the garage is unoccupied. Is there any way to take advantage of this in the binding?

The motion sensor is not supported in the web API.

1.10 included in the paperui should have Craftsman Assuelink. I do not know if it works or not.

I stopped openhab, removed the snapshot version, turned the service back on and used PaperUI to “install” the included 1.10 version. I created a myq.cfg file with:

craftsman=true
username=
password=

21:11:02.894 [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:217)[185:org.openhab.binding.myq:1.10.0]
	at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:128)[185:org.openhab.binding.myq:1.10.0]
	at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210)[185:org.openhab.binding.myq:1.10.0]
	at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202)[185:org.openhab.binding.myq:1.10.0]
	at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407)[185:org.openhab.binding.myq:1.10.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_144]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_144]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]

I’m seeing the same connection errors, though my items are getting updated and I’m able to control the garage door successfully through OH.

I created a myq account on chamberlin’s website when I got the Assurelink and I tried to add it there as some said it worked… I think they blocked that. So, as a test I just commented out the line for “craftsman=true” and it is logging in, I am not getting login errors when I restart the service, just errors when I use a control

07:18:03.514 [WARN ] [nhab.binding.myq.internal.MyqBinding] - no MyQ device found with index: 0
07:18:48.008 [WARN ] [nhab.binding.myq.internal.MyqBinding] - no MyQ device found with index: 0

So there must be something with craftsman that which isn’t working. :frowning:
Update: So I went to GitHub to just see if I could find something. I downloaded the folder and searched for “username”, got it… right below that;

<parameter type="boolean" name="craftman">
  <label>Craftman API</label>
  <description>Use Craftsman Assurelink API instead of MyQ API.</description>
  <default>false</default>
</parameter>

craftman… not craftsman! :rofl: So now I am a step further!

08:28:25.900 [WARN ] [nhab.binding.myq.internal.MyqBinding] - no MyQ device found with index: 0

Looks like it logged in! Now I need to figure out this device index thing. For sure I am not getting the login error, but if I press any of the controls that is when it throws the index error.

Hello,

I’m trying to make this work and I can’t get it to work in openHab 2.1.0.

At first, to check if it’s working at all, I downloaded a package of 1.8.3 preconfigured from https://www.wemustbegeeks.com/use-alexa-echo-chamberlain-myq-openhab-ifttt/ (a guide to get Alexa Working with MyQ through OpenHab). Once I modified the myq user/pass and my openhab account (plus 2.1 myq extension and new openhab extension), it worked no problem. But that’s an old openhab.

On my freshly installed OpenHab 2.1, I download the myq 1.1.0.0 binding and openhab cloud connector. I also installed basic UI interface since it’s needed for this extension.

I configured conf/services/myq.cfg with my myq user/pass. Then, I created a default.sitemap and a default.items

sitemap default label="My first sitemap"
{
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
}
/*MYQ Garage*/ 
Switch GarageDoorSwitch         "Garage Door Open"              {myq="0"}
Contact GarageDoorContact       "Garage Door [%s]" <contact>    {myq="0"}
String GarageDoorString         "Garage Door [%s]"              {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"}

I then started openhab in debug mode, hop into basic UI, press open, nothing happen. I also don’t have the information about my garage door. I also see nothing in userdata\logs\openhab.log. What am I missing?

I look at the code and “craftman=true” is correct. Sorry for the config file being wrong. If you can turn on trace logging and capture the bindings json data I can take a look at it. I don’t know how to do it off the top of my head but I would just search the forums.

Make sure in the myq.cfg you removed the myq: from the username and password field and any leading spaces. I also like to restart openhab for good measure.

oh god, I feel like a noob… I just saw I didn’t removed the leading # to comment out… Thanks!

Is there any plan on bringing the binding to 2.x native compatibility (things and binding thru paper ui)?

I have been working on a 2.x version. I got it connecting to the myq server but I am still working on the thing/item event handling and discovery service. openHAB 2 is very different and I’m still trying to figure it all out.

2 Likes

First, thanks! And no problem on the “s”… My thought was, lets make sure the key/setting is in the code, which it was, took me a second to see it. :slight_smile:

I did turn debugging on the other day, so I know that! Easy switch to trace mode now.

2017-09-16 09:38:11.869 [DEBUG] [org.openhab.binding.myq             ] - BundleEvent STARTING - org.openhab.binding.myq
2017-09-16 09:38:11.883 [DEBUG] [org.openhab.binding.myq             ] - BundleEvent STARTED - org.openhab.binding.myq
2017-09-16 09:38:11.930 [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=166, service.id=293, service.bundleid=185, service.scope=bundle} - org.openhab.binding.myq
2017-09-16 09:38:12.041 [TRACE] [q.internal.MyqGenericBindingProvider] - bindingConfig: 1
2017-09-16 09:38:12.042 [TRACE] [q.internal.MyqGenericBindingProvider] - deviceIndex: 1 attribute: 
2017-09-16 09:38:12.055 [TRACE] [q.internal.MyqGenericBindingProvider] - bindingConfig: 1
2017-09-16 09:38:12.056 [TRACE] [q.internal.MyqGenericBindingProvider] - deviceIndex: 1 attribute: 
2017-09-16 09:38:12.108 [TRACE] [q.internal.MyqGenericBindingProvider] - bindingConfig: 1
2017-09-16 09:38:12.109 [TRACE] [q.internal.MyqGenericBindingProvider] - deviceIndex: 1 attribute: 
2017-09-16 09:38:12.134 [TRACE] [q.internal.MyqGenericBindingProvider] - bindingConfig: 1
2017-09-16 09:38:12.144 [TRACE] [q.internal.MyqGenericBindingProvider] - deviceIndex: 1 attribute: 
2017-09-16 09:38:12.145 [TRACE] [q.internal.MyqGenericBindingProvider] - bindingConfig: 1#customerName
2017-09-16 09:38:12.162 [TRACE] [q.internal.MyqGenericBindingProvider] - deviceIndex: 1 attribute: customerName
 (bunch more of those)
2017-09-16 09:38:12.401 [DEBUG] [org.openhab.binding.myq             ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={component.name=org.openhab.binding.myq.binding, craftsman=true, username=t***@****.com, //craftsman=true, service.pid=org.openhab.myq, component.id=165, craftman=true, password=****, event.topics=openhab/command/*, service.id=298, service.bundleid=185, service.scope=bundle} - org.openhab.binding.myq
2017-09-16 09:38:12.505 [TRACE] [openhab.binding.myq.internal.MyqData] - Retrieving door data
2017-09-16 09:38:12.512 [TRACE] [openhab.binding.myq.internal.MyqData] - attempting to login
2017-09-16 09:38:12.514 [TRACE] [openhab.binding.myq.internal.MyqData] - Requesting URL https://craftexternal.myqdevice.com/api/v4/User/Validate

2017-09-16 09:38:13.909 [TRACE] [openhab.binding.myq.internal.MyqData] - Received MyQ JSON: {"SecurityToken":"****","ReturnCode":"0","ErrorMessage":"","CorrelationId":"****"}
2017-09-16 09:38:14.202 [TRACE] [openhab.binding.myq.internal.MyqData] - myq ReturnCode: 0
2017-09-16 09:38:14.255 [TRACE] [enhab.binding.myq.internal.LoginData] - myq securityToken: ****
2017-09-16 09:38:14.256 [TRACE] [openhab.binding.myq.internal.MyqData] - Requesting URL https://craftexternal.myqdevice.com/api/v4/userdevicedetails/get
2017-09-16 09:38:14.597 [TRACE] [openhab.binding.myq.internal.MyqData] - Received MyQ JSON: {"Devices":[],"ReturnCode":"0","ErrorMessage":"","CorrelationId":"***"}

2017-09-16 09:38:14.603 [DEBUG] [b.binding.myq.internal.MyqDeviceData] - Chamberlain MyQ Devices:
2017-09-16 09:39:12.401 [TRACE] [openhab.binding.myq.internal.MyqData] - Retrieving door data
2017-09-16 09:39:12.402 [TRACE] [openhab.binding.myq.internal.MyqData] - Requesting URL https://craftexternal.myqdevice.com/api/v4/userdevicedetails/get
2017-09-16 09:39:12.873 [TRACE] [openhab.binding.myq.internal.MyqData] - Received MyQ JSON: {"Devices":[],"ReturnCode":"0","ErrorMessage":"","CorrelationId":"****"}

I do have the tokens and such, not sure what is safe to post. The last part starting at "myq ReturnCode: 0: repeats down to Received MyQ JSON data very minute (like it should) and each time has a new CorrelationId. As it appears the Devices array (if that is what it is) is blank.

I went to the craftsman site and opened the developers tool in chrome. I do see this information with the call GetAllDevices?brandName=Craftsman

{GatewayId: **, ErrorStatus: null, ErrorMessage: null,…},…]
0:   {GatewayId: **, ErrorStatus: null, ErrorMessage: null,…}
  CloseError: false
  DeviceTypeId: 2
  DisableControl: true
  DisplayStatesince: "Closing for 8 seconds[s]"
  Error: false
  ErrorMessage: null
  ErrorStatus: null
  Gateway: "Garage"
  GatewayId: *
  Imagesource: "icon_door_5.png"
  LastUpdatedDateTime: "2017-09-16T13:58:23.2760000Z"
  LowBattery: false
  MonitorOnly: false
  MyQDeviceId: *
  Name: "Garage Door : Double"
  OpenError: false
  SensorError: false
  State: "5"
  StateName: "Closing"
  Statesince: 1505570303276
  ToggleAttributeName: "desireddoorstate"
  ToggleAttributeValue: "1"

1: {GatewayId: ***, ErrorStatus: null, ErrorMessage: null,…}

I am NOT a web developer and VERY new to OpenHAB. I do embedded development so I can muster my way through with some google and some help. If you need anything, let me know! More than happy to assist if it helps others to have this working again!