Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

2 door setup #15

Open
kfakhri1 opened this issue Nov 23, 2015 · 5 comments
Open

2 door setup #15

kfakhri1 opened this issue Nov 23, 2015 · 5 comments

Comments

@kfakhri1
Copy link

Hi, thanks for posting this, any way this could be configured for two door garages? As in left door and right door? Thank you.

@deckerego
Copy link
Owner

Yup, that's a doable thing - will look into that.

@DervMan
Copy link

DervMan commented Apr 21, 2016

As a variation to that, my door uses a separate button for open and close so I also need two buttons but for a slightly different reason!

@DervMan
Copy link

DervMan commented Jan 18, 2017

I've treid to add a second button, in my case I'm after an 'Open' and 'Close'. Although the code below adds the button clicking the new button results in the 'Open button' relay being operated. Assuming I need to update some more code by struggling to see where.

<li><button type="button" id="openDoor" class="btn btn-default navbar-btn" onClick="executeCommand();">Open</button></li> <li><button type="button" id="closeDoor" class="btn btn-default navbar-btn" onClick="executeCommand();">Close</button></li>

@deckerego
Copy link
Owner

You would need two different JavaScript functions to call - one to open, another to close. Take a look at events.js - it has a function called executeCommand() that calls remote/0. To add a second button, you would need:

  1. A new REST endpoint like remote/ that would trigger a new GPIO pin
  2. A new JavaScript function that called this REST endpoint
  3. The new button on the UI

@deckerego
Copy link
Owner

@DervMan and @kfakhri1 - long at last I have a test out that you guys might try. I've labelled two buttons "Open/Close Door #1" and "Open/Close Door #2," but those are temporary labels for now. This should allow you to fire two different buttons: one on GPIO #17, the other on GPIO #27.

You may even want to just fork the branch double_button - if it doesn't work, it should be pretty dang close. Let me know if either of you have success!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants