https://github.com/andgineer/docker-amazon-dash-button-hack
Amazon Dash Button hack in Docker for Synology
https://github.com/andgineer/docker-amazon-dash-button-hack
amazon-dash-button docker google-sheets python
Last synced: 4 months ago
JSON representation
Amazon Dash Button hack in Docker for Synology
- Host: GitHub
- URL: https://github.com/andgineer/docker-amazon-dash-button-hack
- Owner: andgineer
- Created: 2017-04-05T07:18:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-15T05:25:16.000Z (over 1 year ago)
- Last Synced: 2025-01-15T07:24:43.046Z (over 1 year ago)
- Topics: amazon-dash-button, docker, google-sheets, python
- Language: Python
- Homepage: http://masterandrey.com/posts/en/amazon_dash_button/
- Size: 3.54 MB
- Stars: 11
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/andgineer/docker-amazon-dash-button-hack/actions)
[](https://htmlpreview.github.io/?https://github.com/andgineer/docker-amazon-dash-button-hack/blob/python-coverage-comment-action-data/htmlcov/index.html)
[](https://hub.docker.com/r/andgineer/amazon-dash-button-hack)
This is a [Docker Hub container](https://hub.docker.com/r/andgineer/amazon-dash-button-hack)
for the [Amazon Dash Button hack](https://sorokin.engineer/posts/en/amazon_dash_button_hack.html).
It sniffs the network to intercept Amazon Button communications with Amazon,
thereby detecting button presses.
It can write to Google Sheets, Google Calendar and fire events in [IFTTT](https://ifttt.com).
I use it on my [Synology](https://www.synology.com) for
[IoT calendar](https://sorokin.engineer/posts/en/iot_calendar_synology.html).
To run the container on Linux:
```
docker run \
--net host \
-it \
--rm \
-v $PWD/../amazon-dash-private:/amazon-dash-private:ro \
andgineer/amazon-dash-button-hack
```
In folder `../amazon-dash-private` you should have:
* settings [`settings.json`](https://andgineer.github.io/docker-amazon-dash-button-hack/settings/)
* buttons list `buttons.json`
* `amazon-dash-hack.json` with Google API credentials [Google Sheets](https://console.developers.google.com/start/api?id=sheets.googleapis.com), [Google Calendar](https://console.developers.google.com/start/api?id=calendar)
* `ifttt-key.json` with [Maker Webhook key](https://ifttt.com/services/maker_webhooks/settings)
[Examples of these files](https://github.com/andgineer/docker-amazon-dash-button-hack/tree/master/amazon-dash-private).
See details in [User manual](https://sorokin.engineer/posts/en/amazon_dash_button_hack_install.html).
## MacOS and Windows
You cannot sniff network from Docker containers running on MacOS and Windows because they do not run
Docker daemon natively but use a virtual machine to run it.
So to debug on MacOS and Windows:
. ./activate.sh
sudo python src/amazon_dash.py
## Developers
We use `collections.abc` so minimum Python 3.10
[API docs](https://andgineer.github.io/docker-amazon-dash-button-hack/docstrings/)
# Scripts
To see the list of scripts:
make help
## Coverage report
* [Codecov](https://app.codecov.io/gh/andgineer/docker-amazon-dash-button-hack/tree/master/src)
* [Coveralls](https://coveralls.io/github/andgineer/docker-amazon-dash-button-hack)