Page 1 of 1

EnvisaLink 4 TPI Issues

Posted: Wed Apr 06, 2016 2:40 am
by vladb
My set-up is:

- EnvisaLink 4 with DSC alarm panel
- Firmware Version: 01.00.61 (reported by web address)
- Static IP Set
- No Internet connect available

Web interface works without issues (just very laggy sometimes).

I'm trying to follow the EnvisaLinkTPI-1-06.pdf file instructions to connect to TPI but I'm stuck at first step:
Once established the TPI will send a 5053 command (See section 3.0 for a detailed description of the protocol) requesting a session password. The client should then, within 10 seconds, send 005 login request
The issue is I don't get any 5053 command. I can open socket but no receive no data.

What I've tried so far:

windows / cygwin - nc

Code: Select all

nc -v 172.16.30.30 4025
Connection to 172.16.30.30 4025 port [tcp/*] succeeded!
linux - nc

Code: Select all

nc 172.16.30.30 4025
Result: no output, disconnects after a while

NodeJS

Code: Select all


var Config = {};
Config.ip       = '172.16.30.30';
Config.port     = 4025;
Config.password = 'user';

const net=require('net');

var client = new net.Socket();
client.connect(Config.port, Config.ip, function(){
  console.log('connected');
  setTimeout(function(){
	client.write('005');
  },1000);
});
client.on('data',function(data){
  console.log('Got '+data.toString());
  //var dataslice = data.toString().replace(/[\n\r]/g, ',').split(',');
  //console.log(dataslice);
});
client.on('error',function(error){
  console.log('error');
  console.log(error);
});
client.on('close',function(){
  console.log('closed');
});
connected
closed
error
{ [Error: This socket has been ended by the other party] code: 'EPIPE' }
PHP

Code: Select all

<?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)
  or die('UnableToCreateSocket'.PHP_EOL)
  ;
/*
socket_set_nonblock($socket)
  or die('Unable to set nonblock on socket'.PHP_EOL)
  ;
*/
socket_connect($socket,'172.16.30.30',4025)
 or die('UnableToConnect'.PHP_EOL);

$err=socket_last_error();
if($err!==0){ die('Error: '.$err.PHP_EOL); }

echo 'Connected, starting engine..'.PHP_EOL;
//socket_write($socket,"005user54\n\n");
while(1){
  $data=@socket_read($socket,500,PHP_BINARY_READ);
  if($data!==NULL){
	var_dump($data);
    /*if(is_string($data) && strlen($data)>0){
      var_dump($data);
    }*/
  }
  sleep(1);
}
string(0) ""
string(0) ""
string(0) ""
string(0) ""
Also tried various libraries and utilities from github, but nothing seems to be able to connect to TPI interface.

What am I doing wrong?

Thank you for your help

Re: EnvisaLink 4 TPI Issues

Posted: Wed Apr 06, 2016 6:36 am
by vladb
It seems that after moving it to another location and allowing it internet access the TPI API starts to work (i get the request to login).

I really hope this is a bug... how do I change firmware?

Re: EnvisaLink 4 TPI Issues

Posted: Wed Apr 06, 2016 10:51 am
by GrandWizard
You can't use a static IP address with version 1.0.61 . It is a known bug. You have to uprade your module, as it sounds like you already did, to the current version and then you can use static IP.

Re: EnvisaLink 4 TPI Issues

Posted: Wed Apr 06, 2016 11:30 am
by vladb
Thank you very much, it's on on version right now 01.00.77 ant everything works - I guess you did it remotely since I did not do anything to it, just added another access point so it has an internet connection.

Thank you for the fast reply, I was quite worried I could not get it to work and I love it now!