We've been looking into TM1638 recently and it seems very, very similar to GN6932.
Helpful post? Buy me a coffee.
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamInfo:MAIN:Driver GN6932 is not known in this build.
Info:MAIN:Available drivers: backlog startDriver GN6932; startDriver NTP
ntp_timeZoneOfs +00:00
TMGN_Clear
//check the reading of you sensor against a good known and calibrate in this case -2
CHT_Calibrate -2 10
TMGN_Clear
//adjust brightness if needed (0-7) - default is 7 max
TMGN_Brightness 7
TMGN_SetBit 9 1 1
TMGN_SetBit 9 2 1
TMGN_SetBit 9 3 1
TMGN_SetBit 9 7 1
TMGN_SetBit 9 0 1
TMGN_SetBit 10 2 1
TMGN_SetBit 10 3 1
again:
// TMGN_Print offset len value bPadToLenWithZeros
//TMGN_Print 0 2 $second 1
TMGN_Print 7 2 $minute 1
TMGN_Print 5 2 $hour 1
TMGN_Print 2 3 $CH1 1
TMGN_Print 0 2 $CH0 1
delay_s 0.1
//blinking : on the clock
TMGN_SetBit 10 0 0
TMGN_SetBit 10 1 0
delay_s 1
TMGN_SetBit 10 0 1
TMGN_SetBit 10 1 1
delay_s 1
goto again
#define ENABLE_DRIVER_TMGN 1
divadiow wrote:
Unless you think it should go back into live...
divadiow wrote:As such, the readings are incorrect.
divadiow wrote:
Also, I've updated the OBK template a little. Still not 100% sure on the GN6932 channels
https://github.com/OpenBekenIOT/webapp/pull/80
p.kaczmarek2 wrote:That's the old version without temperature/humidity probe driver. Can you check if it's working with new build with LED display driver enabled?
p.kaczmarek2 wrote:So, to sum up, the newer models come with CHT8310 instead of CHT8305? I wonder what are the differences between those two CHT sensors.
Quote:Interface: Both the CHT8305 and CHT8310 use I2C and SMBus interfaces.
Temperature Accuracy: Both have the same typical temperature accuracy of ±0.2°C.
Humidity Accuracy:
The CHT8305 has a humidity accuracy of ±2.0%RH at 50%RH.
The CHT8310 has a wider humidity accuracy range of ±2.0%RH at 20%RH to 80%RH.
Current Consumption at 1Hz (I_AOC/1Hz):
The CHT8305 consumes 1.5µA.
The CHT8310 consumes 2.0µA.
Shutdown Current (I_SD):
The CHT8305 has a shutdown current of 0.05µA.
The CHT8310 has a slightly higher shutdown current of 0.055µA.
Analog-Digital Converter Resolution (ADD): Both have an ADC resolution of 4.
Package: Both use the same package type, DFN-3x3-6.
startDriver GN6932
startDriver NTP
ntp_timeZoneOfs +2:00
//clear screen on boot
TMGN_Clear
//adjust brightness if needed (0-7) - default is 7 max
TMGN_Brightness 7
//static bits for displaying state, connection and various constant characters (like 'C or'F, AM/PM...)
TMGN_SetBit 9 1 1
TMGN_SetBit 9 2 1
TMGN_SetBit 9 3 1
TMGN_SetBit 9 7 1
TMGN_SetBit 9 0 1
TMGN_SetBit 10 2 1
TMGN_SetBit 10 3 1
//main loop to display clock and values from a CHT sensor
again:
TMGN_Print 7 2 $minute 1
TMGN_Print 5 2 $hour 1
TMGN_Print 2 3 $CH1 1
TMGN_Print 0 2 $CH0 1
delay_s 0.1
//blinking : on the clock
TMGN_SetBit 10 0 0
TMGN_SetBit 10 1 0
delay_s 1
TMGN_SetBit 10 0 1
TMGN_SetBit 10 1 1
delay_s 1
goto againTL;DR: For this BK7231N/CBU USB thermostat, 3 GN6932 lines and “bit order is swapped” are the key clues: use CHT on P22/P20, GN6932 on P15/P17/P28, then script TMGN for temperature, humidity, and time in OpenBeken. [#20535970] Why it matters: This turns a generic Tuya LED thermostat into a locally controlled OpenBeken sensor-display device without relying on Tuya cloud firmware.
| Alternative | Sensor or driver | Thread-specific status | Key command or setting |
|---|---|---|---|
| CHT8305 | I2C temperature/humidity | Original teardown sensor | SDA P22, SCL P20 |
| CHT8310 | I2C temperature/humidity | Seen in newer units | Needs newer OpenBeken support |
| GN6932 | 8×16 LED driver | Disabled in some newer builds | #define ENABLE_DRIVER_TMGN 1 |
| TM1637/TM1638 | Related LED drivers | Similar TMGN command family | TMGN_Print, TMGN_SetBit |
Key insight: The display is not TuyaMCU-driven. OpenBeken can drive it directly when the GN6932/TMGN driver is enabled and the three display pins are mapped correctly.
40, then C0 ..., then 8F; decoding it MSB-first made the packet look wrong. [#20536000]CHT_Calibrate; the example CHT_Calibrate -2 10 applies −2 °C temperature and +10 %RH humidity offsets. [#20539841]startDriver GN6932.GN6932_TestAddressIncreaseMode to light random segments.TMGN_Brightness 7 and TMGN_Print 0 0 123456 to test output.
Build 680 already showed changing patterns with the test command. [#20536357]#define ENABLE_DRIVER_TMGN 1 in obk_config.h. A custom build or pull-request build can also include it. [#20979746]autoexec.bat with GN6932, NTP, brightness, static bits, and a loop. The working example starts GN6932, starts NTP, sets timezone +2:00, prints minutes at offset 7, hours at offset 5, temperature at offset 2, and humidity at offset 0. It also blinks the clock colon by toggling bits 10:0 and 10:1 every 1 second. [#20537716]7 is the start offset, and 2 is the maximum length. TMGN_Print uses the format TMGN_Print [StartOffset] [MaxLenOr0] [Text]. So TMGN_Print 7 2 $minute 1 prints the two-digit minute value starting at display position 7, with zero padding enabled by the final 1. [#21210176]TMGN_SetBit 9 1 1 means display index 9, bit 1, value on. The first number selects a display byte or digit index, usually within 0–15. The second number selects one of 8 bits, matching 7 segments plus dot. The third number sets that segment off or on, using 0 or 1. [#21205196]CHT_Calibrate [temperature offset] [humidity offset] after starting the sensor driver. Build 701 confirmed CHT_Calibrate -2 10 worked. That example subtracts 2 °C from temperature and adds 10 %RH to humidity. Earlier SHT_Calibrate and SHT3X_Calibrate commands failed on CHT8305 because they targeted other drivers. [#20539841]40, C0 ..., 8F. [#20536000]OpenBK7231N_QIO_1.15.xxx, flashed it, and confirmed the device returned to its original state. This gives a recovery path after OpenBeken testing. [#20535581]1:0 because temperature appeared on the humidity line. For TM1637 mapping issues, the maintainer advised using TMGN_Map instead of TMGN_SetBit. [#20980349]