IP Cam Viewer     My Amazon IP Cameras    

Use a foscam (or clone) to control liftmaster garage door

Support for my free Android Applications.

Use a foscam (or clone) to control liftmaster garage door

Postby N4Spd » Sat Mar 19, 2011 1:43 pm

This is how I use the "relay" function to open/close my chamberlain liftmaster garage door (through a foscam FI8908W camera).

The garage door switch just shorts 2 wires when pressed (this causes the garage door to take action).
liftmaster.jpg
liftmaster.jpg (51.09 KiB) Viewed 32628 times


The foscam has a relay that shorts 2 wires (pins 1 and 2) when turned on.
foscam_rear.jpg
foscam_rear.jpg (68.33 KiB) Viewed 32560 times


Based on this, a simple solution is to:
1. connect pin 1 of foscam to left most pin on liftmaster.
2. connect pin 2 of foscam to 2nd left most pin on listmaster.

Now, when foscam relay is turned on, the garage will go into action. however, you'll have to remember to turn the relay OFF to allow your garage door switch to work again.
A solution for this problem is to upgrade to the next release of IP Cam Viewer (3.7.9) and enable the "Pulse Relay On" option. With this option on, click on the relay ON button in my app will actually toggle on/off the camera's relay so you don't have to remember to turn relay off.

So far so good, everything works, but there is one more problem. The foscam, by default, does something unexpected. When the foscam first gains power, the relay is off (normally open). Within a few seconds (~10s), the camera always turns on the relay, by default!!! This means that when you lose power to the house and then get power back, the garage door will open because of the foscam relay turning on.

It think the reason the foscam does this is because the relay was designed for use with an alarm system. By default (after 10 seconds), the relay is ON to signal all ok to the alarm system. It turns the relay OFF to trigger an alarm to the alarm system. In this case, I'm not using it with an alarm system.

The work around for this solution was a little more work. Just a get a 8 pin microcontroller and program it to delay 30 seconds before copying the camera's relay to another relay for the garage door. A little more money is to use an Arduino (very easy to program, code given below).

Basicallly, use digital io 2 to read camera relay and use digital io pin 3 to control a separate relay to trigger garage door. Here's an example circuit for Arduino to control a relay:
http://www.ecs.umass.edu/ece/m5/tutoria ... orial.html

here's a cheap relay module on ebay (if you don't want to wire one up):
http://shop.ebay.com/i.html?_nkw=lm2596+module
lm2596_relay_module.JPG
lm2596_relay_module.JPG (50.38 KiB) Viewed 32894 times


Here's my code:

Code: Select all
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2;     // ping which is HIGH when camera relay is shorted/closed, LOW when camera relay is open
const int relayPin =  3;     // the number of the garage relay pin

// variables will change:
int bInitialized = false;
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);   
 
  // initialize the relay pin as an output:
  pinMode(relayPin, OUTPUT);     
    digitalWrite(relayPin, LOW);

}

void loop(){
 
  if( bInitialized == false )
  {
    // it seems the camera bounces relay during startup so just delay 30 seconds on power up
    delay( 30 * 1000 );   

    bInitialized = true;
  }
   
  // wait until camera relay goes low
  while( true )
  {
    buttonState = digitalRead(buttonPin);
    if( buttonState == LOW )
    {
      break;
    }
  }
   
  // wait until user clicks camera relay on
  while( true )
  {
    buttonState = digitalRead(buttonPin);
    if( buttonState == HIGH )
    {
      break;
    }
  }
 
  // pulse garage door
  digitalWrite(relayPin, HIGH); 
  delay( 200 );
  digitalWrite(relayPin, LOW); 
 
  // delay a bit before next action to let things settle down
  delay( 250 );
}
N4Spd
 
Posts: 1318
Joined: Sun Feb 08, 2009 3:25 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby rcombe » Tue Jul 05, 2011 6:34 am

Hey Guys

Could I use horn relay to control a siren, connected to the camera?

Thanks
rcombe
 
Posts: 1
Joined: Tue Jul 05, 2011 6:33 am

Re: Use a foscam (or clone) to control liftmaster garage door

Postby N4Spd » Wed Jul 20, 2011 12:13 pm

yes, you can control just about anything as long as your relay is beefy enough

rcombe wrote:Hey Guys

Could I use horn relay to control a siren, connected to the camera?

Thanks
N4Spd
 
Posts: 1318
Joined: Sun Feb 08, 2009 3:25 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby xk007 » Thu Oct 13, 2011 9:13 pm

Appologies for my ignorance. I would really like to add this module to avoid opening the garage door during power outage. I am not electornically knowlegdable. I tries to figure out what I need but I am stuck. I have not idea where to start to program a microcontroller so I hoped that the LM2569 module you pointed to in ebay will be as simple as plug and play. Looking into that option, the main purpose of LM2569 seems to be a step down adjustable voltage converter.I have no idea how to use it to introduce the delay you are refering to. Can I impose and as for more specific details on how to get this working?

Thanks in advance.

Andre
xk007
 
Posts: 1
Joined: Thu Oct 13, 2011 9:03 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby Noears » Fri Jan 13, 2012 7:04 pm

Can I use a Dlink DSC2100+ camera instead of the Foscam?
Noears
 
Posts: 3
Joined: Fri Jan 13, 2012 6:59 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby Noears » Fri Jan 13, 2012 8:28 pm

Can I use a Dlink DCS 2100 camera instead of th Foscam
Noears
 
Posts: 3
Joined: Fri Jan 13, 2012 6:59 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby Noears » Sat Jan 14, 2012 4:41 pm

Can I use a Dlink Dsc2100 camera instead of a foscam
Noears
 
Posts: 3
Joined: Fri Jan 13, 2012 6:59 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby N4Spd » Wed Mar 07, 2012 7:44 pm

yes, any camera with relay control, and it may not need the reboot hack that the foscam needed.

Noears wrote:Can I use a Dlink Dsc2100 camera instead of a foscam
N4Spd
 
Posts: 1318
Joined: Sun Feb 08, 2009 3:25 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby timguo » Wed Jun 05, 2013 7:00 am

There is a very simple solution to solve the re-start problem after an electricity outage. I found that a portable GFCI socket will pop up (disconnect) after electricity is cut off. This is a device that you plug into a regular wall socket. It comes with its own GFCI protect socket with a reset button and a test button. You can buy it online. $10 to 20.

You can plug your camera into the device so it won't restart after an outage. You can also plug your garage door opener into it instead so the door won't open, but the camera will restart after the electricity returns.

Not a perfect solution, but it is simple. No good if you have refrequent outages. You will have to manually reset too often.

By the way, I bought an EasyN FS-613A-M136 Wireless IP camera. It has 4 I/O connectors. The first 2 connectors will output +14V constantly by default upon booting up. Software can remotely turn it off on Android phone. The second 2 connectors will output +5V constantly (no software control). If the +14 V is off by default, I can easily use a relay to control my garage door. Now I am out of a simple solution to make it work (without a hiccup when there is power outage). Any suggestions that require no microprocessor programming?
timguo
 
Posts: 1
Joined: Tue Jun 04, 2013 4:47 pm

Re: Use a foscam (or clone) to control liftmaster garage door

Postby Zappermaster » Sun Jun 21, 2015 11:35 pm

I will try to set this up myself with an Arduino Uno and a simple 2 channel relay board.
Assuming I get 5V+ from the IP camera Pin #3 when activated via APP/WebUI and #4 is GND.
Is this how the correct wiring should look like?

Arduino digital I/O #2 --> Camera #3 +5V
Arduino digital I/O #3 --> Relay IN (Input) 1
Arduino digital I/O GND --> Camera #4 GND

Arduino 5V+ --> Relay VCC
Arduiono GND --> Relay GND

Please take a look at my wiring picture for more clarity...
ipcam-garage-arduino.jpg
ipcam-garage-arduino.jpg (116.16 KiB) Viewed 22053 times
Zappermaster
 
Posts: 2
Joined: Thu Jun 18, 2015 12:36 am


Return to Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 7 guests