[ST Edge] SmartThings MyQ Edge (Obsolete)

This Edge driver provides an integration between SmartThings and MyQ using a LAN bridge server. Once you have the bridge server running (via simple executable or docker container), SmartThings will automatically detect and add your MyQ devices.

Installation

Features and Notes

  • The LAN bridge server handles polling MyQ status - there is no more need for a sensor on the door as there was for the previous SmartApp implementation.
  • The Edge driver and bridge server should automatically handle IP changes if they occur. They use SSDP to communicate during discovery and when IP/port updates occur.
  • If you feel inclined to donate, you can find links on the GitHub page.
25 Likes

This is amazing work @brbeaird ! Thank you for putting in all the time on this. Can’t wait to give it a try.

1 Like

This community continues to amaze and impress! Thank you this.

That said I have a question, can this be run on a raspberry pi? I see linux, macros, and win files. I am completely new to RPi as of a month ago so not sure if or which file is compatible.
Again, Thank you!

Yes, although now that you mention it, I did not generate that binary file. I may need to do that directly from my pi, which is acting finicky at the moment. I’ll see if I can get that out very soon.

1 Like

Thank you! No rush

@brbeaird Thank you so much for setting this up!

I tried installing… I have the bridge server running (connected to MyQ) [.exe version] and the device driver installed into SmartThings, but I am not able to get SmartThings to create the device. Are there any requirements that must be met before “Scan for nearby devices” will create the device?

I have tried opening up all ports on the Windows machine that is hosting the bridge server, but that did not appear to work. Thank you for any help you can send my way!

Update: I’ve tried looking for anything that would be blocking communication between the bridge server and the SmartThings hub, They are on the same subnet, and the same vlan. Can you think of anything else I can look into? Or can you recommend any debug/log tools that would be helpful? Thank you so much!

Yes, although now that you mention it, I did not generate that binary file.

Ah, you had me all excited … and then you said this. :joy:

1 Like

That’s one of the downsides of the executables. I can’t compile a binary from my machine for all platforms. I’ll still make it happen, though.

That said, you might find that installing docker on the pi and then pulling the image might be fairly easy as well.

2 Likes

Brian, trying on a Mac. I’m getting this when trying to execute the bin file. I am sure It’s my lack of knowledge …

Screen Shot 2022-09-30 at 9.52.53 AM

Furthermore, does the config file need to be in a specific location?

Docker has been on my to-do list, just haven’t gotten that far yet.

Can you try removing the .bin file extension and running it? Also, is your mac 64-bit?

The config file needs to be in the same directory as the executable.

Renamed but Mac still thinks it’s an archive file.

The Mac is 64 bit.

I’ll try a reboot. EDIT: didn’t help.

There are a couple things that could be happening here:

  1. There’s still something network related impacting the connection
  2. There is something different in your MyQ setup than expected.

Can you try hitting this in a browser? http://your_bridge_server_ip:8125/details and see what the output is? You should hopefully get least one device back with model garagedooropener.

The other thing you can do is to download the SmartThings CLI executable and then run

smartthings edge:drivers:logcat --hub-address=

Then you can filter on the myqDoor driver and see what’s happening when you run discovery.

I probably need to try compiling this on my linux server for a couple more mac versions. Is your mac by chance arm64 instead of x64?

Brian, it’s x64 (Dual-Core Intel Core i5). Stuck on Catalina if that’s relevant (it’s an older Mac mini I use as an always-on machine).

Thanks

Should I see an element of “type”? Below is what I see. Of the two listed 1 is local to the SmartThings hub, the other is a shared garage door.

{“devices”:[{“name”:“Venice Garage Door Opener-EDGE”,“baseUrl”:“10.0.0.23:8125”,“vendor”:“MyQ”,“manufacturer”:“myq”,“model”:“garagedooropener”,“serialNumber”:“###”,“status”:“closed”,“lastUpdate”:“2022-09-27T21:27:01.7624175Z”},{“name”:“Garage Door-EDGE”,“baseUrl”:“10.0.0.23:8125”,“vendor”:“MyQ”,“manufacturer”:“myq”,“model”:“wifigaragedooropener”,“serialNumber”:“###”,“status”:“closed”,“lastUpdate”:“2022-09-30T14:45:45.1548681Z”}]}

I ran the command you sent over and its finding my unifi install on another server (http port 8080). That would explain why its not doing anything. I’m going to see if I can block that server from allowing a connection on 8080 to see if that helps.

Update: I temporarily shut down the server running the unifi install. Once that server was off I was able to run discovery and it created the garage door devices. Turned the other server back on and things seems to be ok and the garage door devices are running normally. I’ll let it run for a few hours and see if for some reason it tries to connect back to the unifi install. Do you think there would be any concern of it doing that ?

Thank you so much for your help! And for developing this! My wife and I depend on this integration daily!

Uh…what? lol. Would you be able to share logs on how it showed it was finding that? The discovery flow normally looks like this:

  1. Hub edge driver broadcasts SSDP MSEARCH request, looking specifically for a server responding to type urn:SmartThingsCommunity:device:MyQDoor
  2. NodeBridge server responds, including a link to /details
  3. Edge driver makes an HTTP call to that bridge URL to get the device list and creates the devices

I’m having a hard time figuring out how unifi somehow got in the middle of that.

I tried getting this up and running using docker-compose but when the container loads up, it’s giving this error in the logs and just restarting over and over. Thoughts?

standard_init_linux.go:219: exec user process caused: exec format error

Here is my docker-compose snippet (redacted obviously). Note, i’ve tried it with/without the volumes setting.

  smartthings-myq-edge:
    image: brbeaird/smartthings-myq-edge:latest
    container_name: smartthings-myq-edge
    restart: always
    network_mode: host
    environment:
      - MYQ_EMAIL={{USERNAME}}
      - MYQ_PASSWORD={{PASSWORD}}
    volumes:
      - ./smartthings-myq-edge:/smartthings-myq-edge

**Edit - I should note that this is on a Raspberry Pi. Not that it should matter, but figured i’d mention it.

I am not very familiar with docker, trying it on pi3.

Below is my pull output

pi@pi3:~ $ docker pull brbeaird/smartthings-myq-edge
Using default tag: latest
latest: Pulling from brbeaird/smartthings-myq-edge
213ec9aee27d: Pull complete
5f1f78129e95: Pull complete
dbe0afc499c9: Pull complete
db3b3dd80de9: Pull complete
ad984437c648: Pull complete
cdd4520dc71f: Pull complete
675f693e5f73: Pull complete
Digest: sha256:6378e7cfa501ee3143a64d071a213a09ff25953acf12f14f921d3b3dc086bdeb
Status: Downloaded newer image for brbeaird/smartthings-myq-edge:latest
docker.io/brbeaird/smartthings-myq-edge:latest

Which one is the container-id that I use for "docker start "

I get the following error if I do docker run:

pi@pi3:~ $ docker run brbeaird/smartthings-myq-edge
WARNING: The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
exec /usr/local/bin/docker-entrypoint.sh: exec format error

Looks like there is no docker for arm64.

Or am I doing something completely wrong ? :slight_smile:

2 Likes

That makes sense. I need to build the docker image on my linux server as well. I’ll push that out when I get a chance.

2 Likes