Skip to content

Govee H5072, H5074, H5075, H5101, and H5102 Bluetooth Client

Notifications You must be signed in to change notification settings

MrFly72/govee-bt-client

 
 

Repository files navigation

Govee H5xxx Bluetooth Client

npm version

A library to listen for the BLE (Bluetooth Low Energy) broadcasts from Govee Thermometer Hygrometer devices. Requires a compatible bluetooth module and operating system (see prepequisites).

Supported devices:

  • H5072
  • H5074
  • H5075
  • H5101
  • H5102
  • H5179

Installation

npm install govee-bt-client

API

  • startDiscovery: (callback: (reading: GoveeReading) => void)
    • Starts listening to broadcasts and pass decrypted data into the callback function.
  • stopDiscovery()
    • Stops listening to broadcasts from Bluetooth
  • debug: (on: boolean)
    • Function to enable debugging of bluetooth advertisements and peripherals.

Example

import { startDiscovery, stopDiscovery, debug } from "./index";

debug(true);

console.log("=== start discovery");

startDiscovery((reading) => {
    console.log(reading);
});

setTimeout(async () => {
    await stopDiscovery();
    console.log("=== stop discovery");
}, 30000);

Credits

Credits and thanks to

About

Govee H5072, H5074, H5075, H5101, and H5102 Bluetooth Client

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.1%
  • JavaScript 0.9%