Particle Photon Garage Controller "GarageControl" [DH and INO]

INSTALL GUIDE

Step A: Particle

  1. Set up your Particle Photon. Download the app on your phone (or tablet…I guess), add your new Photon, let it install Tinker. Do the obligatory tap on, tap off, tap on, tap off, tap on, tap off of the D7 led.

  2. Go to my GitHub (links in the OP), copy the Particle .ino file. Paste it to your new Particle sketch. Edit it as you see fit (or don’t…it’s basically perfect). Flash it to your device. Note that the first time you flash, it may take a while. It updates the firmware if it’s out of date. Don’t freak out.

  3. Physically set up your device. You can do 2 & 3 in either order really. The Photon is coded to have a common-cathode RGB LED (or three individual LEDs if you’re basic) plugged into A4, A5, and A7. The negative leg goes into ground. This is a flashing reminder LED. I have mine run up to the bedroom. It tells the wife that I’ve left a garage door open. She likes this feature.

Step B: SmartThings

  1. Copy the SmartThings Device Handler code from GitHub. Go to https://graph.api.smartthings.com/, and create a new DH under “My Device Handlers” from code using my code.

  2. Create a new device under “My Devices”, name it something memorable, and select the custom DH from the list. It’s called “GarageControl”, and it should be near the bottom with the other customs.

  3. Edit the preferences of this new device. Add your Device ID and super secret token here. You get these from the build.particle.io site. Note that if you changed the name of g1Status, g2Status, or g3Status (Why would you? Those are some sweet ass names!), you need to change the names here to match.

Step C: WebCoRE. Ahhhh, WebCoRE. How did I not know about you until now?

  1. Check out this thread for a video instruction on how to install: webCoRE Installation Video It’s way easier than it seems.

  2. Make a piston that calls the refresh() command in the ST device handler whenever a door state pin changes on the Photon. I don’t rightly remember all the steps to do it, but you’ll muddle through somehow.

Step D: IFTTT/Google Home/Alexa integration

  1. Use IFTTT to link GH/Alexa with Particle. Super easy. “This” is Alexa or Google Assistant; have it listen for a specific phrase of your choice. “That” is Particle; have it call the GarageRelay function on your device. A list of all the possible input commands are in the comments of the .ino, but I’m an nice guy, so I’ll put them here as well. Note that they are case and space sensitive. I suggest using the open/close commands because it has some amount of logic, and I worked really hard on them. :blush:

  2. GarageRelay commands are:
    “1” – toggle garage 1
    "2" – toggle garage 2
    "3" – toggle garage 3
    "open1" – open garage 1 only if it’s currently closed
    "close1" – close garage 1 only if it’s currently open
    "open2" – open garage 2 only if it’s currently closed
    "close2" – close garage 2 only if it’s currently open
    "open3" – open garage 3 only if it’s currently closed
    "close3" – close garage 3 only if it’s currently open
    "openAll" – trigger all doors only if they’re closed
    "closeAll" – trigger all doors only if they’re open