-
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
[Shutter] Fix PowerON #22548
base: development
Are you sure you want to change the base?
[Shutter] Fix PowerON #22548
Conversation
Let’s keep this on hold. Here you disable the power switch on restart. May be a good idea if shutters defined and a shutter relay but should not kick in in any other situation. I do not understand why this happens NOW. It was not an issue the last 5 years. |
I think, that this happens since a few month. After a power outage, I recognised it, but I thought it was caused by my hardware module. While testing the UI fix I saw this on the test device (D1 mini with only a shutter configured). On other devices it does not happen. Very crazy. Will do some further tests. |
The normal PowerOn behavior is to restore the old value. This might be a bit bad for a shutter. Therefore you can configure it be OFF on restart. Additionally please be aware INTERLOCK ON is set to avoid crazy stuff of both relay ON |
First: Meanwhile I did some tests. The problem only occurs when shutter is enabled ( Setup for testing:
Observations:
Tested with 14.3.0 and 14.3.0.7. Same behavior in both version and I think it is much older. I enhanced the condition in
When you think, this could be the way, I'll commit it to the PR. |
Thanks for all the investigation efforts. We can curate the symptoms but I would better understand the root cause and fix this. If there is no shutterrelay defined it should not matter is so80 is 0 or 1. why should it mess with relay 1 and 2 if the shutterrelay can also be anything else. this is crazy first. Do both relays go ON even with the interlock defined? I did not get this. It should be absolutely impossible. There is a setoption where Tasmota reads the state of the relay and want to set it. This is default and I disabled it on shutters as far as I remember. |
I totally agree with you to find the root cause. Both relays go ON even when interlock is activated. |
Found this #18670. Same problem also solved with SO63. An integration in the shutter driver is desirable. |
Let's do it in this way. |
Integrate only when USE_SHUTTER is defined
Fix compile error
Before merging this I suggest to move By moving it to FUNC_INIT it is executed AFTER the Initial power state is set. This may well solve the issue observed. Pls give it a try.
|
I tried your suggestion but unfortunately it doesn't solve the problem. |
Description:
I have on some devices, not on all, the problem, that both shutter relais are switches on after power on. This doesn't happen after a software restart. This PR fixes the problem.
@stefanbode: Please have a look at it, if I did it the right way.
Checklist: