|
Here are some app/script notes for using Wish
First off, there appears to be a blocking versus non blocking concept to Wish. Block is standard "cat" and "echo". Non Block is using the nbecho or nbread utilities. Non Blocking works a lot faster, not to mention it returns your prompt right away.
To Turn something on:
/wrrc/bin/nbecho on > /wrrc/x10/m5
To Turn Somthing off:
/wrrc/bin/nbecho off > /wrrc/x10/m5
To Get Status:
/wrrc/bin/nbread /wrrc/x10/m5 - one specific device
/wrrc/bin/nbread /wrrc/x10/m - whole "M" house code
/wrrc/bin/nbread /wrrc/x10/status - all house codes and devices
To Watch a X10 module and trigger an Action:
/wrrc/bin/x10watch /wrrc/x10/m5 -0 "mini_sendmail -fwrrc -smail.mydomain.com me@mydomain.com < somefile.txt" -r
Breakdown of this command.
Watch X10 module M5.
When it goes from an ON? state to OFF? state (-1 is the opposite condition of OFF? to ON?)
Run the "mini_sendmail command"
mini_sendmail -
-f from
-s Mailserver to use
me@mydomain.com is the person to email
somefile.txt is a canned text message you want in the email
-r is run as root, since we only have the root user on the box.
This can be useful for notifing you when something that shouldn't be turned off is turned off.
|