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

huestatus

v0.2.2

Published

Modular status light system for use with Philips Hue devices

Downloads

6

Readme

HueStatus

NPM Package License Build Status Coverage Status Maintainability Dependencies Greenkeeper badge

Modular status light system for use with Philips Hue devices

Features

  • Set a Philips Hue light to one of 4 statuses (Ok, Warning, Building, Alert)
  • Works with multiple lights
  • Works with multiple modules

Installation

npm install -g huestatus

Create a .huerc file on your home directory, or the directory you will run huestatus from.

{
  "hue": {
    "host": "192.168.0.2", // Address of your Philips Hue Bridge
    "port": 80, // Port of the Philips Hue Bridge
    "username": "", // Philips Hue Bridge API username - (See https://www.developers.meethue.com/documentation/getting-started)
    "timeout": 2000, // Connection timeout for Philips Hue Bridge requests
    "statuses": { // Settings for each status
      "working": {
        "hue": 46920, // Color Hue Key - Between 0 and 65535
        "brightness": 155, // Brightness between 0 and 254
        "saturation": 155, // Saturation betweern 0 and 254
        "flashing": false // Should the light flash?
      }
      // ... Settings for each status (working, ok, building and alert) can be set separately
    }
  },
  "modules": [ // Array of module instances and their settings. Each module can be used again with different settings or a different light
    {
      "name": "huekins", // The name of the module. The module must be installed globally (i.e. npm i -g huekins)
      "light": "Hue color lamp 1", // The name of the light you want this module to control
      "url": "http://jenkins/", // Settings specific to the module
      "job": "MyJob/Develop"
    }, {
      "name": "huetry",
      "light": "Hue color lamp 2",
      "sentryApiKey": "3abxxxxxxxxxxxxxxxxx0f5",
      "project": "",
      "organisation": ""
    }
  ],
  "reporters": [ // Array of reporter modules and their settings
    {
      "name": "huelog-slack", // The name of the module. The module must be installed globally (i.e. npm i -g huekins)
      "logLevel": "", // Level of logging to pass to this reporter (debug, info, error)
      "slackWebhookUrl": "" // Settings specific to the module
    }
  ]
  "debug": true // Show debug logging info in console
}

Then run huestatus. Huestatus will connect to your Philips Hue Bridge, and load in all the configured modules then continue running, waiting for the modules to update the status. It is recommended to run huestatus with a process manager like PM2

Supported Modules

  • HueKins - Jenkins build monitor - GitHub - NPM
  • HueTravis - Travis CI build monitor - GitHub - NPM
  • HueTry - Sentry issue alerts - GitHub - NPM
  • HueTimeRobot - Uptime Robot monitor - GitHub - NPM

Module development template

Visit HueStatusModule For a template starter module with more instructions.

Loggers/Reporters

Status changes are logged to STDOUT by default. This can be helpful if you have several modules using the same light to find out what's caused it to turn red.

But all team members may not have access to the terminal logs so reporters can be added to publish more accessible logs.

Supported Reporters

  • HueLog Slack - Push status changes to a slack channel GitHub - NPM

  • HueLog Status Page - Serve a webpage with a list of recent log events GitHub - NPM

Reporter development

Reporters work in a similar way to status modules but they don't have a base class to extend. All they need is a start and a log method. They are registered in the reporters array of .huerc.