Thermostat MOES BHT-002 GBLW – unchain from Tuya

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:
https://github.com/tema-mazy/WThermostatBeca/blob/master/Configuration.md

My  code modification and improvement can be found at
https://github.com/tema-mazy/WThermostatBeca

So now it is free from proprietary tuya cloud and can be controlled via HTTP/MQTT.

mosquitto_sub -v -t "thermostat/#"
thermostat/thermostat/properties {"idx":"thermostat","ip":"192.168.77.77","alive":false}
thermostat/thermostat/properties/targetTemperature 10.50
thermostat/thermostat/properties/schedulesMode off
thermostat/thermostat/properties/ecoMode false
thermostat/thermostat/properties/temperature 27.50
thermostat/thermostat/properties/floorTemperature 0.00
thermostat/thermostat/properties/deviceOn true
thermostat/thermostat/properties/locked false
thermostat/thermostat/properties/state off


Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *