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

wedashmo

v0.2.1

Published

A server to have local dash button clicks control local wemo plugs/switches

Downloads

11

Readme

wedashmo

A simple server that listens for clicks on the local network from an Amazon Dash button and toggles the status of a WeMo Switch/Plug.

Prerequisites

  • node-dash-button require's libpcap-dev
    • If on macOS, this should be available out of the box
    • If on linux, install the libpcap-dev (or similar) package with your distro's package manager.
    • If on Windows, may god help you.
  • ouimeaux, a python command line tool
    • You can either install it globally with easy_install (see their documentation) or build/install it somewhere else accessible. Just be sure to note the full path to the wemo executable

Installation

wedashmo can be installed globally and used as a command line tool:

 $ npm install -g wedashmo

Or locally and used via a simple API within your node project:

 $ npm install --save wedashmo

Setup

To use wedashmo, you need:

  • The MAC address of your Dash button
  • The name of your fully set up and connected WeMo Switch or Plug
  1. Find and record the MAC address of your Dash button:
    • To get this, you can use the findbutton script that node-dash-button provides. Either run it from their project or you can run npm run findbutton in the root of this project. Once the script is running, just press your Dash button and record the first MAC address that shows up with Manufacturer: Amazon Technologies Inc. following it.
  2. If you haven't yet, use the WeMo app on your phone to fully set up and name your WeMo Switch or Plug.
    • Record the name exactly as you entered it or you can use the wemo list command provided by ouimeaux which will search for and list all the WeMo devices on your network along with their exact names.

CLI Usage

To See Usage/Help

 $ wedashmo
 $ wedashmo -h
 $ wedashmo --help

To Start Listening

 $ wedashmo -d 00:11:22:33:44:55 -w 'My Switch' -o /usr/local/bin/wemo -t 3000

Options

-d, --dash <dash_mac_addr>

Required

The MAC address of your Dash button. See Setup above.

-w, --wemo <wemo_name>

Required

The exact name of your WeMo Switch or Plug. See Setup above.

-o, --ouimeaux [ouimeaux]

Optional

The path to ouimeaux's wemo executable. If this isn't provided, the PATH will be searched automatically for it and the server will fail with an error if it couldn't be found.

-t, --timeout [timeout]

Optional

The timeout in milliseconds that subsequent Dash button presses should be ignored each time a press is detected.

Default: 15000

-v, --verbose

Optional

Whether or not to output server status, detected presses, etc.

Default: false

API

TODO

Tests

 $ npm test

Contribute

Fork, work your beautiful magic, and submit a PR.

License (MIT)

Copyright 2017 Brandon Phillips

See LICENSE