Difference between revisions of "Ekey Home"

From HSYCO
Jump to navigation Jump to search
Line 11: Line 11:
  
 
In events programming file let's add this lines:
 
In events programming file let's add this lines:
  function SysLogEvent(address, log) : {
+
function SysLogEvent(address, log) : {
 
         if (address == "192.168.1.243"){
 
         if (address == "192.168.1.243"){
 
                 idSensor = "sensor1"
 
                 idSensor = "sensor1"

Revision as of 11:43, 28 August 2014

eKey Home is a finger scanner that can be easily integrated in HSYCO using the ekey home CV UDP RS485 module and the Syslog service.

What to I need?

Hsyco, of course, then ekey home CV UDP RS485 and eKey Home finger scanner.

This is a simple scheme of what you need:

Ekey1.png

Integration

In events programming file let's add this lines:

function SysLogEvent(address, log) : {
        if (address == "192.168.1.243"){
               idSensor = "sensor1"
               split = log.split("_");
               varSet("$"+idSensor+"-"+"userid", split[1]);
               varSet("$"+idSensor+"-"+"username", split[2]);
               varSet("$"+idSensor+"-"+"userstatus", split[3]);
               varSet("$"+idSensor+"-"+"fingerid", split[4]);		
               varSet("$"+idSensor+"-"+"key", split[5]);		
               varSet("$"+idSensor+"-"+"serial", split[6]);		
               varSet("$"+idSensor+"-"+"unitname", split[7]);		
               varSet("$"+idSensor+"-"+"action", split[8]);	
} else if (address == "192.168.1.244"){	
               idSensor = "sensor2"
               split = log.split("_");
               varSet("$"+idSensor+"-"+"userid", split[1]);
               varSet("$"+idSensor+"-"+"username", split[2]);
               varSet("$"+idSensor+"-"+"userstatus", split[3]);
               varSet("$"+idSensor+"-"+"fingerid", split[4]);		
               varSet("$"+idSensor+"-"+"key", split[5]);		
               varSet("$"+idSensor+"-"+"serial", split[6]);		
               varSet("$"+idSensor+"-"+"unitname", split[7]);		
               varSet("$"+idSensor+"-"+"action", split[8]);	
       }
}