[asterisk-users] Fwd: Re: Asterisk as a Condo door opener/intercom
Marco Signorini
marcotasto at libero.it
Thu Apr 14 02:56:51 CDT 2011
Hi.
To open the door I'm suggesting you to use Arduino if you can't have a
PC near the door opener contacts.
Arduino is something useful for implementing this type of networked
embedded stuffs.
It's not so expensive and easy to use for people familiar with C, C++
and a little bit of electronics.
You can find it worldwide by e-commerce and is very well supported by a
lot of open sourced libraries.
If you stack an Arduino UNO and an Ethernet Shield SD you'll have a
small embedded solution providing you at maximum of four hw based TCP
sockets that you can use for implementing, for example, a little web
server. The digital input/output pins could be used (if properly
buffered by a transistor) to drive a relay to be placed in parallel with
the door opener pushbutton.
To have the best reliability you can use the tricks suggested on the
pachube website, where someone suggest to drive the Ethernet shield
reset pin at regular intervals.
At the asterisk level I've implemented something similar to what's
explained by David. The only difference is that, in order to open the
door, I've used the CURL application to generate a suitable HTTP get to
the IP address associated to the Ethernet shield on top of Arduino.
Thanks,
Marco Signorini
--
http://www.ethermania.com
http://www.ingegnitech.com
David - asterisk list wrote:
> Asterisk as a phone system makes perfect sense in a condo. You can get
>
> all the DID's you want and eliminate costs for the owners. You can offer
> standard FXO for people who don't care and IP sets for people who want
> to "upgrade" to feature sets.
>
> Your door openner is a piece of cake.
> 1. Create an option in your dialplan only in the "from-access-door"
> context that reads DTMF from the called station only.
> 2. Use this to access an external program to turn on a serial port line
> for 10 seconds.
> 3. This line drives a solid state relay (~$30) so you won't blow the
> sink current on the PC port that drives a standard door lock.
>
> A commercial door strike is about $100. The program to run the port is
> childs play. Here is a test prog I used for turning on a power hungry
> last printer. Change the comments and the sleep time and you're done.
>
> /*
> * lpon Lineprinter ON
> * *** test program only **
> *
> * (c) David Cook, 1994
> *
> * Set signlal lines on serial port to turn on 5vdc
> * signal. Used for solid-state relay (low current
> * draw on RS232C port) to switch high voltage/high
> * current load for printer.
> *
> * Part of an intelligent print spooler to only power
> * on/off high draw printer when required.
> *
> * Usage: lpon<device> <bits to set>
> * For example, lpon /dev/cua4 4 to set bit 3 on
> * port /dev/cua4.
> * "4" = 00000100 or bit 3 which is DTR
> * "2" = 00000010 or bit 2 which is RTS
> * "6" = 00000110 or both DRT& RTS
> */
> #include<sys/types.h>
> #include<sys/ioctl.h>
> #include<termios.h>
> #include<fcntl.h>
> #include<errno.h>
> #include<stdlib.h>
> #include<unistd.h>
> #include<stdio.h>
> #include<signal.h>
>
> #include "lpswitch.h"
>
> /* Main program. */
> int main(int argc, char **argv)
> {
> struct termios port_config;
> int fd;
> int set_bits = 2;
>
> /* Open monitor device. */
> if ((fd = open(SWDEV, O_RDWR | O_NDELAY))< 0) {
> fprintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerror(errno));
> exit(1);}
>
> cfmakeraw(&port_config );
> port_config.c_iflag=port_config.c_iflag|IXON;
> port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
> tcsetattr( fd, TCSANOW,&port_config );
> ioctl(fd, TIOCMSET,&set_bits );
>
> /* wait for printer to warm up */
> sleep(45);
>
> /* not say "ready" and release the printer */
> set_bits = 6;
>
> cfmakeraw(&port_config );
> port_config.c_iflag=port_config.c_iflag|IXON;
> port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
> tcsetattr( fd, TCSANOW,&port_config );
> ioctl(fd, TIOCMSET,&set_bits );
>
> close(fd);
> }
>
>
>
> On 12/04/2011 8:16 AM, asterisk-users-request at lists.digium.com wrote:
>> Message: 3
>> Date: Mon, 11 Apr 2011 18:21:39 -0500
>> From: "Don Kelly"<dk at donkelly.biz>
>> Subject: Re: [asterisk-users] Asterisk as a Condo door opener/intercom
>> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
>> <asterisk-users at lists.digium.com>
>> Message-ID:<8E20A6A94C9548C8A0E27B502B18F200 at DonPC>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Continuing top posting...
>>
>> The same argument could be made for any commercial solution. Why use
>> Asterisk when we could throw $4,000 at our problem for a commercial
>> solution?
>>
>> I'd like to have a solution that would have the features you suggest
>> for
>> $400.
>>
>> --Don
>>
>>
>> On Behalf Of C F
>> Sent: Monday, April 11, 2011 11:43 AM
>>
>> Search the lists. Some hints:
>> Viking electronics makes a door box that connects to any analog line
>> (IIRC e-20).
>> They also make a DTMF keypad that integrates in series with any analog
>> line. They might also make a door box with a DTMF keypad on it.
>> Sandman makes a relay that will get energized when there is a ring on
>> the line which could be used to unlock the door.
>>
>> However, why would you use asterisk? Using asterisk for the sole
>> purpose of MDU entry system is like using windows for asterisk, it
>> works but why?
>> Go for the commercial solutions, it comes with a geziilion options for
>> your setup one of them the ability of chosing an apartment, another
>> add key fobs, another one is the ability of using a code for the
>> residence (not guests) to unlock the door. Also the interface with
>> asterisk you will have to build one from scratch. The commercial
>> solutions have em built in.
>>
>> On 4/10/11, Bruce B<bruceb444 at gmail.com> wrote:
>>> > Hi Everyone,
>>> >
>>> > Looking to replace a condo intercom system. Apparently the
>>> current one
>> taps
>>> > into the lines and dials phone numbers but needs to be changed
>>> as it's
>>> > faulty.
>>> >
>>> > I will probably still use the same analogue dialing and back it
>>> up with a
>>> > VoIP line and use the current cabling that is in place. But as
>>> for as the
>>> > door opening function goes, I am not sure how to interface and
>>> how open
>>> > these modules are usually built.
>>> >
>>> > I would appreciate it if someone with experience can throw in some
>> pointers
>>> > as to what I might be facing and what challenges I have to
>>> solve to
>> replace
>>> > this with a nice Asterisk system.
>>> >
>>> > Thanks,
>>> >
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
> Return-Path: <asterisk-users-bounces at lists.digium.com>
> Received: from mailrelay13.libero.it (192.168.32.133) by
> ims3c10.libero.it (8.6.015.05)
> id 4D74FF3600F1AFFF for marcotasto at libero.it; Wed, 13 Apr 2011
> 14:10:38 +0200
> Received: from mtalibero16.libero.it (EHLO mtalibero16.libero.it)
> ([192.168.36.178])
> by mailrelay13.libero.it
> with ESMTP id BLL37848;
> Wed, 13 Apr 2011 14:10:38 +0200 (CEST)
> Authentication-Results: mtalibero16.libero.it; dkim=neutral (message
> not signed) header.i=none
> Received-SPF: Pass identity=mailfrom; client-ip=216.207.245.17;
> receiver=mtalibero16.libero.it;
> envelope-from="asterisk-users-bounces at lists.digium.com";
> x-sender="asterisk-users-bounces at lists.digium.com";
> x-conformance=spf_only;
> x-record-type="v=spf1"
> X-LREMOTE-IP: 216.207.245.17
> Received: from lists.digium.com ([216.207.245.17])
> by mtalibero16.libero.it with ESMTP; 13 Apr 2011 12:10:37 +0000
> Received: from localhost ([127.0.0.1] helo=inxs.digium.internal)
> by lists.digium.com with esmtp (Exim 4.69)
> (envelope-from <asterisk-users-bounces at lists.digium.com>)
> id 1Q9ys0-0005ZE-MK; Wed, 13 Apr 2011 07:08:28 -0500
> Received: from smarthost2.sentex.ca ([205.211.164.50])
> by lists.digium.com with esmtp (Exim 4.69)
> (envelope-from <dbc_asterisk at advan.ca>) id 1Q9yrx-0005XK-TQ
> for asterisk-users at lists.digium.com; Wed, 13 Apr 2011 07:08:26 -0500
> Received: from mail.advan.ca (64-7-151-162.border7-dynamic.dsl.sentex.ca
> [64.7.151.162])
> by smarthost2.sentex.ca (8.14.4/8.14.4) with ESMTP id p3DC8BDt083660
> for <asterisk-users at lists.digium.com>;
> Wed, 13 Apr 2011 08:08:11 -0400 (EDT)
> (envelope-from dbc_asterisk at advan.ca)
> Received: from [192.168.254.60] (dsl-173-206-230-165.tor.primus.ca
> [173.206.230.165])
> (using TLSv1 with cipher AES256-SHA (256/256 bits))
> (No client certificate requested)
> by mail.advan.ca (Postfix) with ESMTP id 02D4020074
> for <asterisk-users at lists.digium.com>;
> Wed, 13 Apr 2011 08:06:52 -0400 (EDT)
> Message-ID: <4DA5922B.1070206 at advan.ca>
> Date: Wed, 13 Apr 2011 08:08:11 -0400
> From: David - asterisk list <dbc_asterisk at advan.ca>
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB;
> rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9
> MIME-Version: 1.0
> To: asterisk-users at lists.digium.com
> X-Scanned-By: MIMEDefang 2.67 on 205.211.164.50
> Subject: [asterisk-users] Fwd: Re: Asterisk as a Condo door
> opener/intercom
> X-BeenThere: asterisk-users at lists.digium.com
> X-Mailman-Version: 2.1.11
> Precedence: list
> Reply-To: dbc_asterisk at advan.ca,
> Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users at lists.digium.com>
> List-Id: Asterisk Users Mailing List - Non-Commercial Discussion
> <asterisk-users.lists.digium.com>
> List-Unsubscribe:
> <http://lists.digium.com/mailman/options/asterisk-users>,
> <mailto:asterisk-users-request at lists.digium.com?subject=unsubscribe>
> List-Archive: <http://lists.digium.com/pipermail/asterisk-users>
> List-Post: <mailto:asterisk-users at lists.digium.com>
> List-Help: <mailto:asterisk-users-request at lists.digium.com?subject=help>
> List-Subscribe:
> <http://lists.digium.com/mailman/listinfo/asterisk-users>,
> <mailto:asterisk-users-request at lists.digium.com?subject=subscribe>
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset="us-ascii"; Format="flowed"
> Sender: asterisk-users-bounces at lists.digium.com
> Errors-To: asterisk-users-bounces at lists.digium.com
> X-Junkmail-Status: score=10/55, host=mailrelay13.libero.it
> X-Junkmail-Signature-Raw: score=unknown,
> refid=str=0001.0A0B0203.4DA592BE.0062:SCFSTAT1096517,ss=1,re=-4.000,fgs=0,
>
> ip=216.207.245.17,
> so=2010-12-23 16:51:53,
> dmn=2011-03-08 23:48:17,
> mode=multiengine
> X-Junkmail-IWF: false
> X-Mirapoint-Virus-RAPID-Raw: score=unknown(0),
> refid=str=0001.0A0B0203.4DA592BE.0062:SCFSTAT1096517,ss=1,re=-4.000,fgs=0,
>
> ip=216.207.245.17,
> so=2010-12-23 16:51:53,
> dmn=2011-03-08 23:48:17
> X-Mirapoint-Loop-Id: 6da273897f2e173fd6f2e4db7291bb15
> X-libjamoibt: 2587
>
> Asterisk as a phone system makes perfect sense in a condo. You can get
>
> all the DID's you want and eliminate costs for the owners. You can offer
> standard FXO for people who don't care and IP sets for people who want
> to "upgrade" to feature sets.
>
> Your door openner is a piece of cake.
> 1. Create an option in your dialplan only in the "from-access-door"
> context that reads DTMF from the called station only.
> 2. Use this to access an external program to turn on a serial port line
> for 10 seconds.
> 3. This line drives a solid state relay (~$30) so you won't blow the
> sink current on the PC port that drives a standard door lock.
>
> A commercial door strike is about $100. The program to run the port is
> childs play. Here is a test prog I used for turning on a power hungry
> last printer. Change the comments and the sleep time and you're done.
>
> /*
> * lpon Lineprinter ON
> * *** test program only **
> *
> * (c) David Cook, 1994
> *
> * Set signlal lines on serial port to turn on 5vdc
> * signal. Used for solid-state relay (low current
> * draw on RS232C port) to switch high voltage/high
> * current load for printer.
> *
> * Part of an intelligent print spooler to only power
> * on/off high draw printer when required.
> *
> * Usage: lpon<device> <bits to set>
> * For example, lpon /dev/cua4 4 to set bit 3 on
> * port /dev/cua4.
> * "4" = 00000100 or bit 3 which is DTR
> * "2" = 00000010 or bit 2 which is RTS
> * "6" = 00000110 or both DRT& RTS
> */
> #include<sys/types.h>
> #include<sys/ioctl.h>
> #include<termios.h>
> #include<fcntl.h>
> #include<errno.h>
> #include<stdlib.h>
> #include<unistd.h>
> #include<stdio.h>
> #include<signal.h>
>
> #include "lpswitch.h"
>
> /* Main program. */
> int main(int argc, char **argv)
> {
> struct termios port_config;
> int fd;
> int set_bits = 2;
>
> /* Open monitor device. */
> if ((fd = open(SWDEV, O_RDWR | O_NDELAY))< 0) {
> fprintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerror(errno));
> exit(1);}
>
> cfmakeraw(&port_config );
> port_config.c_iflag=port_config.c_iflag|IXON;
> port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
> tcsetattr( fd, TCSANOW,&port_config );
> ioctl(fd, TIOCMSET,&set_bits );
>
> /* wait for printer to warm up */
> sleep(45);
>
> /* not say "ready" and release the printer */
> set_bits = 6;
>
> cfmakeraw(&port_config );
> port_config.c_iflag=port_config.c_iflag|IXON;
> port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS;
> tcsetattr( fd, TCSANOW,&port_config );
> ioctl(fd, TIOCMSET,&set_bits );
>
> close(fd);
> }
>
>
>
> On 12/04/2011 8:16 AM, asterisk-users-request at lists.digium.com wrote:
>> Message: 3
>> Date: Mon, 11 Apr 2011 18:21:39 -0500
>> From: "Don Kelly"<dk at donkelly.biz>
>> Subject: Re: [asterisk-users] Asterisk as a Condo door opener/intercom
>> To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
>> <asterisk-users at lists.digium.com>
>> Message-ID:<8E20A6A94C9548C8A0E27B502B18F200 at DonPC>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Continuing top posting...
>>
>> The same argument could be made for any commercial solution. Why use
>> Asterisk when we could throw $4,000 at our problem for a commercial
>> solution?
>>
>> I'd like to have a solution that would have the features you suggest
>> for
>> $400.
>>
>> --Don
>>
>>
>> On Behalf Of C F
>> Sent: Monday, April 11, 2011 11:43 AM
>>
>> Search the lists. Some hints:
>> Viking electronics makes a door box that connects to any analog line
>> (IIRC e-20).
>> They also make a DTMF keypad that integrates in series with any analog
>> line. They might also make a door box with a DTMF keypad on it.
>> Sandman makes a relay that will get energized when there is a ring on
>> the line which could be used to unlock the door.
>>
>> However, why would you use asterisk? Using asterisk for the sole
>> purpose of MDU entry system is like using windows for asterisk, it
>> works but why?
>> Go for the commercial solutions, it comes with a geziilion options for
>> your setup one of them the ability of chosing an apartment, another
>> add key fobs, another one is the ability of using a code for the
>> residence (not guests) to unlock the door. Also the interface with
>> asterisk you will have to build one from scratch. The commercial
>> solutions have em built in.
>>
>> On 4/10/11, Bruce B<bruceb444 at gmail.com> wrote:
>>> > Hi Everyone,
>>> >
>>> > Looking to replace a condo intercom system. Apparently the
>>> current one
>> taps
>>> > into the lines and dials phone numbers but needs to be changed
>>> as it's
>>> > faulty.
>>> >
>>> > I will probably still use the same analogue dialing and back it
>>> up with a
>>> > VoIP line and use the current cabling that is in place. But as
>>> for as the
>>> > door opening function goes, I am not sure how to interface and
>>> how open
>>> > these modules are usually built.
>>> >
>>> > I would appreciate it if someone with experience can throw in some
>> pointers
>>> > as to what I might be facing and what challenges I have to
>>> solve to
>> replace
>>> > this with a nice Asterisk system.
>>> >
>>> > Thanks,
>>> >
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list