Challenge accepted. Good thing I’ve had some practice with a certain other RainMachine app.
@copyninja
I just recently got a MyQ kit, but didn’t unbox or installed it yet. Did you consider using IFTTT Maker channel to relay calls to Chamberlain APIs? I don’t know how your integration works, but just throwing this idea our there…
Linking here to a ready-to-go workaround.
According to that other thread, I don’t think that workaround actually works.
I thought about using IFTTT Maker, but I think the integration is too complex for that. We need to do things like get a security token back and be able to handle parsing responses, which I don’t think would work too well.
My current thought is to use a RaspberryPi running nodeJS to act as a proxy to do the callouts to Chamberlain. The NodeJS code could even store the Chamberlain logon information so SmartThings doesn’t even see it. From there, we would just need to expose the RaspberryPI endpoints to the Internet via port forwarding, and we could reuse most of copy-ninja’s existing code to call whatever your public-facing IP is.
Beyond that, I could probably improve it further by rewriting the whole thing to use local LAN calls like I did with RainMachine. That way, traffic stays between your hub and the rPi and doesn’t involve the ST cloud at all.
I’ll see what I can put together over the next couple weeks.
Can hubaction do this?
Is anyone looking at it?
Theoreticaly it should. It can be a little more complicated. All I know is SmartApps can only send command, won’t receive response through HubAction. Device Handler can send and receive command via parse().
The next gen MyQ integration might need to create a dummy Device Handler to communicate to MyQ servers.
Thankfully, this isn’t true If it were, the Rainmachine rewrite never would have worked. You definitely can get a SmartApp to parse responses, which is what I was thinking I would do in this case. It’s not pretty, but it does work.
One thing I don’t know for sure is whether hubAction is limited to LAN-only calls…is it possible to use hubAction to hit an endpoint over the Internet?
Great news. While I love to do this myself, I have packed up my smartthings. In transition to move to Houston.
I just did some quick testing tonight to see. Our big obstacle here is that hubAction cannot handle HTTPS connections That’s a major limitation here as we definitely need HTTPS to hit the Chamberlain API. Seems like building a proxy in our own LAN is the only real option. Looks like I’ve got some new stuff to try with nodejs.
There is an integration with AT&T that also (quietly) supports MyQ… works on LAN with HubActions, compatible with Mac/linux including Raspberry Pi 2/3. Written in node.js
Won’t node.js do the same as ST… come from one IP?
Node.js on a local raspberry Pi uses your home IP
Very interesting. Where could I find more info on that?
@brbeaird Integration with AT&T digital life
Go through the thread first, find it at https://github.com/ady624/HomeCloudHub
Thanks for that. After a quick look over the code, I suspect that app is going to have the same problem as this one once Chamberlain blocks the SmartThings cloud IP addresses. While the Home Cloud app does involve setting up an external server, that’s for some of the other AT&T specific features. The MyQ integration itself still just uses SmartApp code from what I can tell.
Still, the overall idea of how Home Cloud integrates with AT&T is very similar to how I’d like to set up MyQ. Just need to get a few blocks of time to mess around with node (very hard to do these days with 2 small children running around).
It was initially using the PI to open/close the door. I later modified it to rely on the hub to open/close door and rely on the PI to just read the status. That change can be reverted so that the PI does it all. Door still works for me at this time. Did they not block ST’s IPs yet?
Look at the “doSetDeviceAttribute” function inside the myq.js file under modules. I may still have the old code in the repository, the one where the hub actually asks the PI to open/close the door…
Shh, let’s pretend they have…
Ah, now we’re talking I’ll have to look a little closer at the code history, but that sounds like exactly what we’ll need. But yeah, I don’t think the blocking has actually happened yet because my door is still working last time I checked.
Can this run on DD-WRT?
As soon as it stops working I’ll fix it to use the PI instead. Until then, you have a base to start off with, if you want to spin off your own. I am currently procrastinating