Again ordered Temperature and Humidity sensor from Aliexpress. Actually two of them.
I got one of this in ali. It is a device based on CB3S with a CHT8310? sensor and a Tuya chip.
Model: TH01
FCC ID: 2A8TU-TH01
PCB: ZY-TH02-CB3S_V1.0 (2024-12-03)
Case holes detail:
PCB detail:
HT Chip:
CB3S pinout for flashing:
Firmware: Official sensors release
How it ended:
I wasn't able to put OBK on it using bk7231flasher_1.3.3. No reboot or CEN allowed me. So, I needed to desolder something.
For first device I tried desoldering the CB3S chip and my (lack of) soldering skills resulted in a lot of pads broken
For second device I tried desoldering the Tuya chip, this time pads survived but still wasn't able to program it, therefore I needed to desolder the CB3S, this time all the pads survived.
Long story short, after several tries I decided to remove the Tuya chip and connect the CB3S directly to the supposed CHT8310. I assumed the PCB included a CHT8310 based on the picture of it and the fact the PCB literally has CHT8310 printed on it in some test points, specifically CHT8310_SDA, CHT8310_SCL and CHT8310_VDD.
To leverage the configuration I made to some other device I wired the CHT8310 chip to P9 and P6 of CB3S as per the pinout Here
When loading the driver I always get temp=125 hum=0, which means for me there is an issue with the communications.
Therefore I loaded the I2C driver and when I ran scanI2C soft I got
Info:I2C:Address 0x44 (dec 68)That is, as per my understanding the address of a SHT30 chip.
When trying to load that driver I realized it is not included in the current standard release of OBK, where can I get a version including SHT30 to see if that driver is capable of handling the chip?.
Autoexec.bat:
//Start counting seconds in channel 30
addRepeatingEvent 1 -1 setChannel 30 $CH30+1
/////////////////////////////////////////// Pins and Channel definitions
SetPinRole 6 SHT3X_SCK
SetPinChannel 6 1
SetPinRole 9 SHT3X_SDA
SetPinChannel 9 1 2
//SetPinRole 17 BAT_Relay
//SetPinChannel 17 5
SetPinRole 14 dInput
SetPinChannel 14 43
SetChannelLabel 14 intButton 1
//SetPinRole 23 BAT_ADC
//SetPinChannel 23 40
//SetPinRole 23 WifiLED_n
SetPinRole 8 Rel
SetChannelPrivate 37 true
SetPinChannel 8 37
/////////////////////////////////////////// Internal Channels definition
setChannelType 44 ReadOnly
setChannelLabel 44 LoopMode 1
// LoopMode=1 for start
setChannel 44 1
//Always save power
PowerSave 1
// hold button to get into safe mode
addEventHandler OnHold 20 SafeMode
// Battery
//startDriver battery
//Battery_Setup 2350 3000
// Temp and Hum sensor
startDriver SHT3X
SHT_calibrate 0.1 10
// 30s timeout to deep sleep 2mins if waits never complete
addRepeatingEventID 20 -1 5 DeepSleep 300-$CH30
//Turn LED on to indicate beggining of window to press button to exit loop mode
setChannel 37 1
addChangeHandler Channel43 == 0 backlog echo "exit loop mode"; cancelRepeatingEvent 5; setChannel 44 0; setChannel 37 0
// wait for MQTT to connect
waitFor MQTTState 1
cancelRepeatingEvent 5
SHT_Measure
publishChannel 1
publishChannel 2
//echo "!!!!!!!!!!!!!!channels published !!!!!!!!!!!!!!!!!!"
delay_s 3
//Turn LED off, end of exit loop mode window
setChannel 37 0
// Deep sleep (shut down everything) and reboot automatically when in loop mode
if $CH44==1 then PinDeepSleep 600-$CH30
//////// if not in loop mode
clearAllHandlers
// blink the led
addRepeatingEvent 1 -1 setChannel 37 !$CH37
// stay in mantenance mode 5 mins and then restart
addRepeatingEvent ID 300-$CH30 -1 6 restart
//reboot if button pressed
addChangeHandler Channel43 == 0 backlog cancelRepeatingEvent 6; setChannel 37 0; restart