npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

govee-lightbar

v1.0.1

Published

Govee H6054 bluetooth toolkit

Readme

govee-lightbar

Simple Node module used to control Govee Light Bars (Flow Pro H6054) over BLE.

Installation

npm install govee-lightbar

Supported Models

Currently supported and tested models are:

  • H6054

Controls

The module can be used to control:

  • Power:
    • Turn led strip on or off
  • RGB Color and Brightness
    • Turn led strip to any RGB color using hex
    • Control each of the 12 individual color segments
  • Tunable White Color
    • Turn led strip to any white color temperature. Uses different LEDs than the RGB.
  • Brightness
    • adjust global led brightness
  • DIY
    • program govee diy effects

Exported Methods

  • swap()
    • Swap the left and right bar software-side
  • saveColor()
    • Apply the colors and brightness values of the individual light bar segments
  • turnOn(left, right)
    • Turn the individual bars on
  • turnOff(left, right)
    • Turn the individual bars off
  • setBrightness(brightness)
    • Set the global brightness for both bars
  • keepalive()
    • Send a keepalive package if you want to keep the bluetooth connection alive
  • scene(scene_id)
    • Change to 'scene' mode, parameter is the scene id
    • Get scene ids from const { scenes } = require("govee-lightbar");
  • diy(options = {})
    • Store a diy effect on the bars
    • options.style the effect id, see const { diyEffects } = require("govee-lightbar");
    • options.style_mode some effects accept an additional mode (0 by default)
    • options.speed effect speed from 0 - 100
    • options.colors array of up to 8 colors in the format {r: 255,g: 255,b: 255}
  • <side>.setRGB(segment, r, g, b)
    • Set the segment's rgb color
  • <side>.setBrightness(segment, brightness)
    • Set the segment's rgb brightness
  • <side>.setRGBFull(r, g, b)
    • Set all segments of the bar to the same color
  • <side>.setWhite(k)
    • Set all segments of the bar to a white color, k is the kelvin value from 2000 to 8900

Exported constants

  • scenes object with all available scene ids
  • musicEffects object with all available music modes
  • diyEffects object with all available diy modes

Bar Segments

Each bar has 6 segments, they are indexed from 0 to 5, 0 being the segment closest to where the cable is attached.

Each bar can either be in "rgb" or in "white" mode because it uses different leds, setting a segment's color or brightness switches it to "rgb" mode, setting a bar's white color switches it to "white" mode

Example

const { LightbarSet, diyEffects } = require("govee-lightbar");

let l = new LightbarSet();
l.debug = true;

await l.turnOn(true, true);
await l.setBrightness(100);

//setting both bars to warm white
l.left.setWhite(2000);
l.right.setWhite(2000);
await l.saveColor();

//setting left bar to red
l.left.setRGBFull(255, 0, 0);
await l.saveColor();

//setting individual color segments
l.left.setRGB(0, 0x1b, 0xa1, 0x98);
l.left.setRGB(1, 0x00, 0x96, 0xB0);
l.left.setRGB(2, 200, 50, 255);
l.left.setRGB(3, 200, 50, 255);
l.left.setRGB(4, 255, 0, 128);
l.left.setRGB(5, 255, 0, 128);

l.right.setRGB(0, 0x1b, 0xa1, 0x98);
l.right.setRGB(1, 0x00, 0x96, 0xB0);
l.right.setRGB(2, 200, 50, 255);
l.right.setRGB(3, 200, 50, 255);
l.right.setRGB(4, 255, 0, 128);
l.right.setRGB(5, 255, 0, 128);

await l.saveColor();

//example diy command, slow moving gradient

await l.diy({
    style: diyEffects.RAINBOW,
    speed: 50,
    colors: [
      {r: 27,g: 161,b: 152},
      {r: 0,g: 150,b: 176},
      {r: 0,g: 134,b: 191},
      {r: 71,g: 113,b: 188},
      {r: 128,g: 86,b: 163},
      {r: 157,g: 56,b: 119}
    ]
});

l.disconnect();

Bluetooth

Bluetooth connection is handled by @abandonware/noble, Prerequisites apply.

Credit

The work for reverse engineering the bluetooth protocol was done partly by me and partly by egold555's work here