{"id":16669692,"url":"https://github.com/atoomic/amazon-dash-button","last_synced_at":"2025-09-13T06:45:30.122Z","repository":{"id":56829936,"uuid":"80652298","full_name":"atoomic/Amazon-Dash-Button","owner":"atoomic","description":"a very simple perl interface to play \u0026 interact with an Amazon Dash Button.","archived":false,"fork":false,"pushed_at":"2019-06-05T19:54:30.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T00:45:55.670Z","etag":null,"topics":["amazon","button","dash","dash-button","perl","perl5"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atoomic.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-01T18:51:07.000Z","updated_at":"2019-06-05T19:54:32.000Z","dependencies_parsed_at":"2022-08-28T21:11:39.250Z","dependency_job_id":null,"html_url":"https://github.com/atoomic/Amazon-Dash-Button","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atoomic/Amazon-Dash-Button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoomic%2FAmazon-Dash-Button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoomic%2FAmazon-Dash-Button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoomic%2FAmazon-Dash-Button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoomic%2FAmazon-Dash-Button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atoomic","download_url":"https://codeload.github.com/atoomic/Amazon-Dash-Button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoomic%2FAmazon-Dash-Button/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274929909,"owners_count":25375712,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","button","dash","dash-button","perl","perl5"],"created_at":"2024-10-12T11:34:55.878Z","updated_at":"2025-09-13T06:45:30.104Z","avatar_url":"https://github.com/atoomic.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\nAmazon::Dash::Button - a very simple perl interface to play \u0026 interact with an Amazon Dash Button.\n\n# VERSION\n\nversion 0.11\n\n# DESCRIPTION\n\nAmazon::Dash::Button allows you to discover your mac address button and\nset a listener to run any custom actions when the button is clicked...\n\nHere is a non exhaustive list of ideas, applications you can think about:\n\n- control your music player (provide an example for mpd: Music Player Daemon)\n- silent doorbell which send a notification (text, email, ...)\n- order your favorite pizza\n- switch on/off the light\n- open the garage door\n- ...\n\nFeel free to complete this list, and submit more ideas.\n\nThis can be used on a Raspberry Pi, linux, mac os computer...\nIn order to properly listen to packets you would need to run it as root using 'sudo' \n\n# Setting\n\n## Linking the button to your wifi network\n\nThe first thing to do once you have received your button is to set it and discover it.\nHere is the basic setting process:\n\n- use your phone or table to perform the basic setting, but do not complete it, stop when asking to select to link a product with the button.\n- in the mobile app you would find a menu \"Your Dash Button\" -\u003e \"Settings\" then \"Set up a new device\".\n- choose your dash device, then follow the instructions: long press on the button until it discovery mode (blue light)\n- provide the wifi password of your network\n- but do not select the exact product linked to your button exit from there !\n\n## Detecting the button\n\nAmazon::Dash::Button comes with one search method which allows you to look for your device.\nYou mainly want to know the mac address of your button\n\n### \\* from the command line\n\nYou can use the sample scripts provided in the distribution to detect your button.\nThe button should be listed as one of the Amazon device, as shown in the sample below:\n\n                \u003e sudo ./examples/search.pl\n                \u003e sudo ./examples/search.pl eth0\n                Password:\n                # using filter: arp or ( udp and ( port 67 or port 68 ) )\n                # listening on device: en0\n                # using cache Yes\n                ARP - Mac Address = c8:b1:ce:bb:a3:1c\n                ARP - Mac Address = 36:07:8d:ab:61:b7\n                ARP - Mac Address = a6:5e:88:28:d2:9f\n                ARP - Mac Address = e9:97:12:9e:38:56\n                ARP - Mac Address = 68:54:b5:41:69:9c - Amazon device\n\n### \\* oneliner\n\nOr simply opt for one of the oneliner below to search for your buttong\n\n                perl -MAmazon::Dash::Button -e 'Amazon::Dash::Button-\u003esearch()'\n\nyou can also provide your own filter to look for your button.\nBy default it's using udp and arp lookup which should cover most of the buttons.\nDepending on your button generation and software version it might use one or the other.\n\nYou will find several options to use with the search function there, in order to run it \nas a oneliner, simple replace 'YOUR RULE HERE' with the rule you want to use.\n\n                perl -MAmazon::Dash::Button -e 'YOUR RULE HERE'\n\n                # this is the default rule\n                Amazon::Dash::Button-\u003esearch( filter =\u003e q{arp or ( udp and ( port 67 or port 68 ) )} );\n\n                # only look on udp\n                Amazon::Dash::Button-\u003esearch( filter =\u003e q{'udp and ( port 67 or port 68 )} );\n\n                # remove more noise using cache (by default disabled), one mac address is only displayed once\n                Amazon::Dash::Button-\u003esearch( cache =\u003e 1 );\n\nYou can also specifiy the network device to use to listen depending \nif it's a wifi or cable ethernet connection use one or the other.\n\n                # search on a specific device\n                Amazon::Dash::Button-\u003esearch( dev =\u003e q{en0} );\n                Amazon::Dash::Button-\u003esearch( dev =\u003e q{eth0} );\n\n# Usage\n\n## Manage a single button\n\nCreate one object and call listen on it.\n\n                Amazon::Dash::Button-\u003enew( from =\u003e {\n                        # required options\n                        mac     =\u003e '00:11:22:33:44:55',\n                        onClick =\u003e sub { print q{Got a Click !} },\n                        #... optional options\n                        #name =\u003e q{Your Button Name},\n                        #timeout =\u003e 5, # in seconds\n                        #_fork_for_onClick =\u003e 1, # run the onClick in a forked process\n                        } )-\u003elisten;\n\n## Add more than a single button to the same listener\n\nYou can chain multiple button declaration using the add fucntion.\n\n                Amazon::Dash::Button-\u003enew()-\u003eadd(\n                        mac     =\u003e '00:11:22:33:44:55',\n                        onClick =\u003e sub { ... },\n                        )-\u003eadd(\n                        mac     =\u003e 'aa:11:22:33:44:66',\n                        onClick =\u003e sub { ... },\n                        )-\u003eadd(\n                        mac     =\u003e 'bb:11:22:33:44:77',\n                        onClick =\u003e sub { ... },\n                        # ... you can add as many button as you want\n                        )-\u003elisten();\n\n## Options when creating a new Amazon::Dash::Button object\n\nHere are some options when creating a button listener\nSame as for search you can add a filter to listen.\n\n                Amazon::Dash::Button-\u003enew( from =\u003e ...,\n                        dev     =\u003e q{eth0},\n                        filter  =\u003e q{'udp and ( port 67 or port 68 )},\n                        timeout =\u003e 5, # ignore any further clicks in the next 5 seconds\n                 )-\u003elisten();\n\n# Basic installation process\n\nHere are some basic steps to install it on a Raspberry Pi for example:\n\n        apt-get install libpcap0.8\n        apt-get install libpcap-dev\n        cpanm Amazon::Dash::Button\n\nThe git repo also provides a very basic systemctl service\n\n        cd systemctl/\n        # adjust the path to your perl script then\n        sudo make install\n\n# Continuous Integration\n\nTravis CI status: [![Build Status](https://travis-ci.org/atoomic/Amazon-Dash-Button.svg?branch=master)](https://travis-ci.org/atoomic/Amazon-Dash-Button)\n\n# CONTRIBUTE\n\nYou can contribute to this project on github [https://github.com/atoomic/Amazon-Dash-Button](https://github.com/atoomic/Amazon-Dash-Button)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoomic%2Famazon-dash-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatoomic%2Famazon-dash-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoomic%2Famazon-dash-button/lists"}