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 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-neopixel

v3.3.2

Published

Homebridge plugin to control a NeoPixel Strip.

Downloads

3

Readme

homebridge-neopixel

Supports NeoPixel http(s) devices on the HomeBridge Platform and provides a readable callback for getting and setting the following characteristics to Homekit:

  • Characteristic.On
  • Characteristic.Brightness
  • Characteristic.Hue
  • Characteristic.Saturation

For more information visit: http://www.studiopieters.nl/apple-homebridge-neopixel-light/

Installation

  1. Install homebridge using: npm install -g homebridge
  2. Install homebridge-http using: npm install -g homebridge-neopixel
  3. Update your configuration file.

Configuration file

Structure

The following is an overview of the structure of your HTTP-NEO accessory.

Both powerOn and powerOff can either be a string or an object. If a string is provided it is filled in as the url and the body will be blank. Most devices will be ok with the string option.

The purpose of powerOff/powerOn for an NeoPixel light is not to physically power or de-power the device (as then how would it respond to further commands?), but to set the LED color to black (for powerOff), and restore the color (for powerOn). Your backend device should already be doing this. This is just a convenience function so that your HomeBridge knows this device can turn off or on.

Additionally, both brightness and color share the same structure (with the exception that the color structure allows for a .brightness variable), they can either be a string or an object. If it is a string, it is filled in as the status and the other fields are left blank. When this is the case, you can only read the settings, you may not change them.

{
    "accessory": "HTTP-NEO",
    "name": string,

    "http_method": string-optional,
    "username": string-optional,
    "password": string-optional,
    "sendImmediately": string-optional,

    "switch": {
        "status": url-optional,
        "powerOn": string-or-object,
        "powerOff": {
            url: string,
            body: string
        }
    },

    "lock": {
        "status": url-optional,
        "secure": string-or-object,
        "unsecure": {
            url: string,
            body: string
        }
    },

    "brightness": string-or-object,
    "color": {
        "status": url-status,
        "url": url-optional,
        "brightness": boolean,
        "http_method": string-optional
    }
}

Interfacing

All the .status urls expect a 200 HTTP status code and a body of a single string with no HTML markup.

  • switch.status expects 0 for Off, and 1 for On.
  • brightness.status expects a number from 0 to 100.
  • color.status expects a 6-digit hexidemial number.

Homebridge-NeoPixel is based on homebridge-better-http-rgb.