FAQ
TL;DR: Set TuyaMCU WiFi state to 0x04; “paired to cloud” mode unlocks fuller dpID updates without internet. Then use linkTuyaMCUOutputToChannel and tuyaMcu_sendQueryState to map and refresh gas, temperature, and alarm values. [Elektroda, p.kaczmarek2, post #20703946]
Why it matters: This helps OpenBK7231N users migrating from Tasmota configure TuyaMCU sensors, invert alarm logic, and keep Home Assistant states accurate.
Quick Facts
- Inverted alarm logic is supported via the Toggle_Inv channel type from firmware v1.17.226. [Elektroda, p.kaczmarek2, post #20704799]
- This gas sensor’s TuyaMCU UART operated at 9600 bps; higher speeds failed. [Elektroda, tellblom, post #20703239]
- Map Tuya dpIDs to OpenBK channels using linkTuyaMCUOutputToChannel; channels act as universal variable containers. [Elektroda, p.kaczmarek2, post #20703081]
- Force full dpID refresh with tuyaMcu_defWiFiState 4 followed by tuyaMcu_sendQueryState. [Elektroda, p.kaczmarek2, post #20703946]
- Automate polling using addRepeatingEvent [RepeatTime] [RepeatCount] [Command]. [Elektroda, p.kaczmarek2, post #20704133]
How do I set “Module 54” in OpenBK?
You don’t use Tasmota’s Module numbers in OpenBK. Instead, link Tuya dpIDs to OpenBK channels with linkTuyaMCUOutputToChannel, then choose suitable channel types. As the developer notes, “Obk is more flexible in that matter.” This approach is more scriptable and maintains clean MQTT/Home Assistant integration. [Elektroda, p.kaczmarek2, post #20703081]
How do I map Tuya dpIDs to OpenBK channels?
Start TuyaMCU, then link a dpID to a channel and set its type. Example: startDriver TuyaMCU; linkTuyaMCUOutputToChannel 16 1 5; setChannelType 5 Toggle. Repeat for sensors (Value/ReadOnly/Temperature) and other dpIDs. Consult the command list for parameters and examples. [“OpenBK commands.md”]
Which channel types should I use for temperature and read-only values?
Use Temperature for degrees (e.g., dpID 19), Toggle for relays or buttons (e.g., dpIDs 16, 8), and ReadOnly for sensor values you shouldn’t write. These types render correctly in the UI and publish cleanly to MQTT. Review the channelTypes reference for details. [“OpenBK channelTypes.md”]
How do I force Tuya dpID updates and see them in logs?
Set the TuyaMCU WiFi state to 0x04, then run tuyaMcu_sendQueryState. Open the Web App log to inspect incoming packets and dpIDs. “Paired to cloud” mode works even when not online and often yields more dpIDs. [Elektroda, p.kaczmarek2, post #20703946]
How can I schedule periodic TuyaMCU queries?
Use the repeating events system. 1) Decide an interval, e.g., 20 seconds. 2) Run addRepeatingEvent 20 -1 tuyaMcu_sendQueryState. 3) Confirm updates in the log and UI. This keeps values fresh for MQTT/Home Assistant. [Elektroda, p.kaczmarek2, post #20704133]
My gas/heat alarm logic is inverted. How do I fix it for Home Assistant?
Update to firmware v1.17.226 or later, then set the channel type to Toggle_Inv for those dpIDs. This inverts the reported state so “OFF means normal,” avoiding false alarms in Home Assistant. Set with: setChannelType Toggle_Inv. [Elektroda, p.kaczmarek2, post #20704799]
Do I need the tmSensor driver for this Tuya gas sensor?
No. tmSensor is intended for battery-powered TuyaMCU sensors, such as door or temp/humidity sensors. For a mains-powered gas sensor, you can omit tmSensor. Keep TuyaMCU (and NTP if needed) only. [Elektroda, p.kaczmarek2, post #20706411]
How do I set the heat alarm threshold via TuyaMCU?
Send a state update to the dpID that controls the setpoint. Example from the thread: tuyaMcu_sendState 101 2 55 to set 55°C. Confirm the dpID from logs before writing. This enables device-side alarm thresholds without cloud access. [Elektroda, tellblom, post #20706372]
How do I keep the device’s clock correct on the display?
Run the NTP driver, set your timezone offset, push time to the MCU, and refresh hourly. Example: startDriver NTP; ntp_timeZoneOfs 02:00; tuyaMcu_sendCurTime; addRepeatingEvent 3600 -1 tuyaMcu_sendCurTime. That 3600-second sync stabilizes on-device time. [Elektroda, tellblom, post #20706372]
Do I need a USB-to-TTL adapter to get sensor values?
Usually no. When you set TuyaMCU WiFi state to 0x04 or connect MQTT, the MCU should send dpIDs automatically. If needed, add a repeating tuyaMcu_sendQueryState. Use USB‑TTL only for low-level UART troubleshooting. [Elektroda, p.kaczmarek2, post #20704133]
What baud rate did this gas sensor use?
It worked at 9600 bps. Communication failed at other rates during testing. If your device differs, confirm via Tuya config extraction and logs. [Elektroda, tellblom, post #20703239]
Where can I download firmware 1.17.226?
Get it from the OpenBK7231T_App repository on GitHub. The developer announced 1.17.226 availability there; update before using Toggle_Inv. [Elektroda, p.kaczmarek2, post #20704899]
Why do values seem to reset after a few minutes?
Some devices stop pushing updates passively, causing values to appear stale after about two minutes. Schedule periodic queries to maintain fresh states. Example: addRepeatingEvent 20 -1 tuyaMcu_sendQueryState for 20‑second refreshes. [Elektroda, tellblom, post #20704090]