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

dasher-hue

v1.0.0

Published

A way to bridge your Amazon Dash buttons with Philips Hue.

Downloads

4

Readme

dasher-hue

dasher-hue is a simple way to bridge your Amazon Dash buttons to Philips Hue lights. This small project is just a combination of two existing projects:

node-hue-api dasher

How it works

Configure dasher-hue via config/config.json. You have to setup your Philips Hue (IP and username) and all the Amazon Dash Buttons you have.

Configuration

You define your buttons via the config/config.json file. You attach each button to a specific group or a specific light, what you prefer.

Here's an example.

{
  "philips_hue": {
    "ipaddress": "192.168.0.10",
    "username": "your-philips-hue-username-key"
  },
  "buttons":[
  {
    "name": "Amazon Dash Fiesta Living Room",
    "address": "50:50:50:50:50:51",
    "group": "1"
  },
  {
    "name": "Amazon Dash Rodial Bedroom",
    "address": "50:50:50:50:50:52",
    "group": "2"
  },
  {
    "name": "Amazon Dash ON Corridor",
    "address": "50:50:50:50:50:53",
    "light": "6"
  }
]}

Buttons take 4 options.

  • name - Give the button action a name, just for informative purposes.
  • address - The MAC address of the button.
  • group - The number or the group you want to toggle. When using this, you don't use light.
  • light - The number or the light you want to toggle. When using this, you don't use group.

Amazon Dash Button tips.

  • Use DHCP Reservation on your Amazon Dash Button to lower the latency from ~5s to ~1s.
  • Dash buttons cannot be used for another ~10 seconds after they've been pressed.

Setup

In order to get your Amazon Dash Button mac address, get instructions and scripts from here

Check Setup section here

Set up dasher-hue.

git clone https://github.com/Ricardo1980/dasher-hue
cd dasher-hue
npm install

Then create a config.json in /config to set up your Dash buttons. Or use the the sample file, renaming it and modifying according to your needs.

Launching it

Listening for Amazon Dash Buttons requires root. So you need to start dasher-hue with sudo.

sudo npm run start

Auto Start on Raspberry Pi Zero (or other Linux distributions)

For creating and setting up a service, check this.

Improvements

Locate Philips Hue Bridge automatically, rather than using an IP. Check: nupnpSearch(), locateBridges(), upnpSearch or searchForBridges()