[BK7231N CBU] Tuya WiFi Temperature and Humidity Sensor (Blue PCB, no TuyaMCU)
I recently bought a few of 'Tuya WiFi Temperature and Humidity Sensor'.
I looked for an existing thread for this exact device but only found a few users posting pictures of this board.
Here is a picture of the PCB:
And here is the firmware from an unused device:
Tuya JSON:
It does not have a TuyaMCU and is using I2C to communicate with the Temp+Humidity sensor CHT8305.
This device requires deep sleep to run on batteries longer than few days.
Please see related topics for details:
https://www.elektroda.com/rtvforum/topic4025593.html
https://www.elektroda.com/rtvforum/topic3945688.html
https://www.elektroda.com/rtvforum/find.php?q=CHT8305
I have flashed esphome and aside from I2C, and deep-sleep, everything else works.
I hope this information is sufficient to 'port'/support openbeken for this device.
Let me know if i can help any other way.
I looked for an existing thread for this exact device but only found a few users posting pictures of this board.
Here is a picture of the PCB:

And here is the firmware from an unused device:
Tuya JSON:
Code: JSON
It does not have a TuyaMCU and is using I2C to communicate with the Temp+Humidity sensor CHT8305.
This device requires deep sleep to run on batteries longer than few days.
Please see related topics for details:
https://www.elektroda.com/rtvforum/topic4025593.html
https://www.elektroda.com/rtvforum/topic3945688.html
https://www.elektroda.com/rtvforum/find.php?q=CHT8305
I have flashed esphome and aside from I2C, and deep-sleep, everything else works.
esphome:
name: upk2esphome-bk7231n
bk72xx:
board: cbu
logger:
baud_rate: 0
# tuya:
web_server:
captive_portal:
mdns:
external_components:
- source: /soft_i2c
#api:
# password: ""
# reboot_timeout: 0s
ota:
password: ""
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
use_address: 192.168.1.32
fast_connect: true
ap:
mqtt:
broker: mqtt.hlab.host
button:
- platform: restart
name: Restart
debug:
update_interval: 30s
text_sensor:
- platform: debug
reset_reason:
name: Reset Reason
- platform: libretiny
version:
name: LibreTiny Version
sensor:
- platform: uptime
name: Uptime
update_interval: 15s
id: uptime_sensor
- platform: adc
pin: P23
name: "Battery Level"
update_interval: 15s
on_value:
then:
- mqtt.publish_json:
topic: temp_sensor
payload: |-
root["batt"] = x;
root["uptime"] = id(uptime_sensor).state;
root["alert"] = id(alert).state;
uart:
rx_pin: RX1
tx_pin: TX1
baud_rate: 115200
light:
- platform: binary
name: "Status"
output: status_output
output:
- id: status_output
platform: gpio
pin: P16
binary_sensor:
- platform: gpio
pin:
number: P14
inverted: true
name: "Button"
- platform: gpio
id: alert
pin:
number: P7
inverted: true
name: "Alert"
I hope this information is sufficient to 'port'/support openbeken for this device.
Let me know if i can help any other way.
Comments
I will edit your first post to add more information, but first of all, your current config is incorrect . You can't just: This device must have deep sleep, otherwise it will drain batteries really,... [Read more]
I have it working quite well. I have gathered information from multiple threads about these sensors here. Even the battery is working and showing up in HASS. "pins": { "8": "BAT_Relay;0", "14":... [Read more]
Thanks for the replies @p.kaczmarek2 and @johnypean. I got stuck at flashing as the GUIFlashTool would not work in Linux ... it would freeze when writing the first page after erasing all flash blocks. Installing... [Read more]
Are the device configs the same? Is the device hardware the same for both devices? [Read more]
Yes, I copied and pasted all settings and autoexec.bat from the first device I flashed that reports correct values. [Read more]
I played a bit with the sensors in the previous days and redid my configuration, and now all sensors return valid readings. I also started playing with the deepsleep as @p.kaczmarek2 recommended. However... [Read more]
If you activated Flag 36 - "[DRV] Deactivate Autostart of all drivers", you have to add startDriver Battery to autoexec.bat Had the same happen. [Read more]
@johnypean Nope, i don't have that enabled I have the following enabled: Flag 2 - [MQTT] Broadcast self state every N (def: 60) seconds (delay configurable by 'mqtt_broadcastInterval' and 'mqtt_broadcastItemsPerSec'... [Read more]
Hi! Thanks a lot about this post and the information given. I have one of this PCB with CBU chip. Here a resume about my configuration: https://obrazki.elektroda.pl/2744555700_1706546227_thumb.jpg... [Read more]
Solved!! Setting Channel 4 for gpio of configured battery send MQTT data. https://obrazki.elektroda.pl/7046929300_1706595312_thumb.jpg Data appear as unavailable in sleep time is solved after... [Read more]
I've got one of these devices, too. But I can't find a template in the WebApp. Could you please post your template here? [Read more]
Newbie here, anyone could be kind and post a how to, or at least post the files. Thanks in advance. [Read more]
Hello @mcexmltv , what kind of information do you need exactly? Are you asking about device configuration, or about flashing? For flashing, please see: https://github.com/openshwprojects/BK7231GUIFlashTool You... [Read more]
Thanks @pkaczmarek2 , finally had some time to do some research. Here is what I am looking for. I have ESPHome installed. How do I flash openBK OTA or do I have to use UART? If OTA is possible what... [Read more]
They have OTA locked against flashing our/Tuya RBL format but someone has found a work around (converted files...): https://github.com/BenJamesAndo/OpenBeken_uf2_firmware Let me know how it works for... [Read more]
Hi, where do I find this "soft_i2c" external component? I have an i2c device I'd like to interface to a bk7231n in ESPHome. Thanks! [Read more]