I just flashed my tuya shutter switch with openbk7231t and everything is working correctly. but how can I prevent activating both relays at the same time? I need something like the shutter mode in tasmota. or is my only option to replace the WB3S chip with ESP and flash tasmota on it?
but again, if you have a specific use case in mind, I can write a dedicated driver for you, as long as you can explain how is it supposed to work. Show your device configuration, etc.
i tried setting them both to single channel but it still keeps one of them constantly on. i tried the scripting part but that is a bit complicated for me (i do know how to run them)
i'm using a switch like this and i need something like the InterLock setting in tasmota so that none can accidentally fire two relays on the physical touch buttons https://templates.blakadder.com/WF-CS01_EU.html
Wow, now I know how to use "alias" and "backlog", pretty powerful.
If I can suggest a use case to add in your demo, the possible mind changing of a user. (aka: I start to open my shutter but at the mid course I change my mind and decide to close it)
Thanks for your work for developing this firmware which saves a lot of my wifi OT, you rock.
I also need this, and the scripting works, but it triggers the relay before deactivating the second one.
This happens near instantly, but it still means both are on for a split second, does it not?
I cannot use the Rel Rel_n on the same channel, as I have two relays controlling my electric roller blinds going up or down.
I want to either send UP with rel1, or DOWN with rel2, or neither when idle. I do not want to send them either an ON or OFF signal at all times, I want to send no signals when idle (both relays off). I do not want them to ever be ON and OFF at the same time (already fried one relay).
The handler setchannel is my current solution for the time being, but I do hope I can hook something to turn the relay on another channel OFF before turning one ON.
EDIT: This code seems to not be enough, seems like the split moment is enough to break my relay and invert it, broke another one. I think I want a small delay of OFF on both relays before one triggers on, but I am lost as to how to do this on OBK.
I'm working on alternate solution for that - ability to link two pins to single channel and use 3 channel values for disabled, up or down.
Currently working self-test code:
The discussion addresses preventing simultaneous activation of both relays in a Tuya shutter switch flashed with OpenBK7231T firmware. The main concern is to avoid damaging the motor by ensuring only one relay is active at a time, similar to the "shutter mode" or "InterLock" feature in Tasmota firmware. Solutions include configuring relays as single channels with mutual exclusivity or using scripting with event handlers (addChangeHandler) to turn one relay off when the other is activated. An example script in autoexec.bat uses change handlers to enforce interlock behavior by switching off the opposite relay upon activation. Users also shared more complex scripts mimicking original firmware behavior, including auto-cancel timers and button handling. Challenges remain with the brief overlap when switching relays, which can cause hardware damage; a proposed solution involves implementing a delay (dead time) between turning one relay off and the other on, with ongoing development of a PinMutex driver to manage this safely. The discussion includes references to scripting capabilities, demo scripts for shutter control, and integration with Home Assistant for timing relay deactivation. Summary generated by the language model.