Buttons?

Plugin for the HAI family of security panels
TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Buttons?

Postby TheCodeMan » Sun Sep 06, 2009 10:44 am

I'm trying to initiate buttons using keypresses but I am not having any luck. I have a button that requires two keypresses to start, 3 and #. How do I translate this into a command so the HAI Agent will pass it to the panel?

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: Buttons?

Postby mcascio » Sun Sep 06, 2009 10:51 am

How about using mlcyclestates?
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Re: Buttons?

Postby TheCodeMan » Sun Sep 06, 2009 10:58 am

Are there any examples of how to do this?

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Re: Buttons?

Postby TheCodeMan » Tue Sep 08, 2009 12:21 pm

Anyone?

This should be simple enough to do. I know there are quite a few HAI Mainlobby users out there...

:D :D :D

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: Buttons?

Postby mcascio » Tue Sep 08, 2009 12:27 pm

You'll have to elaborate on what you are trying to accomplish.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

User avatar
DavidL
Simply Incredible
Simply Incredible
Posts: 11071
Joined: Sat Feb 08, 2003 9:39 am
Location: Metamora, Michigan
Contact:

Re: Buttons?

Postby DavidL » Tue Sep 08, 2009 1:42 pm

Are you trying to send two consecutive commands to HAI?

You could use a Macro with each command seperated with a little time (via MLPause)

Macro|MLHAI|<<alias>>~<<command1>> or Security.<<alias>>|<<command2>> !MLPause|.5!MLHAI|<<alias>>~<<command>> or Security.<<alias>>|<<command>>



Syntax:
MLServeCmd.MLPause|seconds

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Re: Buttons?

Postby DaveB » Tue Sep 08, 2009 6:43 pm

TheCodeMan wrote:I'm trying to initiate buttons using keypresses but I am not having any luck. I have a button that requires two keypresses to start, 3 and #. How do I translate this into a command so the HAI Agent will pass it to the panel?


Currently, if you are running the beta version of the driver, you send a pre-defined button using the MLHAI|001~Macro~1 command. Substitute the button number

If you are attempting to send a 3 followed by a #, just as if you walked up to the HAI keypad and did this combination, then you would do it with a buffer of sorts.

Each key loads the buffer at the panel like this; (3 key) MLHAI|001~Keypress~3 ; (# key) MLHAI|001~Keypress~#

Then you will create a "Submit" button and have the following command attached to the button;

Macro|MLHAI|{{hai_keyboardbuffer}}!MLHAI|001~Keypress~Clear
Thanks!

Dave Bruner
:shock:

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Re: Buttons?

Postby TheCodeMan » Thu Sep 10, 2009 6:09 pm

Thanks for the info. I must be running the beta as the Macro command appears to work just fine. Thanks all.

Now to take this one step further, I want to set up buttons for the following:

one button to cycle between cool, heat, auto, and off (the button contains the text for each state, as it is pushed, the text changes for the state, once the desired state is set, the command fires off to the HAI panel and triggers the appropriate command)

one button to cycle between fan on, fan off, and fan auto (same as above)

A temp button with the desired temp in the middle and two arrows, one to the top and one to the bottom. A click on the top arrow raises the desired temp and a click on the bottom arrow lowers the desired temp. Once the temp is set as desired the command fires off to trigger the HAI panel to set the desired temp.

I have no idea where to start on any of these although I suspect MLCycleStates might be a good place. Unfortunately, I have never used MLCycleStates. Does anyone have a similar setup where they could forward me the commands they are using?

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Re: Buttons?

Postby DaveB » Fri Sep 11, 2009 8:45 pm

I will post the screen shots and the code for all that a bit later. That is almost exactly whay I have working with my system. I use cycle states and a few variables to pull it off. I not only change the button text, but color up the button depending on mode. I use the 0026 interface, but you can port the same idea over to any interface package, even 0019. Works well.
Thanks!

Dave Bruner
:shock:

TheCodeMan
Senior Member
Senior Member
Posts: 204
Joined: Fri Sep 22, 2006 12:16 pm
Contact:

Re: Buttons?

Postby TheCodeMan » Sat Sep 12, 2009 9:25 am

Thanks DaveB, I really appreciate all your help.

:D :D :D

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Re: Buttons?

Postby DaveB » Wed Sep 16, 2009 9:31 pm

Sorry - Got tied up with a bad week at work. I will get something to you in a day or two.
Thanks!

Dave Bruner
:shock:


Return to “MLHAI”

Who is online

Users browsing this forum: No registered users and 1 guest