Socket
Book a DemoInstallSign in
Socket

@westh/atc-mi-thermometer-parser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@westh/atc-mi-thermometer-parser

Parse messages from ATC flashed Mi Thermometers (LYWSD03MMC)

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@westh/atc-mi-thermometer-parser

Parse messages from Xiaomi's Mi Thermometers, specifically LYWSD03MMC, who's been flashed with the ATC firmware.

Installation

npm install @westh/atc-mi-thermometer-parser

Usage

const atcMiThermometerParser = require('@westh/atc-mi-thermometer-parser')

const messageToBeParsed = Buffer.from('...') // ...data you've gotten via BLE from the ATC flashed Mi Thermometer
const parsedMessage = atcMiThermometerParser.parse(messageToBeParsed)

The parsedMessage will contain something that looks like the following:

{
  mac: <Buffer 7b d4 21 38 c1 a4>,
  temperature: 24.49,
  humidity: 51.35,
  batteryVoltage: 3273,
  batteryLevel: 100,
  counter: 91,
  flags: 5
}

Testing

Running yarn test will first run yarn build and then test both the CommonJS and ESM version.

License

MIT

Keywords

parse

FAQs

Package last updated on 29 Jun 2022

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.