{"id":13811607,"url":"https://github.com/maddox/dasher","last_synced_at":"2025-04-04T18:06:13.010Z","repository":{"id":46243975,"uuid":"44250862","full_name":"maddox/dasher","owner":"maddox","description":"🔘 A simple way to bridge your Amazon Dash buttons to HTTP services","archived":false,"fork":false,"pushed_at":"2018-07-26T18:43:39.000Z","size":52,"stargazers_count":710,"open_issues_count":55,"forks_count":93,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-03-28T17:07:03.326Z","etag":null,"topics":["amazon-dash-button","home-assistant","home-automation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maddox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-14T13:55:00.000Z","updated_at":"2024-11-29T23:12:23.000Z","dependencies_parsed_at":"2022-08-23T23:00:53.441Z","dependency_job_id":null,"html_url":"https://github.com/maddox/dasher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fdasher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fdasher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fdasher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddox%2Fdasher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maddox","download_url":"https://codeload.github.com/maddox/dasher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-dash-button","home-assistant","home-automation"],"created_at":"2024-08-04T04:00:24.662Z","updated_at":"2025-04-04T18:06:12.988Z","avatar_url":"https://github.com/maddox.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Dasher!!\n\n## :warning: Dasher is sunsetted :warning:\nThis project is no longer under active development. I neither use it, nor do I use Amazon Dash buttons in my home automation. I found their latency and general way of working to not be a great solution as a smart button for my household. \n\n[Nekmo/amazon-dash](https://github.com/Nekmo/amazon-dash) is a great alternative. It has support for all kinds of actions and is actively developed. It's way better than mine!    \n\n## What it is\n\nDasher is a simple way to bridge your Amazon Dash buttons to HTTP services.\n\nDo you have a Home Automation service set up like [Home Assistant](https://home-assistant.io), [openHab](http://www.openhab.org), or\nmaybe a SmartThings hub? Using Dasher, you can easily command them to do\nsomething whenever your Dash button is pressed.\n\nThis of course goes for anything you can reach via HTTP. That includes IFTTT by\nway of the Maker channel :metal:\n\n## How it works\n\nIt's pretty simple. Press a button and an HTTP request is made or local command\nis ran. That's it.\n\nYou configure your Dash button(s) via `config/config.json`. You add its network\naddress and either a url, an http method, and optionally a content body and\nheaders or a local command to execute.\n\nWhen Dasher starts, it will listen for your button being pressed. Once it sees\nit, it will then make the HTTP request or run the command that you defined for\nit in your config.\n\n## Configuration\n\nYou define your buttons via the `config/config.json` file. It's a simple JSON\nfile that holds an array of buttons.\n\nHere's an example.\n\n```json\n{\"buttons\":[\n  {\n    \"name\": \"Notify\",\n    \"address\": \"43:02:dc:b2:ab:23\",\n    \"interface\": \"en0\",\n    \"timeout\": \"60000\",\n    \"protocol\": \"udp\",\n    \"url\": \"https://maker.ifttt.com/trigger/Notify/with/key/5212ssx2k23k2k\",\n    \"method\": \"POST\",\n    \"json\": true,\n    \"body\": {\"value1\": \"any value\", \"value2\": \"another value\", \"value3\": \"wow, even more value\"}\n  },\n  {\n    \"name\": \"Party Time\",\n    \"address\": \"d8:02:dc:98:63:49\",\n    \"url\": \"http://192.168.1.55:8123/api/services/scene/turn_on\",\n    \"method\": \"POST\",\n    \"headers\": {\"authorization\": \"your_password\"},\n    \"json\": true,\n    \"body\": {\"entity_id\": \"scene.party_time\"},\n    \"formData\": {\n      \"var1\":\"val1\",\n      \"var2\":\" val2\"\n    }\n  },\n  {\n    \"name\": \"Start Cooking Playlist\",\n    \"address\": \"66:a0:dc:98:d2:63\",\n    \"url\": \"http://192.168.1.55:8181/playlists/cooking/play\",\n    \"method\": \"PUT\"\n  },\n  {\n    \"name\": \"Debug Dash Button\",\n    \"address\": \"41:02:dc:b2:ab:23\",\n    \"debug\": true\n  },\n  {\n    \"name\": \"Command Exec Button\",\n    \"address\": \"41:02:dc:b2:10:12\",\n    \"cmd\": \"/home/user/dash_button.sh\"\n  }  \n]}\n```\n\nButtons take up to 8 options.\n\n* `name` - Optionally give the button action a name.\n* `address` - The MAC address of the button.\n* `interface` - Optionally listen for the button on a specific network interface. (`enX` on OS X and `ethX` on Linux)\n* `timeout` - Optionally set the time required between button press detections (if multiple pressese are detected) in milliseconds. Default is 5000.\n* `protocol` - Optionally set the protocol for your Dash button. Options are udp, arp, and all. Default listens to arp. The \"newer\" JK29LP button from ~Q2 2016+ tends to use udp. \n* `url` - The URL that will be requested.\n* `method` - The HTTP method of the request.\n* `headers` - Optional headers to use in the request.\n* `json` - Optionally declare the content body as being JSON in the request.\n* `body` - Optionally provide a content-body that will be sent with the request.\n* `formData` - Optionally add formData that will be sent with the request.\n* `debug` - Used for testing button presses and will -not- perform a request.\n* `cmd` - Used to run a local command rather than an HTTP request. Setting this\nwill override the url parameter.\n\nSetting and using these values should be enough to cover almost every kind of\nrequest you need to make.\n\nYou can find more examples in the [example config](/config/config.example.json).\n\n## Protips\n\nHere are few protips about Dash buttons that will help you plan how to use them.\n\n* Dash buttons take ~5 seconds to trigger your action.\n* Use DHCP Reservation on your Dash button to lower the latency from ~5s to ~1s.\n* Dash buttons are discrete buttons. There is no on or off. They just do a\nsingle command.\n* Dash buttons can not be used for another ~10 seconds after they've been pressed.\n* If your Dash button is using udp, specify it in the button config.\n* Listening over wifi is unreliable. I highly recommend using ethernet, especially  on Raspberry Pi\n\nDash buttons should be used to trigger specific things. I.E. a scene in\nyour home automation, as a way to turn everything off in your house, or\nas a simple counter.\n\n## Setup\n\nYou'll want to set up your Dash buttons as well as Dasher.\n\n### Dash button\n\nSetting up your Dash button is as simple as following the instructions provided\nby Amazon **EXCEPT FOR THE LAST STEP**. Just follow the instructions to set it\nup in their mobile app. When you get to the step where it asks you to pick which\nproduct you want to map it to, just quit the setup process.\n\nThe button will be set up and available on your network.\n\n#### Find Dash Button\n\nOnce your Dash button is set up and on your network, you need to determine its\nMAC address. Run this:\n\n    script/find_button\n\nClick your Dash button and the script will listen for your device. Dash buttons should appear as manufactured by 'Amazon Technologies Inc.'. Once you have\nits MAC address you will be able to configure it in Dasher by modifying `config/config.json` after installing Dasher.\n\n### Dasher app\n\nSimply **install the dependencies** and **clone the repository**.\n\n**note:** You might need to install `libpcap-dev` or `npm` on Linux first.\n\n    sudo apt-get install libpcap-dev\n    sudo apt-get install npm\n\n**note** Raspberry Pi users may need to update node arm which will automatically remove nodejs-legacy. Credit @legotheboss\n\n    sudo apt-get install node\n\n    wget http://node-arm.herokuapp.com/node_latest_armhf.deb \n    sudo dpkg -i node_latest_armhf.deb\n\n**Clone and Set up Dasher**\n\n    git clone https://github.com/maddox/dasher.git\n    cd dasher\n    npm install\n\nThen create a `config.json` in `/config` to set up your Dash buttons. Use the\nexample to help you. If you just want to test the button press, use the debug button example with the MAC address you found running script/find_button. \n\n\n## Running It\n\nListening for Dash buttons requires root. So you need to launch Dasher with sudo.\n\n    sudo npm run start\n\n### Auto Start on OS X\n\nAfter setting it up with `script/bootstrap` just run `script/install` to load Dasher with `launchd`. Dasher will now start on boot.\n\nYou can uninstall it with `script/uninstall` and restart it with `script/restart`.\n\n### Raspberry Pi\n**Having problems running npm install?**\n\nRaspberry Pi users may need to update node arm which will automatically remove nodejs-legacy. One you are on node mainline, force the update to the latest version of node for arm. This may not be needed if you are running a first generation pi. If you are on a Pi and run into problems with npm install, try this. Credit @legotheboss\n\nReplace nodejs-legacy with node and manually update to the latest version of node arm.\n\n    sudo apt-get install node\n    wget http://node-arm.herokuapp.com/node_latest_armhf.deb \n    sudo dpkg -i node_latest_armhf.deb\n\n**Quick Start** Works as of (1/27/17)\n\nStarting from a fresh Raspberry Pi Build? \n\n    sudo apt-get install libpcap-dev\n    sudo apt-get install npm\n\n    sudo apt-get install node\n    wget http://node-arm.herokuapp.com/node_latest_armhf.deb \n    sudo dpkg -i node_latest_armhf.deb\n\n    git clone https://github.com/maddox/dasher.git\n    cd dasher\n    sudo npm install\n\n    sudo ./script/find_button\n    # update /config/config.json with mac address of your button \n    sudo npm run start\n\n**Auto Starting**\n\nAdvanced information on autostarting Dasher on your Raspberry Pi can be found [here](https://github.com/maddox/dasher/wiki/Running-Dasher-on-a-Raspberry-Pi-at-startup).     \n\n## Contributions\n\n* fork\n* create a feature branch\n* open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddox%2Fdasher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaddox%2Fdasher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddox%2Fdasher/lists"}