HAI "Audit Trail" Command Line Interface for Unix.

agbush

New Member
Hello, New user to HAI and to this forum.  Thank you in advance.
 
I have started to look at the testdriver and console sample as part of the java SDK/API. Unfortunately I'm more of a unix hack then a Java programmer so am interested if anyone has developed (or likes a project) a simple command line tool that converts the current status of zones, temperatures monitors into a audit trail output.  
 
Having stumbled through the testdriver code it contains most of the information ideally it would be great of the output was formatted slightly more friendly.  I can then run this command line tool every 5 minutes vis a unix script and capture the results etc.
 
Im hoping that this would be useful to other unix hacks out there as well as system integrators who want to use a simple CLI.
 
For example something like the below
> ./omnstatus -f configfile -t zones,temperatures
20150408:12:05:00|101.168.1.10|Hallway|Zone|NorthWindow|Open
20150408:15:05:00|101.168.1.10|Hallway|Zone|SouthWindow|Closed
20150408:15:00:00|101.168.1.10|Hallway|Temp|Downstairs|23
...
 
> ./omnistatis -f configfile -f log
20150408:11:00:15|101.168.1.10|log| Message ABCD Received
20150508:11:00:16|101.169.1.10|log| Security Disabled by ABCD
...
 
ie possible command line options could include
-f is a config file with connection information such as IP address, username, passcode etc
-t is the type of items to report i.e. zones, temperatures, log file.
...
 
ie possible output structure could be something like
timestamp
ip address of the controller
type of event
name of zone, temperature etc
current status of the zone etc
 
Im an optimist so I'm hoping that there is someone out there much cleverer then i that can help.
 
Thank you in advance.
 
A
 
 
 
 
 
I've been using Chuck Cannon's library on my FreeBSD box for a few years now. Although the code is pretty old, it works for what I use it for. Here's an example of what the output might look like:
 

% sudo /usr/local/bin/hai zones
50 : BreezewayDoor : 030, Secure, Latch Secure, Disarmed
51 : FrenchDoors : 030, Secure, Latch Secure, Disarmed
52 : FrontDoor : 030, Secure, Latch Secure, Disarmed
53 : BsmtHatchDoor : 032, Secure, Latch Secure, Disarmed
54 : StairMotionSens : 030, Secure, Latch Secure, Disarmed
59 : GarageMotion : 030, Secure, Latch Secure, Disarmed
60 : 1stFloorMotion : 030, Secure, Latch Secure, Disarmed
61 : BzwyGarageDoor : 030, Secure, Latch Secure, Disarmed
65 : BkfastWinRightB : 030, Secure, Latch Secure, Disarmed
66 : BkfastWinCenB : 030, Secure, Latch Secure, Disarmed
67 : BkfastWinLeftB : 030, Secure, Latch Secure, Disarmed
68 : FamWinRightB : 030, Secure, Latch Secure, Disarmed
69 : FamWinLeftB : 030, Secure, Latch Secure, Disarmed
70 : DiningWinLeftB : 030, Secure, Latch Secure, Disarmed
71 : DiningWinRightB : 030, Secure, Latch Secure, Disarmed
72 : LivWinLeftB : 030, Secure, Latch Secure, Disarmed
73 : LivWinRightB : 030, Secure, Latch Secure, Disarmed
74 : 1stFlrBathWinB : 030, Secure, Latch Secure, Disarmed
75 : LaundryWinB : 030, Secure, Latch Secure, Disarmed

There are other members on this forum that have worked on updating the code, you may want to contact them directly:
http://cocoontech.com/forums/topic/27182-hai-omni-communications-starter-code/
 
Cheers.
 
 
Back
Top