Got this one (Thermostat MOES BHT-002 GBLW) from ali:
By default, this thing is controlled via the tuya cloud and their app which is inappropriate for me.
It contains esp8266 (TYWE3S) and can be reprogrammed.
I have found great Klaus work for different similar devices: https://github.com/klausahrenberg/WThermostatBeca
I’m followed flashing instructions https://github.com/tema-mazy/WThermostatBeca/blob/BHT002-fix/Flashing.md
but esptool runs and constantly fails at a different point – MCU trashes TX/RX line by sending commands to ESP.
So I need to broke these communication lines ( and restore them after flashing )
GPIO5 – relay state hack.
The original device does not report relay state to ESP so Klaus has done coding to read GPIO5 pin state. But this requires some modification.
The main MCU is 5v is ESP 3.3v so there are 2 10K resistors to lower voltage level.
Initial instructions can be found here:
My code modification and improvement can be found at
So now it is free from proprietary tuya cloud and can be controlled via HTTP/MQTT.
mosquitto_sub -v -t "thermostat/#"