FAQ
TL;DR: Set up the Tuya Sprycle on OpenBeken with a 10‑second auto‑off script; "You can very easily configure device to open and close the relay after given time." Example commands and clock events are provided. [Elektroda, p.kaczmarek2, post #20993719]
Why it matters: This FAQ helps DIYers configure safe, local, automated irrigation on Tuya/BK7231N or CBU versions with clear pin maps and scripts.
Quick Facts
- Original hardware: BK7231N on CB3S, model FJKW001J‑B; a working OpenBeken JSON template, image, and wiki links are provided. [Elektroda, p.kaczmarek2, post #20989346]
- Template pins (CB3S): P9=Btn;0, P14=Rel;0, P24=LED;1, P26=Rel;1 for valve control and status. [Elektroda, p.kaczmarek2, post #20989346]
- Typical motor run: ~2–3 seconds per open/close cycle; use auto‑off scripting to protect the drive. [Elektroda, andrewmarkcongdon, post #20987824]
- New revision: CBU module, LED now red; firmware 1.0.0 patched (no Cloudcutter); serial flashing OK; pinout changed. [Elektroda, piotrszulc1, post #21512504]
- Observed soil‑moisture setup: Zigbee sensor via ZBDongle‑E posts to MQTT for closed‑loop; battery life about one week. [Elektroda, andrewmarkcongdon, post #21005974]
How do I configure the Tuya Sprycle timer with OpenBeken?
Map the GPIOs in the OBK Web App, then add a simple alias plus addRepeatingEvent to auto‑turn off a channel after a delay. Use clock events if you need time‑based schedules. The post includes example commands and a YouTube walkthrough for creating autoexec.bat. [Elektroda, p.kaczmarek2, post #20993719]
What are the GPIO pins for the CB3S/BK7231N version?
Use the provided template: P9 as Btn;0, P14 as Rel;0, P24 as LED;1, and P26 as Rel;1. This maps the push‑button, two relay channels for valve control, and the status LED. Load the JSON in the OBK Web App to apply the roles quickly. [Elektroda, p.kaczmarek2, post #20989346]
How can I stop the motor after 2 seconds to avoid stalling?
Create aliases that trigger addRepeatingEvent 2 1 to set the active relay channel back to 0. Andrew shared a working snippet that starts flow, lights the LED, then turns the relay off after about two seconds. This protects the motor and battery. [Elektroda, andrewmarkcongdon, post #21000601]
How do I mirror valve state on the LED and toggle with the button?
Assign LED as a separate channel (e.g., Channel 2) and the button as Btn;3 so it toggles a channel. Use aliases to setChannel 2 to match valve state and addChangeHandler to react to Channel0/1 changes. Andrew’s example shows this pattern in action. [Elektroda, andrewmarkcongdon, post #21000601]
Can I control the valve via MQTT for remote scripts?
Yes. Publish MQTT commands that setChannel 0/1 to drive the two relay channels. Andrew confirmed he can change Channel 1 and 0 using MQTT, enabling remote closed‑loop scripts. Keep auto‑off handlers in place for safety. [Elektroda, andrewmarkcongdon, post #21000601]
Where can I get a ready OpenBeken JSON template for this timer?
Use the template posted in the thread. It lists vendor Tuya, model FJKW001J‑B, chip BK7231N, board CB3S, image link, wiki, and exact pin roles. Import it via the OBK Web App to speed setup. [Elektroda, p.kaczmarek2, post #20989346]
I can’t find Tuya JSON in the firmware—how do I proceed?
That firmware dump lacks Tuya JSON. Inspect the PCB to determine GPIO roles and assign them in OBK. The author suggests using GPIO doctor to aid discovery. Once mapped, you can script behavior normally. [Elektroda, p.kaczmarek2, post #20892240]
Do I need a safety script to protect the motor?
Yes, add an auto‑off. “This may require some script to turn off relay after 2 or 3 seconds but it’s easily doable with OBK.” Use addRepeatingEvent to enforce short activations. This prevents overrun and reduces wear. [Elektroda, p.kaczmarek2, post #20892300]
Is there a new CBU hardware revision, and what changed?
Yes. A new version uses CBU, has a red LED, and Tuya reports firmware 1.0.0. The firmware is patched, so Cloudcutter will not work. You can still open it and flash over serial. The pinout also changed. [Elektroda, piotrszulc1, post #21512504]
How should I configure pins on the CBU version?
Use P17 for the button (inverted), P26 for the red LED, and P7/P6 for on/off relays. Configure the relay pair with the bridge driver, as noted by the contributor. Validate behavior before running automated scripts. [Elektroda, piotrszulc1, post #21512504]
How do I create and load an autoexec.bat in OpenBeken?
- In the OBK Web App, set pin roles, then open the Console.
- Add aliases and addRepeatingEvent or clock events to autoexec.bat.
- Save, reboot, and verify via logs or LED/relay behavior.
Example code and a YouTube walkthrough are linked in the post. [Elektroda, p.kaczmarek2, post #20993719]
Can I close the loop with a Zigbee moisture sensor?
Yes. A user paired a Zigbee moisture sensor with a ZBDongle‑E and published readings to MQTT, enabling simple closed‑loop scripts. Expect about one week of battery life in that setup, so plan maintenance or power optimizations. [Elektroda, andrewmarkcongdon, post #21005974]
Can I still operate the valve manually while using scripts?
Yes. Manual on/off works alongside your scripts. One user ran manual control first, then added a 2–3 second toggle script next. You can iterate safely: verify manual actions, then enable auto‑off logic. [Elektroda, andrewmarkcongdon, post #20993554]