FAQ
TL;DR: The TX-E gas detector idles at 180 mA and “UART sniffing is enough to map dpIDs” [Elektroda, p.kaczmarek2, post #21321408] This FAQ shows makers how to flash, map dpIDs and push weather data without Tuya cloud.
Why it matters: You can run the detector fully offline while keeping shut-off control, alarms and weather display.
Quick Facts
• Idle current: 180 mA @ 5 V USB-C [Elektroda, Samezrp1, post #21321688]
• Boost stage: 12 V on alarm drives valve coil [Elektroda, Samezrp1, post #21321688]
• UART speed: 9 600 bps (tuyaMcu_setBaudRate) [Elektroda, Samezrp1, post #21324432]
• Channel limit: 64 vs dpID 1-104; map high dpIDs manually [Elektroda, p.kaczmarek2, post #21325209]
• Flash backup tool: BK7231GUIFlashTool (SPI @ 2 Mbit/s typical) [Elektroda, p.kaczmarek2, post #21321408]
How do I read the live gas concentration value in OpenBeken?
Map dpID 2 (gas_sensor_value, 0-100 %LEL) to a free channel, e.g. linkTuyaMCUOutputToChannel 2 val 2
, then set the channel type to Temperature or Default. The value publishes automatically to MQTT once the MCU receives it [Elektroda, Samezrp1, post #21324432]
Which command closes or opens the gas shut-off valve?
Send dpID 8 Boolean. tuyaMcu_sendState 8 1
closes (12 V on coil). tuyaMcu_sendState 8 0
re-opens. The raw frames are 55AA00060005080100010115 and 55AA00060005080100010014 respectively [Elektroda, Samezrp1, post #21324887]
Why does attaching a UART probe to Wi-Fi TX raise an alarm?
The detector interprets the extra load on the TX pin as a fault, throws dpID 1=alarm and loses cloud link. Two separate USB-UART adapters avoid this by isolating RX/TX lines [Elektroda, Samezrp1, post #21321688]
The display keeps rebooting every minute—what fixes the watchdog resets?
The MCU expects a periodic Wi-Fi state packet (MCUConf 0x02). Start the NTP driver and enable tuyaMcu_defWiFiState 4
; this stops the watchdog jumps and stabilises the link [Elektroda, Samezrp1, post #21324859]
How can I handle dpIDs above 100 when only 64 channels exist?
Reuse lower channel numbers: linkTuyaMCUOutputToChannel 101 val 12
, etc. High dpIDs overwrite nothing; they just point to available channels. Labels help keep track (setChannelLabel 12 heat_alarm_value
) [Elektroda, Samezrp1, post #21325118]
What’s the easiest way to push outdoor temperature and humidity to the display?
Use tuyaMcu_sendCmd 0x20 "w.temp" <payload>
where payload is four bytes temperature then four bytes humidity. OpenBeken’s upcoming OpenWeatherMap driver writes these automatically every 10 min [Elektroda, p.kaczmarek2, post #21330469]
Do I need to calculate checksums for custom frames?
No when using tuyaMcu_sendCmd
; length and checksum are auto-generated. You only compute them when sending raw bytes with uartSendHex
[Elektroda, p.kaczmarek2, post #21326734]
Time shows 2070—how do I correct the clock?
Run tuyaMcu_sendCurTime
after NTP sync. It pushes the current UNIX epoch to the local MCU, clearing the 2000-year offset bug [Elektroda, Samezrp1, post #21325118]
Is firmware backup safe on the CB3S module?
Yes. Connecting SWD pins and using BK7231GUIFlashTool took one pass with no alarms triggered, producing a full flash dump in <30 s [Elektroda, Samezrp1, post #21321688]
What happens if I probe Wi-Fi TX with only one USB-UART?
A false gas alarm occurs and cloud connection drops, because the extra capacitance disturbs the UART line. Use two isolated converters or buffer the TX line [Elektroda, Samezrp1, post #21321688]
Quick 3-step guide to flash and configure OpenBeken on TX-E
- Backup flash via BK7231GUIFlashTool (RESET mode, 3 V3).
- Flash OpenBeken, solder CB3S back, boot.
- Import autoexec: start drivers, map dpIDs, enable NTP. Device reconnects and publishes MQTT in under five minutes [Elektroda, Thread].
Comments
So the device from TuyaMCU. Protocol description: TuyaMCU protocol - communication between microcontroller and WiFi module . A broad description of the how-to run approach: TuyaMCU flashing, installation... [Read more]
. Thanks, I'm already reading, I've already analysed part of it, but not all of it. . I have two, no problem with that, the problem is that the WiFi RX communication is quietly eavesdropping, but when... [Read more]
OK, I'm ready to configure, I think I have everything I need. CB3S falsified, connects to WiFi. Soldered in and time to configure. I've read the guide , I'm on the Import page on the device and I've... [Read more]
Then perhaps let's start there: . I posted a topic about this yesterday, it's still further down on the main page: How to make the TuyaMCU device send more data? Why are dpIDs not being sent? . Read... [Read more]
Not directly, but you helped. Indeed the WiFi connection indicator was not stable on the display, sometimes it appeared sometimes it disappeared, but reading the recommended threads I came across a setting... [Read more]
. Interesting, so without time it won't send data? You can add this to the thread about dpID, maybe it will help someone: https://www.elektroda.pl/rtvforum/viewtopic.php?t=4089722&highlight= And... [Read more]
OK, thanks, I will analyse the posting. . I don't use homeAssistant, I use Node-RED and all communication goes over MQTT. I have all the appliances in the house serviced on this, including the recuperator,... [Read more]
In my opinion, you should first make a mapping to channels within the OBK according to our examples, e.g: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md // start... [Read more]
OK, it's slowly becoming clearer. command: setChannelType 2 Default doesn't expose any element on the panel, which is why I was dumbfounded, and not sure which one, so I assumed with Default it... [Read more]
. It seems to me that the ReadOnly field will be read-only and also visible on the panel. Default is the default mode, if Default was visible on the panel then after uploading the firmware there would... [Read more]
. So it's all clear. . I'll keep observing, as I get the impression that it has lost time after a while, but this I need to confirm. I will survive :) . . I was thinking of a toggle type channel,... [Read more]
. You can send time at regular intervals using addRepeatingEvent . It is worth including TuyaMCU queue in the flags for stability. . And what would such a toggle look like? . Maybe for... [Read more]
OK . I was thinking exactly like the current one, but with no clickability, possibly with a little information in the year: RO, czt ReadOnly . Presumably this command is used to do this: https://obrazki.elektroda.pl/7120991500_1732964373_thumb.jpg... [Read more]
. If you're stubborn, you can use UartSendHex, but then you have to count the checksum yourself as you change the contents of the packet. tuyaMcu_sendState you won't use, because it's not a dpID, it's... [Read more]
. UartSendHex works , I made myself a checksum calculator: UartSendHex 55AA0021001F0106772E74656D700004000000160A772E68756D696469747900040000005B36 . The temperature value in hex is on 20 byte,... [Read more]
You don't have to count the checksum yourself, tuyaMcu_sendCmd will do it for you. There are two arguments - the command and the payload. The length of the payload is determined by itself, as is the checksum. It... [Read more]
. I'm looking and generally from -28 degrees (0x80) to zero (0x9C) they go linearly, upwards, missing from -29 to -31, then from -32 (0xDF) to -99 (0x9D) also linearly. BTW I extracted the flash and... [Read more]
So a function that sends data in a packet of type 0x20 with ASCII names and with number conversion according to your function is useful? I was interested in the topic of "weather" for a given position... [Read more]
. Yes, then the functionality remains 1:1 after de-clouding. . Then the temperature could be taken either from your thermometer, or as in the original based on downloaded data. . Yes, I hit it,... [Read more]