-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Exception using physical shutter buttons. Fixed [v12.0.2.2] #15825
Comments
Hello Backlog Template; Module; GPIO 255
Backlog Rule1; Rule2; Rule3
Status 0 Tasmota 11.1.0
weblog 4 Tasmota 11.1.0 button close pressed
status 0 Tasmota 12.0.2
Exception Tasmota 12.0.2 button close pressed |
Hello,
Backlog Rule1; Rule2; Rule3
Usage of pysical button (with toggle funbction)
Opening/Closing from webgui or via HA works as usually. |
@stefanbode Can you help? |
Hello, same here with an ESP32 with tasmota32. By the way, the problem still exists in tasmota 12. In my config I have only one button for the shutter - 1 buttonpress opens the shutter, a double buttonpress closes the shutter. Of course it is quit simple to use 2 buttons with the same idea I describe in the following. As a quick and very dirty workarround I have done the following:
this are my other important configs so fare:
After that you will have an approximately same function as with shutterbutton when you setup rules like the following:
Whats missing so fare is, that shutter stops when pressing the button while shutter is moving. That could be implemented within rules too when using vars, but I hope the error is fixed soon in tasmota and for the time being the "dirty workarround" will work for me. |
Hi gents. I'm currently On Holiday and back in July. There is no visible change that this function is now broken. |
I already pinged @arendst what has changed on 12 that may cause the exception. The driver itself was not changed between 11 and 12 as far as I know. |
For me the problem was existing in 11 too. I updated from 10 to 11 the other day and didn't found the error directly because the button in my config is for backup reason and I hadn't test it after the update directly. Some days ago I found the error in 11 and tried to update to 12. The error was still there. A downgrade to 11 doesn't helped, a downgrade to 10 makes functioning the button again as expected. I will stick with 12 because of some changes that I am happy about - and my workarround is working good enough for something I use for backup reason... |
Sorry, I have no shutters. Form the entries here one could conclude the error occurs on both ESP8266 and ESP32 ruling out SDK and Core software. It's also intermittent but alway results in exception 29 on different addresses. The ESP32 one could shine more light on the cause:
where For the ESP8266: So I fear the issue is in the shuttercode. As Stefan is on holiday I'll have a look in the driver and try to understand what's going on... |
I see some code trickery I don't like:
I guess calling I need to simulate shutters..... |
Maybe its helpful. I have seen, that self compiled versions of tasmota seems to be more vulnerable concerning to the button problem. I have tried precompiled versions from tasmotas ota section and have seen at first no error. When i pressed the button at least 20 times the error pops up sometimes. With a self compiled version I get the error directly and everytime I press the button. For testing purpose I have only changed the platformio_override.ini -> default_envs from "tasmota" to "tasmota32" when compiling. Compiling environment is vscode and plattformio - both installed cleanly in a virtual machine. |
Fix shutter No valid JSON messages (#15825)
Nice exception decoding problem solving using the
My shutter testbed :-) |
Nice small motors 😁 |
Thanks, it works for me as it should
many thanks for all the work |
Issue is resolved. Thanks for your awesome work Theo. And well done buying those shutters on such short amount of time 😉 |
.... many thanks for the quick fix and perfect work. I just flashed the device in question and it works like charm!!
|
Thanks Theo for fixing. For me it looks like I never have the chance to find it on my own. Regarding the loop() I will take care after holiday. |
The prestart is a requested option to execute a rule before a shutter operates. E.g. release a lock or power up additional hardware. The rule should execute always before a shutter start moving or change direction. |
As rules are processed async the current solution seems to be right. The problem is that a lot is happening in the loop other than rule processing so havoc is near. We have to find a better way to directly handle these limited preprocess actions. To start off document all known preprocess actions. |
Having thought it over I think if a user needs to do stuff before the shutter can move he will need to put the whole action into a rule instead of allowing the rule to act within the shutter code. That way Tasmota will stay in a safe mode without unexpected things that can happen. So de-couple the up/down buttons and let it execute a rule event ending in the shutter move. The current 10 seconds delay (doing the loop()) is then also gone. |
thanks for solving this issue Arend, took my a couple of hours to find out .. :-) |
PROBLEM DESCRIPTION
In Tasmota 11.0.0 the physical buttons of my shutters (using the default DS-102 2 button template) the shutters would go up / down using a custom configuration ({"ShutterButton1":"1 100 50 74 100 - - - 1 1|2 0 50 74 100 - - - 1 1"}). Yesterday I've upgraded all my Tasmota devices to 12.0.1 and noticed the physical shutter buttons would not function anymore. Pressing the "close" button, the shutter whould move for a tiny bit of a second, then the led starts blinking blue/red and the device is restarted. Pressing the "open" button would not do anything at all.
REQUESTED INFORMATION
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Make sure the sutterbuttons are setup as:
{"ShutterButton1":"1 100 50 74 100 - - - 1 1|2 0 50 74 100 - - - 1 1"}
EXPECTED BEHAVIOUR
The shutter moving up or down without an exception.
The issue is resolved settting up the buttons as follow:
Backlog Shutterbutton1 up; Shutterbutton2 down;
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: