FAQ
TL;DR: To stop two relays energizing together, use a 100 ms dead time and “link two pins to a single channel.” For OBK/OpenBK7231T shutter switches, start with the PinMutex driver or a simple interlock script. [Elektroda, p.kaczmarek2, post #21594298]
Why it matters: Split-second overlap can damage shutter relays; enforced interlock protects motors and power supplies.
Quick Facts
- Scripted interlock: add change-handlers so when Relay A turns ON, Relay B turns OFF, and vice‑versa. [Elektroda, p.kaczmarek2, post #20414125]
- PinMutex driver: setMutex 0 0 100 10 11 adds a 100 ms dead time and 3-state control (disabled/up/down). [Elektroda, p.kaczmarek2, post #21594298]
- WF-CS01_EU reference: 5 LEDs, 3 buttons, 2 relays confirmed working with OBK scripts. [Elektroda, maliciamrg, post #20433363]
- Typical safety timings: 34 s travel auto‑off and 5 s cancel auto‑reset used in scripts. [Elektroda, maliciamrg, post #20433363]
- Risk alert: Momentary overlap can invert or destroy a relay; avoid ON+ON transitions. [Elektroda, spleefer90, #21587087
How do I prevent both relays from turning on at the same time in OpenBK/OpenBK7231T?
Use an interlock script in autoexec.bat (LittleFS). Add change-handlers so each relay forces the other OFF when it turns ON. Example logic: when Channel0 becomes 1, set Channel1 to 0; when Channel1 becomes 1, set Channel0 to 0. This mimics a mutual exclusion latch without extra hardware. It’s simple, fast, and suitable when you only need immediate opposite-off behavior. [Elektroda, p.kaczmarek2, post #20414125]
Is there a built-in way to add dead time between UP and DOWN?
Yes. Use the PinMutex driver to bind two output pins to one channel with a configurable dead time. Example: setMutex 0 0 100 10 11 adds 100 ms where both outputs are OFF before switching directions. The channel becomes 3-state: 0=disabled, 1=up, 2=down. This guarantees no overlap during reversals and protects relays and motors. [Elektroda, p.kaczmarek2, post #21594298]
Does the simple script ever energize both relays for a moment?
It can, because the off and on actions race. One user observed a near-instant overlap that still damaged a relay. That edge case appears when changing direction quickly. Use PinMutex to enforce an OFF dead time before the new direction turns ON. This eliminates split-moment simultaneous activation and stops relay inversion issues. [Elektroda, spleefer90, post #21587087]
Can OpenBK mimic Tasmota’s InterLock?
Yes. The two change-handlers provide the same behavior. A user confirmed, “this is the same as the interlock from tasmota and works like a charm.” Use the script for mutual exclusion, and let your automation platform handle timing if needed. [Elektroda, hoezyhoest, post #20414151]
How do I configure the PinMutex driver?
- Run: startDriver PinMutex.
- Link your channel and pins with dead time: setMutex 0 0 100 .
- Drive the channel: setChannel 0 1 for UP, setChannel 0 2 for DOWN, setChannel 0 0 for idle.
This ensures both relays are OFF during the 100 ms transition window. Adjust the delay to match your hardware. [Elektroda, p.kaczmarek2, post #21594298]
Why doesn’t the Rel/Rel_n single‑channel method suit roller blinds?
Mapping both relays to one channel with Rel/Rel_n can leave one relay constantly ON. A user reported that outcome after trying the single-channel approach. Blinds need an idle state with both relays OFF, then a safe, exclusive UP or DOWN. Use PinMutex or a script that explicitly returns to idle. [Elektroda, hoezyhoest, post #20414102]
When should I use Rel and Rel_n on one channel?
Use Rel/Rel_n when you need simple mutual exclusion on one logical channel, and a constant ON state is acceptable for the load. Set one output to Rel and the other to Rel_n, mapped to the same channel. They will not be ON simultaneously, but consider idle behavior for your device. [Elektroda, p.kaczmarek2, post #20413848]
How do I add a travel timeout and a cancel button?
Add change-handlers that schedule an auto-off after the movement starts, plus a cancel button that stops motion and clears timers. Example values used: 34 s auto-off for travel and 5 s auto-reset of the cancel button. Also cancel any pending travel timers when cancel is pressed. These patterns protect motors from overrun. [Elektroda, maliciamrg, post #20433363]
How do I set a night LED and a long‑press toggle?
Set a startup LED value and add a hold event to toggle it. For example, SetStartValue on the LED channel enables a default state at boot. Then add an OnHold event that calls ToggleChannel on that LED channel. This recreates the OEM night-light behavior alongside your interlock logic. [Elektroda, maliciamrg, post #20433363]
Will Home Assistant timing work alongside the OBK interlock?
Yes. You can let Home Assistant handle timing while OBK handles safety interlock. A user confirmed using HA to time the relays, with the OBK script solely preventing accidental dual activation. This separation of concerns works well for blinds. [Elektroda, hoezyhoest, post #20414151]
How can I safely reverse direction mid‑travel?
Use PinMutex so both outputs go OFF for the configured dead time before changing direction. Dead time, such as 100 ms, prevents overlap and protects relays when users change their minds mid-course. “Dead time” enforces off-before-on, even during rapid toggles. [Elektroda, p.kaczmarek2, post #21594298]
How can I insert a delay in a script before switching relays?
Use a repeating event with a single count to schedule a delayed action. For example, addRepeatingEvent 1 SetChannel 0 turns a channel OFF after a delay. Chain this with a second action to switch the other relay after the off-delay. This creates a scripted dead time. [Elektroda, p.kaczmarek2, post #20414125]
Is there a demo shutter script I can study?
Yes. The developer posted a prototype/demo script that models shutter behavior in the project’s self-test area. It shows aliases, backlogs, and control flow for safe operation. Review it to adapt patterns to your device and channel mapping. [Elektroda, p.kaczmarek2, post #20433374]
Can I submit my script as a demo to the project?
Yes. The maintainer encouraged contributions: “you could submit it as another demo/self test (in separate file) via pull request.” Package your script and open a PR to share it with others. This helps standardize safe shutter control. [Elektroda, p.kaczmarek2, post #20433581]
Can I request a dedicated shutter driver?
Yes. The maintainer said, “I can write any driver for you if you want,” and asked for clear requirements. Share your wiring, channel plan, and desired behavior. A tailored driver can embed interlock and timing in one place. [Elektroda, p.kaczmarek2, post #20413848]
Is there a simplified setup using the new mutex driver?
Yes. A user confirmed the new mutex driver avoids simultaneous triggering and requires only a fraction of the scripting. It links both directions to one channel safely. Use it to replace complex interlock scripts with a concise configuration. [Elektroda, spleefer90, post #21599659]