npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

identi-recognition

v0.0.15

Published

identiRecognition

Readme

HUMAN FACE SECURITY INTEGRATION

Badge en Test Service

This package provides a unified way to interact with multiple access control devices, including XCore and Terminal, allowing for standardized command execution and status retrieval.

| Version | Descripcion | Estado | | ------- | ------------------- | ----------- | | 0.0.14 | Initial Integration | Development | | | | |

RELEASE NOTES :

  • The terminal class is still being build.
  • The XCORE class is still being build.
  • In the XCORE class keep in mind that there are two types of XCOREs. Depending on the API. So make sure to validate the object creation.
  • Adittional, when creating Xcore Objects , make sure to call the getStatus() ALWAYS , so you can make sure the device was correctly configured. If it fails, try changing the _versionPro parameter when creating the object

Table of Contents

  1. Installation
  2. Usage
  3. Device Classes
  4. Configuration
  5. API Reference
  6. Error Handling
  7. Examples

Installation

To install this package, use the following command:

npm install identi-recognition

Make sure you have axios installed as a dependency if not already present in your project

Usage

First, import the desired classes from the package:

const { XCore, Terminal } = require('identi-recognition')

// Create instances for each device with their respective IP addresses
// and passwords if required.

const xcoreDevice = new XCore((ip = '192.168.1.100'), (_versionPro = false))
const terminalDevice = new Terminal('192.168.1.101', 'passwordTerminal')

Device Classes

XCore Class

The XCore class allows you to interact with XCore devices. It includes methods for status retrieval and sending commands.

| Method | Description | | ---------------------------------------------- | --------------------------------------------------- | | getStatus() | Retrieves the current status of the XCore device. | | facesCompare(image1, image2, liveness ) | Compare two faces images. | | faceCompareToLocal(image1, group, liveness ) | Compare a face image to the local Db of the device. | | prepareReport(...) | Prepare report with all needed infomration. | | generateReport() | return the generated report. | | groupFace() | Group a face in order to be detected by images. | | createUser() | Uplaod an User iamge to Xcore device [see_more]. | | updateCreatedUser() | [NOT VALID YET] | | deleteUser() | [NOT VALID YET] |

*[see_more] : In order to be recognized by Ip cameras , the images uploaded must be charged to an specific gorup where the ip cameras must be connected too

Terminal Class

The Terminal class provides similar functionality for Terminal devices. It supports status monitoring, command execution, and more.

| Method | Description | | ------------------------------------ | ---------------------------------------------------------- | | getStatus() | Retrieves the current status of the Terminal device. | | setCallbacks(endpointCallback) | Defines the endpoints callbacks for the correct validation | | showMessage(message,speak) | Sends something so the terminal will show or speak. | | deleteAllRecords(simetricalMonths) | Delete the registers, simetrical to the devices . | | deleteUser(userId) | Delete the user specified. | | photoTaking() | Start procces to make teminal be the one to take photos. |

Configuration

Adittional, when creating Xcore Objects , make sure to call the getStatus() ALWAYS , so you can make sure the device was correctly configured. If it fails, try changing the _versionPro parameter when creating the object

API Reference

XCore Methods

  1. getStatus()

    Retrieves the current status of the XCore device.

    const status = await xcoreDevice.getStatus()
    console.log(status) // Output: { status: 'online', ... }
  2. sendCommand(command: string)

    Sends a specified command to the device.

    const response = await xcoreDevice.sendCommand('RESTART')
    console.log(response) // Output: { code: HFS001, ... }
  3. restartDevice()

    Restarts the XCore device.

    const result = await xcoreDevice.restartDevice()
    console.log(result) // Output: { code: HFS001, message: 'Device restarting...' }
  4. getLogs()

    Retrieves system logs from the XCore device.

    const logs = await xcoreDevice.getLogs()
    console.log(logs) // Output: [ { timestamp: '...', message: 'Log entry...' }, ... ]
  5. updateFirmware()

    Updates the firmware of the device using the given update file.

    const updateStatus = await xcoreDevice.updateFirmware('path/to/update.bin')
    console.log(updateStatus) // Output: { code: HFS001, version: '2.0.1' }

Terminal Methods

  1. getStatus()

    Retrieves the current status of the Terminal device.

    const status = await terminalDevice.getStatus()
    console.log(status) // Output: { status: 'online', ... }
  2. setCallbacks(endpointCallback)

    SDefines the endpoints callbacks for the correct validation.

    const response = await terminalDevice.setCallbacks('192.168.1.120:8888/setHere/')
    console.log(response) // Output: { code: HFS001, message: { messageResult: "success"  }}}
  3. showMessage(message,speak)

    Sends something so the terminal will show or speak. if "speak" is true, then the terminal will speak, if its false, it will only show the message in screen.

    const result = await terminalDevice.showMessage('Hola', true)
    console.log(result) // Output: { code: HFS001, message: 'Device rebooting...' }
  4. deleteAllRecords(simetricalMonths)

    Delete the resgisters X months forward and backward the current date.

    const newConfig = { volume: 80, brightness: 70 }
    const result = await terminalDevice.deleteAllRecords(1)
    console.log(result) // Output: { code: HFS001, message: ' ' }
  5. deleteUser(userId)

    Delete user by id

    const result = await terminalDevice.deleteUser(123456)
    console.log(result) // Output: { code: HFS001, message: '' }

Error Handling

The package provides a built-in error handler to capture and log errors. Errors are caught and handled internally, returning meaningful messages to the user.

Examples

Here’s a quick example of how you can use this package:

const { XCore, Terminal } = require('device-control-package')

const xcore = new XCore('192.168.1.100')
const terminal = new Terminal('192.168.1.101', 'password')

// ALWAYS CALL THE Get status of XCore
// IF it fails , try changing the _versionPro parameter
xcore
  .getStatus()
  .then((status) => console.log('XCore Status:', status))
  .catch((error) => {
    const xcore = new XCore('192.168.1.100', (_versionPro = false))
  })

// Send a command to Terminal
terminal.showMessage('Hello from my package').then((response) => console.log('WOW,m the terminal spoke'))