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

Matthew Rubenstein email at mattruby.com
Mon Sep 10 02:57:09 CDT 2007


	Isn't this functionality you describe what xPL, the "home automation
hub", is for? Doesn't Trixbox use xPL to interface Asterisk to sensors
and controllers? xPL seems to be popular on Windows, is cross platform.
But I don't see much non-Trixbox Asterisk use of it, if any, and not
much discussion/documentation of its use even in Trixbox. But if it's
got the functionality and momentum, maybe it's a better place to start
than from scratch. Better than forking what looks like an already sparse
"Asterisk (home) automation" developer/user community. Unless this
res_sensors is somehow complementary to xPL, in which case I'd like to
understand how.


On Mon, 2007-09-10 at 02:35 -0500, asterisk-dev-request at lists.digium.com
wrote:
> Date: Mon, 10 Sep 2007 17:34:38 +1000
> From: "David Bowerman" <david.bowerman at gmail.com>
> Subject: Re: [asterisk-dev] res_sensors (getting asterisk to control
>         the     world ; ) )
> To: "Asterisk Developers Mailing List" <asterisk-dev at lists.digium.com>
> Message-ID:
>         <71d479ee0709100034u7cb120fdvf22a8014ce79fd4d at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> 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 
-- 

(C) Matthew Rubenstein




More information about the asterisk-dev mailing list