Socket
Socket
Sign inDemoInstall

ela

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ela

parsing for ELA RFID data


Version published
Weekly downloads
8
increased by700%
Maintainers
1
Install size
9.15 kB
Created
Weekly downloads
 

Readme

Source

ELA RFID Tag Parsing

Parsing data according to ELA Reader Communication Protocol.

ELA Documentation Downloads

Usage

This parsing function assumes no knowledge about the particular type of RFID tag in question. It could be a simple ID tag, or measure temperature, humidity, movement, or an analog input.

This method simply includes all the possible interpretations of the data. A full, proper interpretation of the data requires knowledge of the tag type. How to acheive this is left as an exercise for the reader :-)

const parse = require('ela').getParser()
try {
  let data = parse(buffer) // data delimited by '[' and ']', hex or binary mode
  data.disappeared // boolean, true if tag disappears from reader memory
  data.rssi // number, signal strength
  data.readerId // number, identifies reader
  data.tagIdLong // full tag ID (e.g. for tags without sensors)
  data.tagIdShort // tag ID when sensor data is included
  data.temperature // measured temperature when tag is COIN T tag
  data.humidity // measured RH, when tag is COIN RH tag
  data.movementSensor // 0-1 (nonlinear), 1 = "significant movement" (COIN MV)
  data.analogInput // voltage, when tag is analog input
  data.lowBattHumidity     // tag signalled low battery, exact format
  data.lowBattMovement     // is dependent on type of tag
  data.lowBattAnalogInput
  data.lowBattTemperature
  data.lowBatt // Low battery alarm, alarm info activated
  data.breakout // breakout, alarm info activated
} catch(e) {
  // buffer could not have been valid ELA reader data!
}

FAQs

Last updated on 05 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc