Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout for each button #34

Open
vicfergar opened this issue May 25, 2018 · 8 comments
Open

Timeout for each button #34

vicfergar opened this issue May 25, 2018 · 8 comments
Assignees
Milestone

Comments

@vicfergar
Copy link

It would be nice if the timeout affected to each button separatly. Currently, if you press two different buttons at the same time, dasshio addon only sniff one of them.

PD: Btw the addon is very useful it makes really easy to use Amazon Dash buttons within Hass.io Thanks a lot for the effort!!

@danimtb
Copy link
Owner

danimtb commented May 29, 2018

Hi @vicfergar!

Pressing two or more buttons at the same time is a current limitation due to the method this addon uses to scan devices. I guess it could be improved to filter only the macs of the buttons configured and set a timeout for each one.

I will have a look to it! Thanks a lot for the feedback 😄

@danimtb danimtb self-assigned this May 29, 2018
@danimtb danimtb added this to the 0.3.0 milestone May 29, 2018
@vicfergar
Copy link
Author

Thanks it will be great!

@danimtb
Copy link
Owner

danimtb commented Jul 18, 2018

Finally this was reverted from 0.3.0 as there were other major issues. Will delay it for next release

@danimtb danimtb modified the milestones: 0.3.0, 0.4.0 Jul 18, 2018
@vicfergar
Copy link
Author

No problem @danimtb you did a great work! Thanks for the effort!

@maur54
Copy link

maur54 commented Jul 19, 2018

Hello
i discovered today that not only two buttons dont work if pressed at the same time, but also if are pressed in the interval of timeout.

In other word if you press un button, al the other buttons are disbled for the timeout interval (in my case 10 seconds)

Is there any solution to this problem?
my idea is to use many dash buttons in my appartament for different function but i think that in the life of all the the days will be a problem....

Maurizio
(sorry for my poor english)

@maur54
Copy link

maur54 commented Jul 20, 2018

Hello
today perhaps i found a solution
-timeout = 0 and two buttons: 1 for on, 1 for off

in config
"service": "turn_on",
......
"service": "turn_off",

i tried it and it seems a solution

Maurizio

@danimtb
Copy link
Owner

danimtb commented Jul 23, 2018

@maur54 be careful because this could lead to "toggling" issues if you press one button just after the other. This is the exaplanation:

Amazon Dash buttons are always disconnected from wifi. When you press the button it gets connected to wifi and sends the amazon request to buy an item (this last part shoudl NOT be configure if you are using dash buttons with Home Assistant -unless you want to buy an amazon item too 😆-).

Dasshio detects the press o the button by monitoring the network and looking for devices MAC address.

When a button is pressed, it will get connected to wifi until it goes to sleep again. That usually takes 5 seconds.

Let's say you are pressing the ON button and before 5 seconds you press the OFF one. Dasshio will detect both buttons connected and perform several service calls producing a toggling effect in your light.

Will try to implement this feature soon. Thanks

@e2m32
Copy link

e2m32 commented Aug 10, 2018

I've been testing this code for a week and it has been working well: e2m32@34b9580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants