toddhutch Posted April 26, 2015 Share Posted April 26, 2015 (edited) DONE! MyQ opening and closing using yahoo pipes, Zapier and the ISY Network module. From Network Resources call Zapier which calls Yahoo Pipes, with variables for the device ID, command, username, password and next Zapier web service GUID. Pipes pulls security token, and exposes device IDs of garage doors so you can note the ID an use it in the query string. I can publish the pipes so you can clone them. Then pipes calls GET a Zapier catch, and passes security token and device ID and command, which then does a PUT with JSON to the MyQ API and the door opens or closes. Granted this took over 12 hours to figure out, but EVERYONE here loves a good puzzle right?! ISY->Zapier1->Yahoo Pipes->Zapier2->MyQ ISY example is attached Zapier1 Webhook -Catch Hook WebHook -GET You'll need the last part of the URL https://zapier.com/hooks/catch/zapier1guid/ it is 6 characters long inside the / / you'll use that in the ISY Path /hooks/catch/zapier1guidhere/ Fill in your information in the ISY Path Username and password (from Chamberlain https://www.mychamberlain.com/Login.aspx) door ID from Yahoo Pipes, thisparthere is the guid from zapier2 (you want to keep your zapier guids to yourself, as you only get 100 free from the zapier), openclose is 1 for down 2 for up. Update button in Resource Editor, Save, Save AGAIN, then test it. You'll need to do this to pass the information to Zapier service. Once you are down on step 5 of zapier you'll want to fill it in with this information, assuming you're using the Yahoo Pipe below. https://pipes.yahoo.com/pipes/pipe.run?_id=97b233a1afcd20f24e035e2cdca1af01&_render=json&user=querystring__user&password=querystring__password&openclose=querystring__openclose&doorid=querystring__doorid&zapier=querystring__zapierWhere it saids querystring, you should use the insert fields button and completely replace each item between the = &. Send As JSON = yes JSON key = json Unflatten = no Test Webhook trigger Really all you're checking for at this point is to see the trigger sample and that the information you've pushed from ISY to Zapier is showing up. You can also See Action sample and view the URL which should be something like. https://pipes.yahoo.com/pipes/pipe.run?_id=97b233a1afcd20f24e035e2cdca1af01&_render=json&user=youremail&password=yourpassword&openclose=1&doorid=yourdoorid&zapier=yourzpaierguid Name the Zap and turn it on. Yahoo Pipes Here is a link to the Yahoo Pipes which is used push security token to Zapier. (You'll also want to fill in your login information for MyQ, so you can get your deviceIDs (AKA doorID) from the two tails at the bottom left (view by clicking Edit Source) if you have two garage doors. If you only have one, one of the IDs will be the gateway ID and won't do anything when you use it.) Otherwise leave the login information blank, you'll pass that information in from Zapier, which is triggered by a call from ISY's Network Resources. https://pipes.yahoo.com/pipes/pipe.info?_id=97b233a1afcd20f24e035e2cdca1af01 Zapier2 Webhook -Catch Hook WebHook -PUT You'll need the zapier guid for above https://zapier.com/hooks/catch/zapier2guid/ At this point if you've filled in everything above correctly, you should be able to click test on ISY Network Resource, and SecurityToken, DoorID and Openclose should flow into this zapier. The URL you'll use https://myqexternal.myqdevice.com/Device/setDeviceAttribute Payload Type = json Data AttributeName = desireddoorstate ApplicationId = NWknvuBd7LoFHfXmKNMBcgajXtZEgKUh4V7WNzMidrpUUluDpVYVZx%2BxT4PCM5Kx SecurityToken = Querystring Securitytoken select from Insert fields button DeviceId = Querystring DoorID select from Insert fields button AttributeValue = Querystring Openclose select from Insert fields button Wrap Request in array = no Unflatten = no Test Webhook trigger See trigger sample you should see data following in for the three strings Door ID, Securitytoken, and Openclose Name the Zap and turn zap on. Hopefully it's working now! ISY-NetRules-Backup.v4.2.30__ExampleMyQZapierCall.zip Edited April 26, 2015 by toddhutch Link to comment
MWareman Posted April 26, 2015 Share Posted April 26, 2015 Granted this took over 12 hours to figure out, but EVERYONE here loves a good puzzle right?! Wow - you are a braver man than I! Nice job. I've never really played with Yahoo Pipes - you've given me a whole lot to look into. Truthfully, I've been avoiding Zapier because of the limitations. Looking at the pipes code you've put out there it's no mean feat. I have some learning to do! Link to comment
toddhutch Posted April 26, 2015 Author Share Posted April 26, 2015 If ISY is able to do json posts, or/and store text variables then this would be much easier. The biggest challenge is the security token, and not being able to store that at ISY, if we could this would be very simple. Link to comment
toddhutch Posted May 5, 2015 Author Share Posted May 5, 2015 I decided to pull Yahoo Pipes completely out of this, as the new application ID includes a % which messes up Yahoo Pipes. This doesn't mess up Zapier, or something that I've used that is even simplier. www.hookify.io Link to comment
toddhutch Posted December 23, 2016 Author Share Posted December 23, 2016 Yahoo Pipes is no longer, so this no longer works. Link to comment
Recommended Posts