[asterisk-dev] res_sensors (getting asterisk to control the world ; ) )

David Bowerman david.bowerman at gmail.com
Mon Sep 10 02:34:38 CDT 2007


Tzafir,

you are right.

But. This is not about turning Asterisk into a programmable logic controller.

Its about giving those people who want to be able to have their phone
ring when someone presses the front door bell, or use DISA to call
from their cellphone and check whether or not their ups is running on
mains or bypass the ability to do so cheaply and without having to run
all the bloat involved within PLC systems.

regards

dave

On 9/9/07, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
> On Sun, Sep 09, 2007 at 01:09:07PM +1000, David Bowerman wrote:
> > Hi all,
> >
> > Ive been working on a project to add i/o controller (home automation)
> > support to asterisk so you can do things like switch on and off
> > devices and sense the state of them from within the dialplan.
> >
> > Its mainly based around this
> > http://www.elexol.com/IO_Modules/Ether_IO_24.php i/o controller, but
> > the approach i've taken is a modular one so its easy to add different
> > controllers. X-10, CBUS etc etc.
> >
> > There is a core module (res_sensors) which implements the core
> > functionallity and exposes an api to the hardware drivers.
> >
> > res_sensor_elxeio24 implements the hardware and comms specific
> > functionallity for the elexol module.
> >
> > res_sensor_test implements a controller entirely in software for
> > testing purposes.
> >
> > The elexol module itself looks like a bunch of switches and relays.
> > therefore in the dialplan you can do something like
> > s,1,SensorGet(smoke-alarm, variable). based on variable you can do
> > whatever you like, maybe SensorSet(water, On)... this is silly i know,
> > but you get the idea.
> >
> > The core module also implements the concept of 'watching sensors
> > asynchronously'. This means that you can get asterisk to 'watch the
> > state' of a sensor, and if it changes, enter the dialplan at a context
> > and extension. it may make a call, send a jabber message, or indeed
> > use SensorSet() to do something else.
>
> If I understand that, this requires running a separate thread within
> Asterisk to poll for status and initiate events.
>
> But then again, there's already an external daemon (smartmond?) that can
> initiate events. Why not just use the manager interface (or even call
> files) to respond to sensor events.
>
> What atvantage does a dedicated module have over that approach?
>
> The thing is, that Asterisk is but one interface for those sensors, and
> not their main controller. Hence it would seem strange for me to do all
> of their control from within Asterisk.
>
> --
>                Tzafrir Cohen
> icq#16849755                    jabber:tzafrir at jabber.org
> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
>
> _______________________________________________
>
> Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/
>
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list