-
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
[latching relay] adding support for one trigger pin instead of two #18386
Comments
Use a standard Relay with Pulsetime to generate the toggling change |
yes, but then i had to track the state otherwise. |
As @barbudor stated use pulsetime to toggle your relay. Why all the hassle for wanting to know a state where the relay itself not even knows it's state. The current implementation (and the legacy implementation) both use two pins to know a fixed state of the relay. They are the known commercial bi-stable relay solutions too. |
yes, you are right! one trigger for one channel is always the best! but if it isn´t wanted by now, can anybody push me in the right direction to build my own version please? i only do not know how to toggle the first relay again instead of the second... |
There are still possible reasons for it to go wrong but that's your choice With an esp8266 I would go by defining a virtual relay on an unused gpio and a rule set to trigger the actual control pin as a relay with pulsetile If you have an esp32 you could most probably write a driver in berry Making changes in Tasmota that won't be merged is not a good solution as it will require you to maintain this fork on your own and report all changes from the core to get the new features |
Thanks (also for your time)! that´s a good idea! I will try that soon! |
ok, for my case @barbudor has solved my issue. I toggle the relay with a rule watching var1. on both sides i enabled qos2 via mqtt. |
Implemented in latest dev branch (v12.5.0.1) Switch to single pin control using command |
Add command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
Thanks!!! |
Just had a look at this kind of relay modules and must conclude they are NOT real bi-stable relays. They are "normal" relays connected after a flip-flop; when turned on and power is lost they will come back turned off instead of turned on like a real bi-stable relay. The only "bi-stable" feature they have is a single input allowing to toggle the relay by a low pulse of the flip-flop. The current tasmota single-pin implementation stores the last power state and remembers the state after power on. This is probably NOT the state of the fake bi-stable relay after power on. In short, it's a toy needing a different implemtation then the current one..... NOTE: In addition they draw power when turned on (60mA) while a real bi-stable relay only draws power during switching. |
Fix single pin latching relay power on state (#18386)
OK. Fixed in latest dev branch. Single pin latching relay is NOT a two-pin bistable relay. |
PROBLEM DESCRIPTION
Hey! I have this latching relay
I have tasmota 12.4 and configured the esp pin as relay_bi because the relay is triggered by low level. But every time I need 2 clicks to switch the relay. So I need 4 clicks to switch the relay on and off again. Normally I only need 2 impulses to switch it on and off.
i think this topic here is the first to introduce the implementation of a bistable relay.
like @arendst said, i need to configure two configure two pins to switch the relay. My one has only one trigger pin to toggle both states. And there are many other bistable relays that have only one trigger pin.
It would be awesome if there is an option (i.e. setoption or a #define to compile my own build) to toggle such a relay with only one gpio. I know that there is no acknowledgment that the relay is in the right state, but as long as it is not accidentally switched in the boot phase or through incorrect configuration, you don't need it.
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
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
EXPECTED BEHAVIOUR
The ESP is able to toggle a bistable relay (like the device above) with only one gpio (relay_b).
The procedure would be:
Init:
->relay is at state 0
toggling relay:
-> relay is now in state 1
toggling relay to state 0:
SCREENSHOTS
ADDITIONAL CONTEXT
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: