Sources & Inspiration:
git clone https://github.com/JulianKahnert/amazon-dashbutton.git
cd amazon-dashbutton
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Now you have everything you need to run this daemon. Some changes in config.json
(compatible with Maddox Dasher config) should do the rest.
More requirements:
# macOS
brew install libnet
# linux
apt install libnet1-dev
# FreeBSD
pkg install libnet
Test your workflow with the find_button.py
sniffing script.
source .venv/bin/activate
python find_button.py
source .venv/bin/activate
python button.py
ps aux | grep "button.py"
# find process ID (pid)
ps aux | grep "button.py"
# kill the process
sudo kill 52324
... add a crontab
crontab -e
# add the following line as a cronjob (change "/PATH/TO/REPO/")
@reboot source /PATH/TO/REPO/.venv/bin/activate && python /PATH/TO/REPO/button.py
You'll probably receive annoying notifications on your phone asking you to complete the setup process. To prevent these notifications, you'll need to block the Amazon Dash Button from reaching the Internet by tweaking your router settings.