hortinstein / node-dash-button

A small module to emit events when an Amazon Dash Button is pressed
949 stars 94 forks source link

Feature Request: Build Exclusion List #36

Closed brandondrew closed 8 years ago

brandondrew commented 8 years ago

I've found it to be very frustrating to try to isolate the proper MAC address of my Dash button—there are so many appearing, and there seems to be enough of a delay between pressing the button and a MAC address appearing that I can't figure out which one belongs to the Dash button.

I think it could be made very easy if bin/findbutton would ask you to first refrain from pressing the button for the first (say) 2 minutes, so it could gather a list of MAC addresses that it knows it can ignore. Then, once it has this list, it could ask you to press the button, but first to hit a key just before you press the button, so it knows when to start accepting new MAC addresses.

By narrowing down the time when a correct MAC address may appear, and by first building a list of known bad MAC addresses, it should be possible to make it very easy to find the correct one.

hortinstein commented 8 years ago

i may just add in the default behavior where it only shows each unique MAC once and possibly how many times it has seen it, so it would be easier to see presses. Would that be better? Would also be a simple pull request if you want to add the functionality :-)

a3qz commented 8 years ago

@hortinstein If you take a look at the pull request #35 I submitted a few days ago, I built into findbutton a feature where it displays the manufacturer of the device next to the MAC address, which makes it much more trivial to identify which of the addresses belongs to your button. Additionally, though I did not leave it in the implementation I submitted, I tested and discovered that is quite trivial using this information to limit the addresses displayed to only Amazon devices, which would make it even easier to identify your button. Thoughts?

brandondrew commented 8 years ago

@a3qz: That would be a huge help.

brandondrew commented 8 years ago

@hortinstein I don't actually think it would help to show each MAC address only once. You'd want to be able to press the Dash button multiple times and see some response after each time. This is especially important given that there is a delay between pressing and the address appearing, because of the need for the device to turn on and send out the DHCP request.

hortinstein commented 8 years ago

merged #35 and published to npm thx for the help!

a3qz commented 8 years ago

Of course!