[hai-dev] How much can you do via the protocol?

36 views
Skip to first unread message

Philip A. Prindeville

unread,
May 15, 2010, 8:45:21 PM5/15/10
to hai...@googlegroups.com
So, does the protocol as we've implemented it allow for adding
programming lines?

And can a programming line involving doing an HTTP GET or POST? That
would be really handy to have those happen on triggers...

Oh, and this is semi-off topic... anyone have good programming lines for
sprinklers on relays?

Thanks,

-Philip

Rick Macdonald

unread,
May 15, 2010, 9:35:33 PM5/15/10
to hai...@googlegroups.com
No to the first two questions. The hai command-line program has
getprogram and putprogram commands but they just move a data block back
and forth:

hai> help getprogram

Format: getprogram [<filename>]

Displays all programs. Optionally download programs to
file <filename>.

hai> getprogram
0x0001 - 04 00 00 00 0a 00 00 00 00 00 00 00 00 00
0x0002 - 01 00 00 00 00 01 cf 00 13 0c 11 fe 11 01
0x0003 - 06 00 00 00 00 00 00 00 00 01 01 00 00 01

The help list gives an idea of what you can do via the protocol:

hai> h

help display help info
h display help info
? display help info
exit quit program
x quit program
quit quit program
q quit program
encrypt display encrypted configuration
csv change display mode
info display system information
stat display system status
sum display status summary
zones display zone status
ready display zone ready status
units display unit status
sensors display temp sensor status
thermos display thermostat status
temps display temps from thermos & sensors
mesgs display message status
users display user setting status
events display system events
unit send unit command
all send all command
counter send counter command
alc send alc command
compose send compose command
upb send upb command
radiora send RadioRA command
scene send scene command
arm send arm command
button execute macro button
cost set energy cost
saver send saver command
sensor set temp sensor setpoint
thermo send thermostat commands
mesg send message commands
audio send audio commands
user send user commands
getnames display/download names
putnames upload names
names display names
buttons display button names
log display event log
valid validate security code
emergency activate keypad emergency
memo play/record voice memo
settime set time
getsetup display/download setup
putsetup upload setup
getprogram display/download program
putprogram upload program
getvoices display/download voices
putvoices upload voices

For the trigger question, I'd say you have to write a program or script
that polls the panel now and then looking for an event (or program your
own time triggers, or whatever) and run HTTP commands from your program.

You could probably find talk of sprinkler handling at Worthington:

http://www.worthingtondistribution.com/cgi-bin/solutions/yabb2/YaBB.pl?board=HAI_Prog

Rick

Philip A. Prindeville

unread,
May 17, 2010, 8:58:10 PM5/17/10
to hai...@googlegroups.com
So we lack the ability to "compile" the program down into the "object"
format necessary to use with "putprogram" then...

Chuck & Nicole Cannon

unread,
May 18, 2010, 7:31:57 PM5/18/10
to hai...@googlegroups.com
Yep. The binary format of the program data isn't documented at all by HAI.

Chuck
Reply all
Reply to author
Forward
0 new messages