A server to have local dash button clicks control local wemo plugs/switches
npm install wedashmoA simple server that listens for clicks on the local network
from an Amazon Dash button and toggles the status of a WeMo
Switch/Plug.
* 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
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
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 npm run findbutton
script that node-dash-button provides. Either run it from
their project
or you can run in the root of this project. OnceManufacturer: Amazon Technologies Inc.
the script is running, just press your Dash button and record the first
MAC address that shows up with wemo list
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
command provided by ouimeaux
which will search for and list all the WeMo devices on your
network along with their exact names.
``
$ wedashmo
$ wedashmo -h
$ wedashmo --help
``
$ wedashmo -d 00:11:22:33:44:55 -w 'My Switch' -o /usr/local/bin/wemo -t 3000
#### -d, --dash
Required
The MAC address of your Dash button. See Setup above.
#### -w, --wemo
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,PATH
the 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
TODO
```
$ npm test
Fork, work your beautiful magic, and submit a PR.
Copyright 2017 Brandon Phillips
See LICENSE