MLHAI TCP/IP Agent - Issues and Fixes

Plugin for the HAI family of security panels
User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

MLHAI TCP/IP Agent - Issues and Fixes

Postby CinemarDave » Sun Jan 24, 2010 3:28 pm

The MLHAI Agent has been split into two different Agents. A Serial version that only supports legacy security panels using serial control and a TCP/IP version that uses the new HAI SDK and will only talk to panel using TCP/IP network connections. Both versions are available in MLInstaller.

Please use this thread only for the discussion of the New TCP/IP connection version of the Agent.

dr.frazier
Senior Member
Senior Member
Posts: 220
Joined: Sat Oct 15, 2005 10:27 pm
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby dr.frazier » Mon Jan 25, 2010 9:49 pm

Have been very frustrated with lack of reliability so that I had put it aside for awhile. When it crashes it takes my whole system down and the family is mad because so much is now dependent on ML. Restarts dont happen because the computer hangs. Not good.

Have tried to keep up to date with progress for working plugin. Most of my troubles have been with initial startup. Sometimes it would crash, or hang, or start then crash. And never with any real explanation. So with Dave s request for more to troubleshoot I turned on logging and set out to get some data. To my surprise agent loaded right up and started working. Would logging slow execution enough to keep the program from tripping on itself. Worked for 3 days and thought I was good. Crashed last night however. Nothing in logs except frequent thermostat requests. i have 7. Got a windows info screen that said:

Logging error:system.IO.IOException:not enough quota is available to process this command. It then had about 12 lines of explanation. Unfortunately the system hung so I could not copy/paste the data. Thought it might be in error logs but no such luck.

Randy

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Tue Jan 26, 2010 9:29 pm

Dave;
One item of concern is this; I create this issue in error by not manually shutting doen the agent when restarting MLS (see other thread), but the agent package apparently allows two instances of the agent to run at one time. This not only eventually crashed the second instance, but in one case also took out the running instance. You should probably do some checking prior to that second instance being allowed to start up.

Other than this, I will say that everything has been moch more stable since the split. I have not run all commands yet, but the thermostats are working much better.
Thanks!

Dave Bruner
:shock:

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby CinemarDave » Fri Jan 29, 2010 12:26 pm

Version 3.75.3681.18587 of the TCP/IP agent turns on single instance checking.

Randy, the message you got would imply one of two things 1) You have disk quotas turned on for the user that is running the agent or 2) there are too many file in your %temp% folder. Are either one of these conditions true? In any event upgrade to the 3.75.3681.18587 version.

Logging should have no impact on startup.

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Fri Jan 29, 2010 8:07 pm

Thanks Dave - That solved it.
Thanks!

Dave Bruner
:shock:

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Sat Jan 30, 2010 5:49 pm

Dave

Now that it is working well, There are a few small additional items that I think should be added and exposed to MLS as follows;

Duress code -
This is a locally silent duress alarm, which is actually a disarm/arm code, not a user code though, but a special one. When entered to disarm the system, the panel send an instant alarm to the monitoring company and disarms the system.

Local Emergency -
There are three and can be exposed according to HAI, those being Police (1 and 3 key held for 3 seconds), Fire (4 and 6 key held), and Auxiliary (7 and 9 key held)

Area alarms - Every area in the panel actually has 9 classes of alarms that should all be exposed separately. See the clip below for some dialog on this from the HAI site. With this, you could tell exactly what type of alarm is going off per area.

The area status is a bitmap of alarms so yes you can have more than one alarm in an area at one time. The correct enum is enuCondAlarmType:

public enum enuCondAlarmType : byte
{
Any = 0xFF,
Burglary = 0x01,
Fire = 0x02,
Gas = 0x04,
Aux = 0x08,
Freeze = 0x10,
Water = 0x20,
Duress = 0x40,
Temperature = 0x80
}

This is in the protocol docs...

Also remember that even though you are using only 1 area the controller has 8 areas (for OP2) so use something like...

OK here's the actual PCA3 code:

clsOL2MsgStatus MSG = new clsOL2MsgStatus(HAC.Connection, B);
for (int i = 0; i < MSG.AreaCount(); i++)
{
HAC.Areas[i + 1].CopyStatus(MSG, (byte)i);
GV.Rows.Cells["colFire"].Value =
GetAlarmBitsText(HAC.Areas[i + 1].AreaAlarms, enuCondAlarmType.Fire);
GV.Rows.Cells["colPolice"].Value =
GetAlarmBitsText(HAC.Areas[i + 1].AreaAlarms, enuCondAlarmType.Burglary);
GV.Rows.Cells["colAuxiliary"].Value =
GetAlarmBitsText(HAC.Areas[i + 1].AreaAlarms, enuCondAlarmType.Aux);
GV.Rows.Cells["colDuress"].Value =
GetAlarmBitsText(HAC.Areas[i + 1].AreaAlarms, enuCondAlarmType.Duress);
GV.Rows.Cells["colSecurity"].Value = HAC.Areas[i + 1].ModeText();
}

/// <summary>
/// Function to return string of type of ALARM
/// </summary>
/// <param name="A">alarm byte</param>
/// <param name="AT">alarm type bits</param>
/// <returns></returns>
private string GetAlarmBitsText(byte A, enuCondAlarmType AT)
{
if ((A & (byte)AT) == (byte)AT)
return PCA3Resources.AlarmBits_ALARM;
else
return PCA3Resources.AlarmBits_OK;
}


Also, one last one; If you separate the alarm classes and report the individual status, you can use the status to see if the panel is truly ready to arm, which currently is an issue. I do think that there is a RTA variable that also can be exposed.

The whole idea here is to have a touch screen replace the alarm keypad at the entry. I typically install the alarm keypad in the adjacent closet.

Let me know, and I aill dig around a bit more for you.
Thanks!

Dave Bruner
:shock:

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby CinemarDave » Mon Feb 01, 2010 12:52 pm

Thanks, I post an update after I test that here.

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Mon Feb 08, 2010 8:13 pm

Dave - Over the weekend, and for no good reason ( there is always a reason) I started getting slow, down to unusable reply from the driver to the touchscreens. It does not seem to matter if I run a ML session on my MLS server or on a remote machine. There is a few second delay in the driver receiving a keypad command and the same delay for the response. Some items like alarm status never make it to screen. No errors are produced and the loggs for MLS and MLHAI show nothing out of line. Where should I look? Maybe a port issue? What port does the communication to and from actually take place on. Maybe it is a network issue??

Other commands for other drivers are the same as always to and from the screens. Any ideas where I should start?
Thanks!

Dave Bruner
:shock:

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Tue Feb 09, 2010 7:54 am

Dave the issue does not seem to be HAI but Weather lobby. It is a combination of MLWorker and Weather Lobby getting into some sort of loop downloading seven maps. It was killing the HAI response. I will post more in the weather lobby area as I figure out more.
Thanks!

Dave Bruner
:shock:

mbrad79
Newbie
Newbie
Posts: 10
Joined: Mon Dec 31, 2007 4:38 pm
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby mbrad79 » Sun Feb 14, 2010 10:20 am

Dave B.,
No reponse needed: just my observations. I've have the same problem with MLS not updating ML Clients. After the installing the latest version of MLHAI Agent, I had lost all updating status from MLS to the Clients. MLS variables update just fine on the Server and the clients will send commands without any problem. I've restarted, reinstalled and tried the "Begone evil spirits" chant, but to no evail to get the MLS to update the clients. I'm sure I'm doing something wrong, but I eventually figure it out. But I will say the MLHAI Agent is the most stable to date. I've gone as long as a 36hrs without a crash. Deselecting the map updates in Weatherlobby appears to really help with MLHAI stability (have no idea if there is a connection)when initially loading the program.

Thanks

Mark

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Sun Feb 14, 2010 9:04 pm

Agree Mark; SInce maps were disabled, all works great across the platform. What I later determined is that when one map gets hung up for some internet reason, that driver seems to wait forever for a response, and when in that mode, it kills all other communication between the Clients and the MLS. I found this by mistake in that I noticed two maps were no loading. I then turned all maps but one off, and everything works. As you said, this driver is stable, but the weather driver needs work.
Thanks!

Dave Bruner
:shock:

mbrad79
Newbie
Newbie
Posts: 10
Joined: Mon Dec 31, 2007 4:38 pm
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby mbrad79 » Wed Apr 07, 2010 10:18 am

Dave,
Just noticed that I was in the wrong thread (serial instead of TCP), sorry about that. Regardless of the version, if I have ver. 3.0 or greater, it should work. If no one else in Cinemar-ville is having this problem, then something outside the program is corrupting it's operation. Funny though, my issues are exactly the same as Ricks, as previously posted with the serial version. I think I'll strip down the MLServer to run only the essential plugins and programs, and hopefully by adding back in one plugin at a time, maybe I can find the culprit. I know you really worked hard on the MLAgent program and it is a real upgrade from the previous version, thank you. I might even change the chip back to a 3.2a to see if that helps. I'll let you know. It still feels a bit odd that I'm the only one out there with these problems (TCP).

Thank you for help.

Mark

mbrad79
Newbie
Newbie
Posts: 10
Joined: Mon Dec 31, 2007 4:38 pm
Contact:

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby mbrad79 » Wed Apr 07, 2010 10:23 am

Dave,
Any issues of where you can run the MLHAI Agent? I'll tried it on the same PC that MLServer is running, same problems. I've recently been running on my HP Mediasmart server, not improvement. Now, the HP Mediasmart Server is not identified as a client, is this a problem? Should the PC that's running the ML Agent have a MLobby client in the background, or a TCP/IP program?

Thank you

Mark

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Wed Apr 07, 2010 11:47 am

Dave - I came across an issue with the very simple OFF command today.

Command: MLHAI|270~Off

Response: Incorrect number of parameters for the specified command

Note that the "ON" command works fine, and that is how I found the issue. I manually turned an irrigation valve on today but had to go to Dealer PC Access to turn it off.

Communications otherwise has been very good. I will run through more commands as time allows and let you know of any errors. I am sure that this is an easy fix.
Thanks!

Dave Bruner
:shock:

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

Re: MLHAI TCP/IP Agent - Issues and Fixes

Postby DaveB » Wed Apr 07, 2010 11:52 am

mbrad79 wrote:Dave,
Just noticed that I was in the wrong thread (serial instead of TCP), sorry about that. Regardless of the version, if I have ver. 3.0 or greater, it should work. If no one else in Cinemar-ville is having this problem, then something outside the program is corrupting it's operation. Funny though, my issues are exactly the same as Ricks, as previously posted with the serial version. I think I'll strip down the MLServer to run only the essential plugins and programs, and hopefully by adding back in one plugin at a time, maybe I can find the culprit. I know you really worked hard on the MLAgent program and it is a real upgrade from the previous version, thank you. I might even change the chip back to a 3.2a to see if that helps. I'll let you know. It still feels a bit odd that I'm the only one out there with these problems (TCP).

Thank you for help.

Mark


Mark; We previously had all those issues, but since the latest version, communications has been rock solid. Make sure that the obvious ports are open and also that you have less than 5 devices attempting to connect to the panel via TCP. I can very successfully connect to the panel with the HAI driver and PC Access at the same time via TCP. Make sure that the agent is the latest version. 3.75.3694
Thanks!

Dave Bruner
:shock:


Return to “MLHAI”

Who is online

Users browsing this forum: No registered users and 1 guest