1. lifx_dash(1)
  2. lifx_dash(1)

NAME

lifx_dash - Toggle LIFX lights with an Amazon Dash button

SYNOPSIS

lifx_dash monitor -m DASH_MAC_ADDRESS -t LIFX_API_TOKEN
lifx_dash snoop
lifx_dash config

DESCRIPTION

lifx_dash is a simple command-line tool to monitor your network for Amazon Dash button presses and toggle LIFX lights ON and OFF. The tool provides two commands, monitor and snoop.

Use snoop to listen for Dash presses on your network, and identify the button's MAC address.

Use monitor (with a MAC address and LIFX HTTP API token) to respond to presses, and toggle your lights ON and OFF. You can optionally pass a bulb selector, or choose to daemonize the monitor process.

A config command also exists, allowing you to set default options for monitor and snoop.

REQUIREMENTS

lifx_dash requires at least one LIFX bulb, and any Amazon Dash button. You will also need a wifi network and root access to sniff packets on your network adaptor.

Follow Amazon's Dash button setup steps, but stop before choosing a product to purchase. Pressing the button should pulse white while connecting to wi-fi, then flash orange. If necessary, you can factory reset your button and start the setup from scratch.

You will also need a free LIFX API token from here: https://cloud.lifx.com/settings

OPTIONS

The snoop command has one optional flag - the network interface to listen on.

The monitor command accepts the following flags, both a mac address and api token are required.

EXAMPLES

Get help on command options and arguments

$ lifx_dash -h
$ lifx_dash monitor -h
$ lifx_dash snoop --help

Snoop for Dash button presses on en1

$ lifx_dash snoop en1

Monitor Dash button presses on en0 with DASH_MAC_ADDRESS and LIFX_API_TOKEN, when pressed, toggle all lights

$ lifx_dash monitor -t LIFX_API_TOKEN -m DASH_MAC_ADDRESS

Monitor Dash button presses on en1 with a DASH_MAC_ADDRESS and LIFX_API_TOKEN, when pressed toggle the light with id 'd3b2f2d97459'

$ lifx_dash monitor --token=LIFX_API_TOKEN --mac-address=DASH_MAC_ADDRESS -s 'd3b2f2d97459' -i en1

Show the current configuration file options

$ lifx_dash config -s

FILES

Use the config command to set values for the command options. These will be saved to: ~/.lifx_dash.rc.yml and used as defaults. They can still be overridden by any arguments passed on the command line.

If running as a daemon (-d switch), the lifx_dash monitor command will log to /tmp/lifx_dash.log by default. Use the --log-file flag to override this.

BUGS

No known bugs. Please report issues here: https://github.com/matthutchinson/lifx_dash/issues

LICENSE

The MIT License: https://raw.githubusercontent.com/matthutchinson/lifx_dash/master/LICENSE.txt

Copyright (c) 2016 Matthew Hutchinson

AUTHOR

Matthew Hutchinson, https://matthewhutchinson.net

SEE ALSO

  1. June 2017
  2. lifx_dash(1)