Web based gate opener

willemdev

Well-Known Member
Joined
Apr 17, 2011
Messages
134
Reaction score
0
Location
Pretoria
View attachment 52326

Ive got this idea:

1. open webpage (from mobile)
2. click "open / close" button
3. signal gets sent to parallel port of host pc and relay closes for a second.

POSSIBLE??

ANY IDEAS?
 
All things are possible to him who believes. (even without a pretty pic).
 
Sure, it's possible.

Basic idea: You click open/closed, which in turn gets written to a file on the web server (hosted at home).
You have a program that's monitoring that file, and sees it was changed, thus sending a signal to the parallel port via some script/program that you've written, which is sent to the relay.
 
Sure, it's possible.

Basic idea: You click open/closed, which in turn gets written to a file on the web server (hosted at home).
You have a program that's monitoring that file, and sees it was changed, thus sending a signal to the parallel port via some script/program that you've written, which is sent to the relay.

Yes, i like your thinking..
 
An arduino with a relay should do.
You could go serial, or get one with ethernet. Launch mini webserver on the device, and port-forward it on hte router.

This will work.
 
In my last house I had a Paradox alarm system.

I had a wireless pgm connected to the gate and I used the paradox iPhone app to connect to the alarm via the internet. That allowed me to control anything on a pgm.
Technically you can put the pgm on anything with a relay and control that via your iphone (or droid I think) via the internet. The gate worked great tho, tho the main reason I connected it to the alarm was so that I would only have to carry one remote with me instead of two.
At one stage I had the idea to put a pgm on an electronic lock on the door too so technically all I would have to carry is my phone.

I was also going to mount a small safe with a pin code outside my house so that I didn't have to carry a bunch of keys with me all the time.

Sold the house before I got to do most of the stuff.
 
Last edited:
3. signal gets sent to parallel port of host pc and relay closes for a second.

Dude this is 2013, who uses a parallel port? Internet of Things, you need to network enable your gate motor.:)

Raspberry pi?

This would be a good choice if you were building a standalaone intelligent gate motor (ie the gate motor has it's own web interface.)
If the website is hosted on a controlling pc (as suggested in the OP,) an Arduino might be more appropriate at the gate motor.

Nice idea and totally doable. Not sure it's more useful than pressing the button on your remote though. One situation where it might be an advantage is if you wanted to be able to be at work and open the remotely gate for your garden services or something like that. Or as part of a larger home automation system
 
View attachment 52326

Ive got this idea:

1. open webpage (from mobile)
2. click "open / close" button
3. signal gets sent to parallel port of host pc and relay closes for a second.

POSSIBLE??

ANY IDEAS?

This is quite very, very possible. In fact, this is what Web 3.0 is all about and what is believed to be the next big thing(s) on the Internet. It is all about the automation of a number of things while away from home, such as locking and unlocking doors (which has already been done and is available on the market), switching on / off lights, kettles, radios, TV's and even locking or unlocking car doors (which all have already been developed and is available on the market).

Of course, you will need to setup a PC with full-time access to the Internet. Linking the gates to a PC should not be difficult. Developing a script to perform the actions remotely is also quite easy via PHP. You will not work with a remote though, but rather through a web page or even a mobile phone app.

Security will play a big role in your application, but that is something else.
 
Okay so I just did this as a POC before I reply to this thread ;)

no circuitry required!

I already have normal push button inside the house to open and close the garage door (without the remote).

I opened the switch and connected the wires to "Request to Send (RTS)" and ground on my laptops serial port.

and then ran this little perl script (which can easily be converted to a CGI script) ...

Code:
#!/usr/bin/perl -w
use Device::SerialPort qw( :PARAM :STAT 0.07 );
use strict;

my $PortObj = new Device::SerialPort ("/dev/ttyS0");

$PortObj->pulse_rts_on();
sleep 5;
$PortObj->pulse_rts_off();

Run the scripts once to open the door and then again to close it.


So ja it is possible ;)
 
Okay so I just did this as a POC before I reply to this thread ;)

no circuitry required!

I already have normal push button inside the house to open and close the garage door (without the remote).

I opened the switch and connected the wires to "Request to Send (RTS)" and ground on my laptops serial port.

and then ran this little perl script (which can easily be converted to a CGI script) ...

Code:
#!/usr/bin/perl -w
use Device::SerialPort qw( :PARAM :STAT 0.07 );
use strict;

my $PortObj = new Device::SerialPort ("/dev/ttyS0");

$PortObj->pulse_rts_on();
sleep 5;
$PortObj->pulse_rts_off();

Run the scripts once to open the door and then again to close it.


So ja it is possible ;)

Nice! Someone who has actually done it responds!

I was thinking the same thing as you, with respect to the switch in the house to open the gate. I would probably use an arduino or Launchpad to interface with the switch, since I don't have any serial ports on my hardware. A simple transistor would suffice to switch a load potentially higher than the micro can withstand (and I'd hate to fry a serial port on a motherboard). Of course, this is simply a momentary switch that we are replacing, and probably has minimal current passing through it anyway, but I'm careful that way :-)

One thing I'd like to add, however, is monitoring of the gate status:

Code:
The different signals of the LED are described below.
- LED flashes slowly when gate is opening.
- LED flashes quickly when gate is closing.
- LED on if gate is open.
- LED off if gate is closed.
- LED flashes once every 2 seconds to indicate that courtesy light is switched on permanently.
- LED flashes twice every 2 seconds when mains supply to gate system has failed 
- LED flashes three times every 2 seconds to indicate a battery low condition
- LED flashes four times every 4 seconds to indicate repeated obstructions of the gate.

While I do have a camera pointed at the gate, and could watch it opening and closing, I'd obviously like to get a simpler signal that just indicates success or failure. Plus, being able to alert on power failure would be useful too, since there is a breaker near the gate which trips periodically.

Any ideas how to discriminate between the various flashes using a microcontroller? Also, any thoughts on connecting the intercom to a sound card, and letting it call you via VOIP/IM when someone rings?
 
Nice! Someone who has actually done it responds!

I was thinking the same thing as you, with respect to the switch in the house to open the gate. I would probably use an arduino or Launchpad to interface with the switch, since I don't have any serial ports on my hardware. A simple transistor would suffice to switch a load potentially higher than the micro can withstand (and I'd hate to fry a serial port on a motherboard). Of course, this is simply a momentary switch that we are replacing, and probably has minimal current passing through it anyway, but I'm careful that way :-)

One thing I'd like to add, however, is monitoring of the gate status:

Code:
The different signals of the LED are described below.
- LED flashes slowly when gate is opening.
- LED flashes quickly when gate is closing.
- LED on if gate is open.
- LED off if gate is closed.
- LED flashes once every 2 seconds to indicate that courtesy light is switched on permanently.
- LED flashes twice every 2 seconds when mains supply to gate system has failed 
- LED flashes three times every 2 seconds to indicate a battery low condition
- LED flashes four times every 4 seconds to indicate repeated obstructions of the gate.

While I do have a camera pointed at the gate, and could watch it opening and closing, I'd obviously like to get a simpler signal that just indicates success or failure. Plus, being able to alert on power failure would be useful too, since there is a breaker near the gate which trips periodically.

Any ideas how to discriminate between the various flashes using a microcontroller? Also, any thoughts on connecting the intercom to a sound card, and letting it call you via VOIP/IM when someone rings?

Sounds like you are planning to do some cool stuff. I would like to follow your progress. :)

The arduino stuff is a bit over my head. :o

But what I can comment on is that I have used a LDR also connected to the serial port to monitor the little light flashing on my prepaid electricity box to monitor my electricity usage. When the led flashed it toggled the "carrier detect" and then I counted the amount of flashes within a certain amount of time and plotted it on a graph. So that bit is also possible.


Keep us updated!

EDIT: I confused you with the OP. Still interresting ....
 
Thanks for all the responses! These helped me to make a vb script file that turns on a relay from the com port for a second.

-------------------------------------------------------------------------------------------
set Comm = createobject("MSCOMMLib.MsComm")

Main
Sub Main()
OpenPort
End Sub


Function OpenPort()
Comm.CommPort = 1
Comm.Settings = "19200,N,8,1"
Comm.InputLen = 0
Comm.RTSEnable = True
Comm.PortOpen = True
WScript.sleep 1500

End Function

--------------------------------------------------------------------------------------------

NOW.. the problem is how to run/activate that script from a webpage hosted on the pc with the com port..?
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X