Chamberlain MyQ Binding

Someone needs to hack the protocol on the other side of this, forget the cloud… maybe dns intercept? I’ll have to look into this as soon as mine comes.

I just went on their website and posted to support to complain nicely and request that they reverse this decision. I explained there are many that found the API very useful and it was a selling point. If you have time it can’t do any harm to request this, maybe if enough people talk to them about it they may change their mind.

I also like the idea of some sort of dns intercept or some way for openhab to spoof commands sent to the device, but that’s way out of my league.

I opened a ticket as well.

There is chatter and an official response focused towards smartthings on their forum. I replied and requested that they not focus on smartthings and make it more neutral, similar to the way it was.

https://myqcommunity.chamberlain.com/chamberlainmyq/topics/smartthings-myq-lite-application-no-longer-works?topic-reply-list[settings][filter_by]=all&topic-reply-list[settings][page]=1#reply_18423574

I will try to update the binding to use the newer API the iPhone app is using. I just need some time to implement it.

Thanks,
Scott

2 Likes

That would be amazing!!

Thanks let me know if you need help testing.

I got the binding working again with the new v4 API. I created a branch on my github if anyone wants to see the changes. I compiled a JAR file and included a google drive link below. I have successfully tested it with openHAB 1.8.3 and openHAB 2.0. All the item configuration is the same so nothing needs to be updates besides the JAR file. If you have any issues, please let me know.

Thanks for the help,
Scott

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

3 Likes

Funny enough I just finished making the changes as well and posted in the Github bug/issue tracker.

The code changes are nearly identical. I can confirm it’s working.

Ok, newbie / not so newbie question, how do I get the updates running in my instance of OH2 on my PI?

You have to remove the existing MyQ binding using the PaperUI or addon.cfg depending on how you installed it. Then you have to copy the JAR file to “/usr/share/openhab2/addons” on your pi. If you are using Samba for openhab configuration, this location is normally not accessible remotely. I normally SSH into my pi, stop the openhab service, change directory to the folder mentioned before and use wget to download the binding. I have a hard time using wget with google drive links so I also uploaded the JAR to my web server here. I’ll include all the linux commands below. If you need anymore help please let me know.

sudo systemctl stop openhab2.service
sudo cd /usr/share/openhab2/addons
sudo wget http://pictures.scott-hanson.com/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar
sudo systemctl start openhab2.service

great thanks! Got it working.

works perfect, you rock. Thanks!!

Thank @scooter_seh for the work and the instruction. But I still cannot connect to the server (I still use the same myq.cfg, items, sitemap as before). It’s on OH2. Below is the log. It seems like it’s using the right jar (the version number).
I also set

myq:appId=NWknvuBd7LoFHfXmKNMBcgajXtZEgKUh4V7WNzMidrpUUluDpVYVZx+xT4PCM5Kx

but it still doesn’t work.

22:11:34.564 [ERROR] [nhab.binding.myq.internal.MyqBinding] - Could not connect to MyQ service
java.io.IOException: Request Failed: Unknow resonse
at org.openhab.binding.myq.internal.MyqData.request(MyqData.java:248)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqData.login(MyqData.java:144)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqData.getSecurityToken(MyqData.java:183)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqData.getMyqData(MyqData.java:128)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding.poll(MyqBinding.java:210)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding.access$0(MyqBinding.java:202)[204:org.openhab.binding.myq:1.10.0.201702210212]
at org.openhab.binding.myq.internal.MyqBinding$1.run(MyqBinding.java:407)[204:org.openhab.binding.myq:1.10.0.201702210212]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_102]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)[:1.8.0_102]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)[:1.8.0_102]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_102]
at java.lang.Thread.run(Unknown Source)[:1.8.0_102]

My setup is different from yours. I am using docker images, and extract openhab to /openhab. The jar is put in /openhab/addons. It throws the exception.
I tried to use

log:set trace openhab.binding.myq

or

log:set trace openhab.binding.myq.internal

but I don’t see any trace regarding the connection. It just shows me the error. Do you have any pointers where I should continue?

If you are running on openHAB 2, you should not be using the myq: prefix. Did you follow the documentation here? Also, having possibly set this value in the internal configuration of your server, you might want to delete the file /var/lib/openhab2/config/org/openhab/myq.config and restart the server.

I didn’t have the prefix myq: in my file.
At first I didn’t set it, and it didn’t work. And then I set appId, it didn’t work either. I restart the docker container. The server was restarted.
For the docker image, I download the openhab snapshot tar file and untar it to /openhab. I don’t see that it’s creating a file in /var/lib/openhab2 and I don’t see the config folder in /openhab either.

Are the changes now merged back into the official binding, or do we need to continue to use the temporary fix binding?

The PR was merged five days ago, so any build after that ought to include it.

Now that I found the note on the update to the apt repository location, just updated so appreciate that. Thanks for all the work.

1 Like

Fresh install of openhab2 on Ubuntu using apt and the new jfrog.io SNAPSHOTS. Installing the MyQ binding from PaperUI seems to load a version from February 14th (pre-fix). If I download the .jar and drop it in addons all works fine, and I can get a more recent build. Just curious how the online repository is picking which version to fetch?

Any ideas? Thanks