Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mipacket

Node.js package for parsing Xiaomi BLE packets.

npm language commit licence


Install

npm install mipacket

Usage

import MiPacket from 'mipacket';

const packet = new MiPacket(buffer);
// or
const packet = new MiPacket('hexstring');

Sample output

MiPacket {
  isEncrypted: false,
  hasMac: true,
  hasCapabilities: false,
  hasEvent: true,
  hasMesh: false,
  isRegistered: false,
  bindingState: false,
  authMode: 0,
  version: 2,
  productId: 426,
  productName: 'LYWSDCGQ',
  frameCounter: 72,
  mac: <Buffer 12 34 56 78 90 ab>,
  event: Event {
    eventId: 13,
    eventData: {
      temperature: 19.4,
      humidity: 66
    }
  }
}

References

Licence

MIT

About

Node.js package for parsing Xiaomi BLE packets

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages