Skip to content
Hack your Amazon Dash to run what you want.
Python Makefile Dockerfile
Branch: develop
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Issue and execution help. Aug 1, 2018
amazon_dash Merge branch 'master' into develop Dec 12, 2019
docs Issue #147: Scapy update Mar 3, 2020
images Amazon-dash v1.3.0 release image. Sep 23, 2018
scripts Issue #29: version info Feb 21, 2018
.bumpversion.cfg Bump version: 1.3.3 → 1.3.4 Dec 12, 2019
.codeclimate.yml Codeclimate. Nov 17, 2016
.dockerignore Initial commit Aug 20, 2018
.gitignore Schema validation. Dec 10, 2017
.travis.yml Issue #152: Python 3.8 support Mar 3, 2020
AUTHORS.rst Added Aaron Bach to AUTHORS file (PR #77). Aug 21, 2018
CONTRIBUTING.rst Issue #152: Python 3.8 support Mar 3, 2020
Dockerfile Issue #128: Command On Button Press Does Not Work In Combination With… Feb 23, 2019
HISTORY.rst Amazon-dash v2.0.0 disclaimer. Sep 23, 2018
LICENSE.txt New setup.py Nov 17, 2016
MANIFEST.in MANIFEST amazon_dash/install *.yml *.service Feb 11, 2018
Makefile Docs files and extra files. Jan 27, 2018
README.rst Issue #147: Scapy update Mar 3, 2020
amazon-dash.png Amazon-dash v1.3.0 release image. Sep 23, 2018
common-requirements.txt Issue #147: Scapy update Mar 3, 2020
py2-requirements.txt Issue #147: Scapy update Mar 3, 2020
py3-requirements.txt Issue #147: Scapy update Mar 3, 2020
requirements-dev.txt Issue #153: Update pyfakefs in tests Mar 3, 2020
setup.cfg Docs files and extra files. Jan 27, 2018
setup.py Issue #152: Python 3.8 support Mar 3, 2020
tox.ini Issue #153: Update pyfakefs in tests Mar 3, 2020
travis_pypi_setup.py Docs files and extra files. Jan 27, 2018

README.rst

https://raw.githubusercontent.com/Nekmo/amazon-dash/master/amazon-dash.png


Latest Travis CI build status Latest PyPI version Python versions Code Climate Test coverage Requirements Status

WARNING: Your Amazon-dash buttons can be bricked after December 31st. Go to section 5 to read more.

DEVELOPMENT BRANCH: The current branch is a development version. Go to the stable release by clicking on the master branch.

Python Amazon Dash

Hack your Amazon Dash to run what you want. Without welders. For the entire family.

IMPORTANT: You have until August 31 to configure your existing Amazon Dash buttons. Your configured buttons should continue to work using Amazon-dash until its end of life. However it is advisable to block the connection to Amazon servers with a firewall.

This program written in Python runs in daemon mode waiting for someone in the same network to press a configured Amazon Dash button. It is not necessary to know programming to use this program. Amazon-Dash executes commands by command line, calls a url and more. This program works well on a Raspberry PI or on computers with few resources.

  1. Install Amazon Dash:
$ sudo pip3 install amazon-dash  # and after:
$ sudo python3 -m amazon_dash.install

Also available on AUR and FreeNAS. You can also use pip2 and python2 if your system only has Python2, but Python 3 is the recommended version. See other installation methods in the documentation.

Note: It may also be necessary to install tcpdump on your system (in Debian apt install tcpdump).

  1. Use discovery mode to know the mac of your Dash (Run the program, and then press any button):
$ sudo amazon-dash discovery
  1. Edit config file (/etc/amazon-dash.yml):
# amazon-dash.yml
# ---------------
settings:
  delay: 10
devices:
  0C:47:C9:98:4A:12: # Command example
    name: Hero
    user: nekmo
    cmd: spotify
  AC:63:BE:75:1B:6F: # SSH example
    name: Tassimo
    cmd: door --open
    ssh: 192.168.1.23:2222
  AC:63:BE:67:B2:F1: # Url Webhook example
    name: Kit Kat
    url: 'http://domain.com/path/to/webhook'
    method: post
    content-type: json
    body: '{"mac": "AC:63:BE:67:B2:F1", "action": "toggleLight"}'
    confirmation: send-tg
  40:B4:CD:67:A2:E1: # Home Assistant example
    name: Fairy
    homeassistant: hassio.local
    event: toggle_kitchen_light
  18:74:2E:87:01:F2: # OpenHAB example
    name: Doritos
    openhab: 192.168.1.140
    item: open_door
    state: "ON"
    confirmation: send-pb
  44:65:0D:75:A7:B2: # IFTTT example
    name: Pompadour
    ifttt: cdxxx-_gEJ3wdU04yyyzzz
    event: pompadour_button
    data: {"value1": "Pompadour button"}
confirmations:
  send-tg:
    service: telegram
    token: '402642618:QwGDgiKE3LqdkNAtBkq0UEeBoDdpZYw8b4h'
    to: 24291592
    is_default: false
  send-pb:
    service: pushbullet
    token: 'o.BbbPYjJizbPr2gSWgXGmqNTt6T9Rew51'
    is_default: false

UPGRADE from previous versions

The following execution methods are supported with your Amazon Dash button with this program:

https://goo.gl/VqgMZJ https://goo.gl/a6TS7X https://goo.gl/zrjisq
System command Call url Homeassistant
https://goo.gl/Cq4bYC https://goo.gl/L7ng8k  
OpenHAB IFTTT  

Amazon-dash also allows you to send a confirmation after pressing a button. You will also receive a message in case of failure. Telegram and Pushbullet are supported.

For more information see the documentation of the configuration file.

  1. Run the daemon:

If you use a Systemd system (Debian 8+, Fedora 15+, Ubuntu 15.04+, Arch Linux 2012+, OpenSUSE 12.1+, and more) execute:

$ sudo systemctl start amazon-dash

To run Amazon-dash at startup:

$ sudo systemctl enable amazon-dash

To run Amazon-dash manually look at the documentation.

  1. Avoid a connection to Amazon servers

December 31 is the last day to block requests from your Amazon-dash buttons to Amazon servers. In 2020 your buttons can be bricked in an update from Amazon servers. To continue using your buttons you must configure your router to block Internet connections from the buttons. Alternatively you can block these domains: dash-button-na-aws-opf .amazon.com, 0.amazon.pool.ntp.org, 1.amazon.pool.ntp.org, 2.amazon.pool.ntp.org, 3.amazon.pool.ntp .org. However, it is recommended to block all requests from the buttons.

Docker

Using Amazon Dash within docker is easy! First, pull the Docker image:

$ docker pull nekmo/amazon-dash:latest

Then, create a container and run Amazon Dash itself:

$ docker run -it --network=host \
             -v </full/path/path/to/amazon-dash.yml>:/config/amazon-dash.yml \
             nekmo/amazon-dash:latest \
             amazon-dash run --ignore-perms --root-allowed \
                             --config /config/amazon-dash.yml

Join the community

Do you need ideas on how to use Amazon Dash? See what the community does with this project. Some examples:

See all the examples in the community.

You can’t perform that action at this time.