bthome-ts-parser
v2.0.4
Published
parses bthome packet returning value data
Downloads
113
Readme
Bthome ts parser
bthome-ts-parser is a typescript library dealing with bthome packets
- Library to parse bthome format packets and returns data value with BTHOME version
- Currently only supports BTHOME Version 2 without encryption
- Accepts data formats from official BTHOME site
- Available tests from BTHOME_Test_parser
- Github Repo
Example Usage
import { getByteProperties } from "lf-bthome-bytes";
const tempHumByte = [64, 2, 202, 9, 3, 191, 19];
console.log(getByteProperties(tempHumByte));
// expected output:
[
{ extension: "°C", value: "25.1", varName: "temperatureC" },
{ extension: "%", value: 50.55, varName: "relativeHumidity" },
];