andgineer / docker-amazon-dash-button-hack

Amazon Dash Button hack in Docker for Synology
http://masterandrey.com/posts/en/amazon_dash_button/
11 stars 8 forks source link

Double press #6

Closed TheDoudou closed 6 years ago

TheDoudou commented 7 years ago

Detect double press

2017-10-01 16:03:57 | stdout | Event for ifttt: ({'type': 'ifttt', 'value3': '', 'summary': 'white_amazon_dash', 'value1': '', 'value2': ''}) 2017-10-01 16:03:57 | stdout | button white pressed 2017-10-01 16:03:56 | stdout | Event for ifttt: ({'type': 'ifttt', 'value3': '', 'summary': 'white_amazon_dash', 'value1': '', 'value2': ''}) 2017-10-01 16:03:56 | stdout | button white pressed

purplespider commented 6 years ago

I just got this up and running, but also seem to be getting double presses when the button is only pressed once.

andgineer commented 6 years ago

That is possible, depends on your network. May be in future I'll add protection on button press level. Now there is protection only in specific handlers. For example "actions": [ { "restart": 15, means that if events in less that 15 seconds it will ignore them. So you will see double lines in event log but only one record in Google Sheet.

andgineer commented 6 years ago

Add the protection https://github.com/masterandrey/docker-amazon-dash-button-hack/commit/35a26d0a7677c15aff8f8ba2204a908b947e2dd1