Tuya BHT-006 GB WiFi Thermostat flashed over the air using tuya-cloudcutter
I got 2 versions of the same thermostat with different datapoints.
BHT-006GBW Thermostat (Version number U3) sold by Beca
esphome:
name: thermostat
friendly_name: Thermostat
bk72xx:
board: cb3s
framework:
version: dev
logger:
baud_rate: 0
level: debug
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
password: !secret wifi_password
captive_portal:
web_server:
time:
- id: time_provider
platform: homeassistant
on_time_sync:
- logger.log: "Synchronized system clock"
on_time:
- seconds: 0
then:
- uart.write: [0x55, 0xaa, 0x00, 0x21, 0x00, 0x00, 0x20] #0x21 (Send weather data)
- uart.write: [0x55, 0xaa, 0x00, 0x20, 0x00, 0x02, 0x01, 0x00, 0x22] # 0x20 (Enable weather services) 0x01 (success) 0x00 (no error)
- uart.write: [0x55, 0xaa, 0x00, 0x34, 0x00, 0x02, 0x03, 0x00, 0x38] # 0x34 (Proactively request weather data) 0x03 (subcommand) 0x00 (success)
- logger.log: "Disabling weather requests"
uart:
rx_pin: P10
tx_pin: P11
baud_rate: 9600
tuya:
time_id: time_provider
climate:
- platform: tuya
name: "Thermostat"
icon: mdi:heating-coil
switch_datapoint: 1
target_temperature_datapoint: 16
current_temperature_datapoint: 24
active_state_datapoint: 3
active_state_heating_value: 0
eco_datapoint: 4
temperature_multiplier: 0.1
visual:
min_temperature: 10 °C
max_temperature: 30 °C
temperature_step: 0.5 °C
switch:
- platform: tuya
name: "Thermostat"
icon: mdi:power
switch_datapoint: 1
internal: True
- platform: tuya
name: "Economy Mode"
icon: mdi:leaf
switch_datapoint: 4
- platform: tuya
name: "Panel Lock"
icon: mdi:lock
switch_datapoint: 40
select:
- platform: tuya
name: "Program Schedule"
icon: "mdi:calendar"
enum_datapoint: 2
options:
0: Schedule
1: Manual
- platform: tuya
name: "Sensor Type"
enum_datapoint: 102
options:
0: Internal
2: External
1: Internal and External
sensor:
- platform: tuya
name: "Temperature"
device_class: "temperature"
sensor_datapoint: 24
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
- platform: tuya
name: "Temperature External Sensor"
device_class: "temperature"
sensor_datapoint: 101
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "Economy Temperature"
device_class: "temperature"
sensor_datapoint: 106
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "Temperature Offset"
device_class: "temperature"
sensor_datapoint: 27
unit_of_measurement: "°C"
disabled_by_default: True
- platform: tuya
name: "Min Set Temp"
device_class: "temperature"
sensor_datapoint: 20
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "Max Set Temp"
device_class: "temperature"
sensor_datapoint: 19
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "Low Temperature Protection"
device_class: "temperature"
sensor_datapoint: 105
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "High Temperature Protection"
device_class: "temperature"
sensor_datapoint: 104
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.1
disabled_by_default: True
- platform: tuya
name: "Dead Zone Temperature"
device_class: "temperature"
sensor_datapoint: 103
unit_of_measurement: "°C"
disabled_by_default: True
number:
- platform: tuya
name: "Economy Temperature (°C=value/10)"
number_datapoint: 106
min_value: 0
max_value: 300
step: 10
disabled_by_default: True
- platform: tuya
name: "Min Set Temp (°C=value/10)"
number_datapoint: 20
min_value: 50
max_value: 150
step: 10
disabled_by_default: True
- platform: tuya
name: "Max Set Temp (°C=value/10)"
number_datapoint: 19
min_value: 200
max_value: 350
step: 10
disabled_by_default: True
- platform: tuya
name: "Low Temperature Protection (°C=value/10)"
number_datapoint: 105
min_value: 0
max_value: 100
step: 10
disabled_by_default: True
- platform: tuya
name: "High Temperature Protection (°C=value/10)"
number_datapoint: 104
min_value: 250
max_value: 450
step: 10
disabled_by_default: True
- platform: tuya
name: "Dead Zone Temperature"
number_datapoint: 103
unit_of_measurement: "°C"
min_value: 1
max_value: 5
step: 1
disabled_by_default: True
BHT-006GBW Thermostat (Version number U2) sold by Moes
esphome:
name: thermostat
friendly_name: Thermostat
bk72xx:
board: cb3s
framework:
version: dev
logger:
baud_rate: 0
level: debug
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
password: !secret wifi_password
captive_portal:
web_server:
time:
- id: time_provider
platform: homeassistant
on_time_sync:
- logger.log: "Synchronized system clock"
on_time:
- seconds: 0
then:
- uart.write: [0x55, 0xaa, 0x00, 0x21, 0x00, 0x00, 0x20] #0x21 (Send weather data)
- uart.write: [0x55, 0xaa, 0x00, 0x20, 0x00, 0x02, 0x01, 0x00, 0x22] # 0x20 (Enable weather services) 0x01 (success) 0x00 (no error)
- uart.write: [0x55, 0xaa, 0x00, 0x34, 0x00, 0x02, 0x03, 0x00, 0x38] # 0x34 (Proactively request weather data) 0x03 (subcommand) 0x00 (success)
- logger.log: "Disabling weather requests"
uart:
rx_pin: P10
tx_pin: P11
baud_rate: 9600
tuya:
time_id: time_provider
climate:
- platform: tuya
name: "Thermostat"
icon: mdi:heating-coil
switch_datapoint: 1
target_temperature_datapoint: 2
current_temperature_datapoint: 3
eco_datapoint: 5
temperature_multiplier: 0.5
visual:
min_temperature: 10 °C
max_temperature: 30 °C
temperature_step: 0.5 °C
switch:
- platform: tuya
name: "Power"
icon: mdi:power
switch_datapoint: 1
internal: True
- platform: tuya
name: "Economy Mode"
icon: mdi:leaf
switch_datapoint: 5
- platform: tuya
name: "Panel Lock"
icon: mdi:lock
switch_datapoint: 6
select:
- platform: tuya
name: "Program Schedule"
icon: "mdi:calendar"
enum_datapoint: 4
options:
0: Schedule
1: Manual
sensor:
- platform: tuya
name: "Temperature"
device_class: "temperature"
sensor_datapoint: 3
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.5
- platform: tuya
name: "Temperature External Sensor"
device_class: "temperature"
sensor_datapoint: 102
unit_of_measurement: "°C"
accuracy_decimals: 1
filters:
- multiply: 0.5
disabled_by_default: True
EDIT: Changed the original post.
- LibreTiny is going to merge with ESPHome in version 9.0 and the yaml is a little different now.
- Fixed the invalid command (0x20) and (0x34) received in the logs. MCU is requesting weather data that was provided by the tuya app so I just sent empty weather data and told the MCU that the data was correct.