-
Notifications
You must be signed in to change notification settings - Fork 1
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
Button sends sometimes two requests -> Toggling on and off right after #6
Comments
There is already a 5 second debounce implemented (see pophttp.py#L44 and the comment explaining the The code for it looks fine to me but I can test it out in a day or 2. You can also try increasing the timeout to something like 10 seconds on line 44 there if you want to play around with it yourself, but given you're suggesting a 3 second debounce I'm guessing that won't help whatever problem you're having. Just to confirm, have you tried running it with |
Thanks for the comment. Sorry I wasn't aware there was already a 5 second debounce - hence my purely arbitrary 3 seconds approach. Server started on on 0.0.0.0 I press only 3 times and was waiting approx 5 seconds between each press. Thanks PS: I have 2 bridges. |
That sure looks like the 5s debounce isn't working properly. I'll have a proper look at it in the next day or 2 to see if I can figure out what is going on. |
I think this should be fixed in the latest version. I only have a single bridge to test with, but tried to guess what would be happening. If it still isn't resolved in the latest version then please run it with with |
Thanks for the update. It did fix the issue so far. I will continue to test, but one thing that I keep doing is when I do double-press the response is sometimes like a single press. If you tell me that is purely beeing doing by the logitech device then it is me beeing unable to press double correctly:). I just wanted to post some logs here - it keeps sending all of these lines from the two devices I guess: `/opt/pophttp# python pophttp.py -vvvv 2020-10-20 12:35:03,445 192.168.1.229 recv Light_Get() (header(size=36, protocol_and_flags=13312, source=1768386412, target='\x00\x00\x00\x00\x00\x00\x00\x00', site='\x00\x00\x00\x00\x00\x00', acknowledge=2, sequence=213, timestamp=0, code=101, reserved=0)) 2020-10-20 12:35:06,861 192.168.1.227 recv Light_Get() (header(size=36, protocol_and_flags=13312, source=1768386412, target='\x00\x00\x00\x00\x00\x00\x00\x00', site='\x00\x00\x00\x00\x00\x00', acknowledge=2, sequence=245, timestamp=0, code=101, reserved=0)) 2020-10-20 12:35:07,484 192.168.1.229 recv Light_SetPower(level=65535, duration=1000) (header(size=42, protocol_and_flags=5120, source=1768386412, target='\x00\x00\x00\x00\x00\x00\x00\x00', site='\x00\x00\x00\x00\x00\x00', acknowledge=2, sequence=215, timestamp=0, code=117, reserved=0)) ^CTraceback (most recent call last): ` Thanks |
When you say when I do double-press the response is sometimes like a single press, do you mean 2 quick presses of the pop button to trigger the double press action, or do you mean that you press it once, the light turns on, then you press it again only a second or 2 later to turn the light off again? If it is the former, then that is entirely the pop button itself that detects the single/double/long press action and outside of my control. You can test this from the Logitech POP app by going to the Control tab and double tapping the virtual button in question in the app. It should show 2 dots on the button indicating that it detected the double tap on your phone and you can then verify that this pophttp is working as expected. I've noticed with my pop buttons that 2 very quick presses is registered as one, and that you have to have a short pause between the 2 presses. If it is the latter then there is presumably still a usability issue with the script. |
Hi, just wanted to say yes I tried with the App and I think it is really a usability issue on my side. With the App all commands send are perfectly translated in the pophttp tool - thanks. So probably why sometimes the button press is not recorded is purely on the button - received side, outside of your command. I still think the button look great, just sometimes it seems the connect to the hub is not always maintained. You have no hacked or found any way to the hubs to optimize settings? Else I just wanted to say - thanks for the great work. |
I had issues previously when the pop bridge was too far away from the buttons (about 8m / 26ft, going through a floor and a wall or a few walls) but moving the button to the middle of my house resolved it for me so it is now no more than 6m / 20ft away and no more than 1 wall. |
Hello,
Great little tool as I love the Pop Buttons, but want flexibility.
My problem is that quiet often I press the button and the light turns on then shorty after off again. I normally use "toggle" modes. It seems that either the request is beeing repeated/executed twice. Is there a way to say for lets say 3 seconds one button press will only call the http request once?
It happens even more often when I have two logitech bridges in the network.
Thank you
The text was updated successfully, but these errors were encountered: