HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: enterprised on January 26, 2015, 02:28:30 AM

Title: TcpClient help needed
Post by: enterprised on January 26, 2015, 02:28:30 AM
I'm trying to connect to my Honeywell alarm system over TCP.

Using the code below (and some more borrowed from an example by Gene) I do connect to the alarm system, but it requires a login password to fully connect/get in to the system. This is where I struggle.

Can someone please advice on what code to add for the password. Lets assume the password is: user

TcpClient.EndOfLine = "\r\n";
TcpClient
  .OnMessageReceived( HandleMessageReceived )
  .Service( "10,1,1,11" )
  .Connect( 4025 );

3rd party TPI tells me to send data as hex ascii code in following format:

command + data+ checksum+CR/LF

command:  30 30 35 (005)
data:           75 73 65 72 (user)
checksum:  41 43 (8 bit checksum for 30 30 35 75 73 65 72)
cr/lf:            0D 0A

so string to send is: 30 30 35 75 73 65 72 41 43 0D 0A