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

http://hit-mob.com/forums/viewtopic.php?f=8&t=674&p=2088&hilit=liftmaster#p2088

This is how I use the “relay” function to open/close my chamberlain liftmaster garage door (through a foscam FI8908W camera) using my IP Cam Viewer app.

The garage door switch just shorts 2 wires when pressed (this causes the garage door to take action).

The foscam has a relay that shorts 2 wires (pins 1 and 2) when turned on.

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

Finally, don’t forget to enable the “Pulse relay ON signal” option in my app, found under Edit Camera -> More Options.

Here’s my arduino code:


// 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 );
}

Ports to iPhone, Blackberry, Phone 7, Desktop

http://hit-mob.com/forums/viewtopic.php?f=7&t=527

I have ports of IP Cam Viewer for Android to other platforms. More features will be added over time.

iOS:
The name of the app is “IP Camera Viewer” (name is different because someone already took the name IP Cam Viewer).

Blackberry OS 6:
The name of the app is “Live Cams IP Camera” (name is different because someone already took the name IP Cam Viewer).

Windows Phone 7:
Under development. Target end of the year completion.

Table/Desktop ports:
Planning stage…

Thanks,
Rob

Setting up your USB camera

http://hit-mob.com/forums/viewtopic.php?f=8&t=47#p128

If you have an USB camera, then you need install a program on your computer to stream the USB webcam.
You can try http://www.webcamxp.com or http://www.yawcam.com for Windows.  For Apple Mac, try http://www.evological.com/evocam.html or SecuritySpy (audio supported).

If you want to turn your android device into a webcam, then download the “IP Webcam” app by Pas in the Android Market.

In the IP Cam Viewer app for Android, select the “WebcamXP” or “Yawcam”, “EvoCam”, or “Pas IP Webcam” type.

Once the USB webcam is available using a browser, then following the same steps as an IP camera to get that camera available from the internet.

Setting up your IP Camera/

Setting up your IP camera

http://hit-mob.com/forums/viewtopic.php?f=8&t=47#p126

Many people have asked how they can view their IP Camera(s), away from home, using IP Cam Viewer.
The simple answer is to setup with a free dynamic dns service like afraid.org (see steps below).

Another common question is why they can view from wifi but not on 3g. Most like the question above, the user is probably using an internal IP address like 192.x.x.x. Addresses starting with 192 and 10 are not route-able over the internet (just about every house/business uses those addresses). See steps below to setup with a free dynamic dns service.

1. Make sure you can view your IP Camera from inside your house using a web browser. For example, “http://192.168.1.23″. If your camera is using DHCP then you’ll have to check your router for which IP address it is using (or use the manufacturer’s tool to find the camera).

2. If your camera is using DHCP, then setup your router so that it always gives the same static IP address for the camera based on it’s MAC address (will be visible from the router). Alternatively, you can just set the camera to a 192.x.x.x IP that is outside the range of the DHCP range.

3. Now that your camera has a static IP address visible from inside your house, you need to make it visible from outside the house. Setup your router to allow port forwarding from a high port like 10123 on it’s external interface to the camera’s IP address and port 80. See http://portforward.com for more details. Once this step is done, you can now access your camera from outside using the external ip and port 10123. Use this tool to verify: http://canyouseeme.org

4. Most internet service providers now give out dynamic IP addresses to your router so next, you need to use a dynamic dns service so people outside can locate your router (and camera). I use http://www.afraid.org but there are many others that are free also. Basically, I configure the router to report it’s external IP address to the afraid.org any time it’s IP address changes. Afraid.org associates an address like “mycam.dyndns.org” to my router’s IP address.

5. Finally, make sure you can now view the camera using a browser from the outside (try a friend’s house). For example, “http://mycam.dyndns.org:10123″

6. Great, now configure IP Cam Viewer to see your camera(s) once and your cameras will come up when the app is launched.

hope that helps…

More detailed instructions are available at: http://portforward.com/

Note: some ddns services are just simple http redirects which do not work.  To test, type the url into a browser and if it changes to a numeric IP address then it’s a cheap http redirect (and NOT a true dynamic dns hostname).

 

Predefined Traffic Cameras Support List

Traffic Cams:

 Argentina
 Australia
 Canada
 Denmark
 Finland
 France
 Germany
 Hong Kong
 Italy
 Malaysia
 Netherlands
 New Zealand
 Norway
 Scotland
 Singapore
 Slovenia
 Spain
 Sweden
 Taiwan
 Thailand
 UK
 US,AL
 US,AZ
 US,CA
 US,CO
 US,CT
 US,DE
 US,FL
 US,GA
 US,HI
 US,IA
 US,IL
 US,IN
 US,KS/MO
 US,KY
 US,LA
 US,MA
 US,MD/Wash.DC
 US,MI
 US,MN
 US,MO
 US,MS
 US,NC
 US,NE
 US,NH
 US,NJ
 US,NM
 US,NV
 US,NY
 US,OH
 US,OK
 US,OR
 US,PA
 US,RI
 US,SC
 US,SD
 US,TN
 US,TX
 US,UT
 US,VA
 US,WA
 US,WI