Hardware Reference
In-Depth Information
That's your first step done; once you've understood conduits, you'll see how to add entries into your to-do list
from elsewhere.
Conduits
All communication is two-way, so naturally there are both input and output message conduits. The concept of which
part is input and which is output depends on the direction of communication, so you consider them from the point of
view of the Linux server, meaning an output conduit is the one that sends messages to devices, primarily for reports
and error messages, and an input conduit is one that the server receives from a human to tempt it into action.
The current version supports the following conduits, retrievable from the command msgconduit list :
u echo (output only)
u email (in/out)
u ir (output only)
u log (output only)
u sms (in/out)
u twitter (output only)
u vox (in/out)
u weblog (output only)
u winalert (output only)
Each conduit has a directory hierarchy afforded to it, existing underneath $MINBASE/etc/msg . Each is identical
in structure and may contain none or more of the following directories:
addr : This contains two flat files formatted in the same way. The first is alias , which is a
list of Minerva-oriented usernames and a conduit-specific address. This would be a mobile
phone number in the case of the SMS conduit, for example. The second is contacts , which
is a list of address for people you might want to contact but who are not Minerva users. This
latter file is available only when sending messages to the output, thereby allowing you to
send text messages to your friends but not permit them to query or change the state of your
home appliances in any way.
auth : This is reserved for future expansion, although it's rarely used as most authentication
is currently done through the $MINBASE/etc/user/[username] hierarchy.
cmd : This directory contains a list of command aliases used with input conduits. In this
way you can send short messages to the conduit, such as “wakeup,” which in turn runs a
cmd/wakeup script, allowing it to perform several commands at once, without you having
to explicitly specify them all. Additionally, the script could perform smart contextual
operations, so commands such as lightson would determine your location and control the
most applicable light. I'll cover location deduction later in this chapter.
xmit : This contains a file called cmd that is usually a symlink to an abstracted Bearksin
command that processes the argument list whenever this conduit is used as an output.
I'll now cover the method by which each of these functions so you know how to add new ones in the future and
utilize them to best effect.
Search WWH ::




Custom Search