-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ShutterButton hold does not work #21986
Comments
Yes. In the good old days at esp8266 you could define a hold event on a button. I assume the documentation needs an update. As far as I remember I removed the hold event by purpose because most intuitive (like my wife) the user is expediting that the shutter moves as long as they hold and immediately stop on release. There were some side effects I removed the hold on esp32 by purpose. |
I agree that this is the most intuitive for the user and is the behavior I want. However, the issue is, that my shutters do not move while holding the button. |
I believe there is a good desciption in the documentation about this. On this is the shutter STARTS moving with the hold event. Therefore this should not to be too long. otherwhise it feel unnatural. Also there is a option to DISBALE the TASMOTA reset if you holde the button too long. I assume this is also not wanted. |
I am afraid we may not understand each other. I have configured the delay between the hold and the actual sending of the HOLD event to 0.5 seconds:
I have also disabled Tasmota reset on long press:
See the attached configuration and logs I provided earlier with the description. All of this is there. I can even see the HOLD event in the attached logs:
However, no relay is ever engaged while I am holding the button (even if I hold it for a very long time – eg. 30 seconds). |
Here is my button definition MQT: hm/status/ESP_5517A3/RESULT = {"ShutterButton1":"1 100 50 74 100 - - - - -|2 0 50 24 0 - - - - -"} Here the expected behavior works on esp32 |
There should be no difference if you just use button 7 and 8. In the log file the trigger on HOLD gets executed. Quite unsure what blocks the shutter to start. All triggers are met. Does normal one or double click work? |
Yes, single, double, even triple press work. |
Ok, looks like I have to configure it here, too. Absolutely no guess what is wrong. Will do this later afternoon: This sounds so simple and straight forward....... |
regression ACCEPTED. Fix on the way. |
Small explanation: Buttons as long as not defined as shutterbuttons works without problems. As shutterbuttons are defined there is a procedure to give back control if the multipress seems not belong to the shutter. There are several multipress events that reset some settings on 5,6,7 ... presses. The if statement just gives back control already on "4", but this was used to "mark" the hold event. internally it comes as 4 presses. Now it circle back on >4 and not on >3. Tested and worked |
Thank you for the fix and explanation! Will you merge your patch into |
I see you already merged it. 🙂 |
I am still unable to get it working. What does your configuration look like? I double-checked I have the latest development version (14.2.0.4) and everything is set correctly up. I also tried a different pair of buttons that have no ShutterButtons on them. I can see their corresponding SINGLE, DOUBLE, HOLD, and CLEAR events in the console, but no relay would engage. |
This is strange. With the changed version and YOUR shutterbutton config it should look like this when you hold a button. Line 3 MUST be there because in line 2 already on the old version there was this "press cnt 4"
|
@markatom : Can you share some logs and check again. As mentioned it should work with the new version ESP32 only, no changes to ESP8266 |
Here are logs with the same setup (ESP32), development version
|
ShutterButton config:
Status 0:
|
It is clear why it does not work in your file because you did not define the HOLD event on the shutterbutton. Please use the following commands to define the hold event: |
I see, sorry about that. Now I have the correct ShutterButton config, see:
But still, it does not work, see these logs:
|
Hmm, I do not have access to a testbench until monday. I am missing in your logs the section that looks like:
This should get called if the window = 0 and press_counter > 0:
For me it looks like the window=0 does not get met. |
Maybe |
@stefanbode You are right. Any value >= 6 for |
Great thanks for the info. Let me check if there is a reason for it. |
If it can help you, version 12.5.0 works even with |
Yes, this is a known limitation. Maybe @arendst theo has an idea why setoption32 behave different if 5 or below. |
Except if you configure On the other hand, a hold delay of 600mS to detect a hold state look reasonable to me. |
@crllsn : can we close this case or do we need more investigation to get SetOption32 5 working again? |
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions. |
@stefanbode : you can close it. Changed all my configs and SetOption32 6 is reasonably ok. Thanks! |
This limitation has been discussed in arendst/Tasmota#21986 and should be mentioned in the documentation. Although values lower than 6 are uncommon, users should still be aware of this limitation.
PROBLEM DESCRIPTION
I am trying to set up button control for my shutters. Single, double, and triple press commands are working as documented, but I am unable to make the hold command work.
tasmota32_base
withuser_config_override.h
as follows:pcf8574.dat
configuration file looks like this:Configuration used:
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:No rules were used.
Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Hold the button configured using ShutterButton, nothing happens.
EXPECTED BEHAVIOUR
I expect that holding the button should start moving the shutters toward the configured position and stop upon reaching it or upon the button release.
SCREENSHOTS
I have no screenshots to provide.
ADDITIONAL CONTEXT
I have no additional context to provide.
(Please, remember to close the issue when the problem has been addressed)
Thank you for your time and for this wonderful piece of software which Tasmota is!
The text was updated successfully, but these errors were encountered: