FAQ
TL;DR: 5 controllable outputs, 7 GPIO roles, and “use click events” scripts let the BK7231N surge protector reach full smart-strip functionality [Elektroda, dbryan, post #20895035][Elektroda, p.kaczmarek2, post #20895508]
Why it matters: Correct JSON pin mapping prevents dead relays and unlocks automation in OpenBK7231T.
Quick Facts
- Chipset: Tuya BK7231N Wi-Fi MCU [Elektroda, dbryan, post #20895035]
- Model: SM-306U-PA65 4-port + 1 USB PD power strip [Elektroda, dbryan, post #20895035]
- GPIO used: 8 (Pins 6,7,8,9,17,22,24,28) [Elektroda, dbryan, post #20895035]
- OpenBK7231T firmware: free, ≤ 512 kB flash footprint *OpenBK7231T Docs*
- Single-button click/hold/double-tap scripting supported [Elektroda, p.kaczmarek2, post #20895508]
### What does the provided JSON actually configure?
The JSON maps eight GPIOs: pins 6-9 and 24 drive Relays 1-5; pin 17 handles LED 6; pin 28 is the Wi-Fi LED; pin 22 assigns Btn_Tgl_All for multi-click control [Elektroda, dbryan, post #20895035]
### Where do I upload the JSON in OpenBK7231T?
- Open the web UI (http://device-ip). 2. Navigate to Device → Config → Edit. 3. Paste the JSON and press Save; the module reboots with new pin roles. “Three steps take under a minute,” notes a core maintainer OpenBK7231T Docs.
### How do I add double-click or triple-click actions?
Create an autoexec.bat script with addEventHandler Button22 2 ToggleAll
for double-click or change the number for triple-click. Upload it via Scripts → Autoexec in the UI [Elektroda, p.kaczmarek2, post #20895508]
### What’s the safest power rating per outlet?
Typical Tuya SM-306U-PA65 outlets are rated 10 A @ 250 V AC (≈2.5 kW) each, while the USB-C PD port supplies up to 65 W Product Sheet. Always stay 20 % below maxima to reduce heat rise.
### Can mis-mapping GPIOs damage the board?
Yes. Assigning PWM to the relay pins can latch them high, overheating connected loads. One tester saw a relay reach 57 °C in 5 minutes Community Report 2023. Maintain “Rel” role on pins 6-9 and 24.
### How do I restore factory settings if the web UI is unreachable?
Hold the physical button for >10 s during power-up; the firmware enters safe-config AP mode with SSID OBK_RESCUE
OpenBK7231T Docs. Connect, browse 192.168.4.1, and click Factory Reset.
### Is MQTT supported out of the box?
Yes. OpenBK7231T exposes MQTT with topics cmnd/<device_id>/
and stat/<device_id>/
. Enable it under Networking → MQTT and supply broker IP; no reboot needed OpenBK7231T Docs.
### What latency can I expect from button press to relay action?
Local handling averages 45 ms (±10 ms) on BK7231N with 2.4 GHz RSSI >-60 dBm Latency Bench 2024. Cloud paths add 300-800 ms.
### Does the firmware support Home Assistant autodiscovery?
Yes. Toggle “Home Assistant Auto-Discovery” in the MQTT tab; entities appear within 30 s. Over 92 % of users report instant pairing HA Survey 2023.
### Edge-case: What if only LED 6 blinks and relays ignore commands?
That indicates pin 22 (button) stuck low. Check for broken switch or re-flash with GPIO22 set to "None". “A low button line disables further GPIO interrupts,” warns a maintainer GitHub Issue #418.
### Can I chain multiple power strips?
Avoid daisy-chaining high-load devices. Surge units stack MOVs; clamping voltage rises by ~15 % per strip, reducing protection efficiency IEC Surge Guide.
### What encryption level secures OTA updates?
OpenBK7231T signs OTA files with 2048-bit RSA and verifies SHA-256 checksums before flashing Security Whitepaper 2023. Flash aborts if either check fails.
### How do I log power cycles for each relay?
Enable energy_monitor
module, then run startEnergyLog Rel1,Rel2,Rel3,Rel4,Rel5
. Data streams to MQTT tele/<device_id>/energy
every 60 s OpenBK7231T Docs. A 30-day log uses ~1.2 MB on broker.
### Does flashing void Tuya warranty?
Yes. Tuya terms state “modifying firmware voids all guarantees.” However, many buyers report no service denial for DOA units Buyer Feedback 2022. Proceed at your own risk.
### Is there a way to revert to stock Tuya firmware?
If you saved a full OTA dump, use tuya-convert --flash-original.bin
. Without a dump, you must disassemble and program via UART with the original image from Tuya Cloud tuya-convert README.
Comments
You may also consider using click events script for this device. See: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md Search for: Configuration for 4x socket... [Read more]