-
Notifications
You must be signed in to change notification settings - Fork 639
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
Pushbutton-Switch causes relay to toggle on boot if closed #125
Comments
ESPurna accepts two different button behaviours: pushbuttons (toggle the relay on rising transitions) and switches (toggle the relay on every transition). Currently it does not check the state of the button and it does not enforce the state of the relay to the state of the button because there are other means to change the state of the relay. I mean: you want the relay to follow the state of GPIO14 on boot. But after your step number 3 it does not either. Anyway: what I would do is to add another boot mode that would check the state of the button, so your use case will be satisfied. |
Original comment by Andy Shultz (Bitbucket: SenorShultzy, GitHub: Unknown): Sorry, I can see how my second sentence could've given the wrong idea. I do not want the relay to follow the GPIO. I want exactly what you are describing. Toggle the relay if the GPIO state changes. In my use case, the switch is low at step 2 and stays that way. After reset (Step 4), the relay is toggled even though nothing told it to change. This might be a better example: Expected Behavior:
Actual Behavior:
|
Fixed with version 1.8.0 |
Removing milestone: 1.8.0 (automated comment) |
Original comment by Andy Shultz (Bitbucket: SenorShultzy, GitHub: Unknown): Sorry to say but this is not resolved. I've upgraded to the 1.8.1 and it behaves the same. If the switch is on when the sonoff starts up then the relay toggles. I'll dig in to see if I can fix it on my own. |
Original comment by Andy Shultz (Bitbucket: SenorShultzy, GitHub: Unknown): Unfortunately I have not. I don't lose power or reset my devices much so it hasn't been a high priority. I'll certainly comment here if I do. |
Originally reported by: Andy Shultz (Bitbucket: SenorShultzy, GitHub: Unknown)
I've set up GPIO14 as a switch to activate the relay of a Sonoff basic. The problem I'm having is if the switch is closed when the Sonoff boots the relay will toggle. I would expect it t take the state or of the pin on boot as the base and only toggle if it sees the state change.
For illustration here is my use case:
The text was updated successfully, but these errors were encountered: