1.4 KiB
Amazon Dash Button to MQTT Bridge
Sends an MQTT message when an Amazon Dash button press is detected.
Dash detection code based on sejnub/docker-amazon-dash-sniff
Dash Button Setup
-
Go through the normal Dash button setup in the Amazon app, but when asked to select a product, simply exit out of the setup process.
-
Find the mac address of the Amazon button. This can usually be achieved through your router. If in doubt, use a MAC address vendor checker to make sure the MAC is reigstered to "Amazon Technologies inc."
-
(Optional) Block the button from accessing the internet. Different routers have different ways of achieving this, but typically a simple IPTables rule will achieve this.
Usage
-
Install Python (>= 2.7), as well as scapy, configparser and paho-mqtt from pip.
-
Clone this repo
-
Run main.py to generate the example config.
-
Edit the config provided to include your MQTT host, as well as the MAC addresses of the button and the corresponding MQTT channels to message. (See the config for examples.)
-
Run main.py
** OR **
-
Run the docker image:
docker run -d --net=host --name="mqtt-dash" -v $YOUR_CONFIG_DIRECTORY:/config adamant/mqtt-amazon-dash
-
Edit the config provdided by the program.
-
Start the container again:
docker start mqtt-dash