Convert dumb thermostat into a smart one (HY08)

As I was once looking to buy new thermostats, but failed to find a suitable one, and having been tinkering with ESP chips and soldering, I decided to look inside my current thermostats.

Amazingly, I noticed a slot that looked exactly like it would fit and ESP chip. I think they produce the circuit boards the same, and add the chip to sell at twice the price.

For anyone looking to do the same from search, the exact model of the thermostat is:

    hw_version: "V1.2 20200318"
    model: "HY08-1MB_WE3_V12_TWT / HY08WE1W(24)"

So I flashed ESPHome onto an ESP12, soldered it on, plugged the thermostat back in and was happily greeted with a new available device. Sadly ESPHome didn’t provide a compatible component for thermostats. So i found a project - GitHub - klausahrenberg/WThermostatBeca: Replaces original Tuya firmware on Beca thermostat with ESP8266 wifi module

Which worked! (version 1.19 only, the beta versions didn’t work)

I added it to Home Assistant with some problems, since the firmware mqtt messages have different formats.

    - name: Livingroom
      object_id: thermostat_78169
      mode_command_topic: "livingroom/thermostat/set/mode"
      mode_state_topic: "livingroom/thermostat/state/mode"
        - "auto"
        - "off" 
        - "heat"
        - "cool" 
      current_temperature_topic: "livingroom/thermostat/state/temperature_template"
      temperature_command_topic: "livingroom/thermostat/set/targetTemperature"
      temperature_state_topic: "livingroom/thermostat/state/targetTemperature"
      power_command_topic: "livingroom/thermostat/set/deviceOn"      
      initial: 23
      max_temp: 30
      min_temp: 18
      precision: 1.0
      temp_step: 1
      json_attributes_topic: "livingroom/thermostat/state"
      json_attributes_template: "{{ value_json | tojson }}"
      retain: true
        identifiers: "thermostat_78169"
        hw_version: "V1.2 20200318"
        model: "HY08-1MB_WE3_V12_TWT / HY08WE1W(24)"
        manufacturer: "Node Next" 
        suggested_area: livingroom
        sw_version: "1.19"
        configuration_url: http://thermostat_78169.local/config

The firmware doesn’t say when it’s heating or off, so I created a an automation to publish the state, depending on current_temperature and target_temperature

  - service: mqtt.publish
      topic: bedroom/thermostat/state/mode
      payload: >-
        {% if states('sensor.thermostat_10373_deviceon') == 'True' %}
          {% if (states('sensor.thermostat_10373_target') | int + 1)  > states('sensor.thermostat_10373_temperature') | int  %}
          {% elif (states('sensor.thermostat_10373_target') | int + 1)  <states('sensor.thermostat_10373_temperature') | int  %}
          {% else  %}
          {% endif %}
        {% else %}
        {% endif %}
      retain: true          

Which now nicely colors the thermostat in Lovelace UI when it’s heating orange, cooling blue, etc.

Now I’m very happy with a homemade smart thermostat.

During the process I blew 1 thermostat up (wrong firmware OTA update made it switch on and off quickly), and blew the main heating fuse. But all good now, the fuse was 50 cents. :smile: Just got to find a new thermostat for the cold bathroom now…

Hope it helps someone with the same device, it seems a cheap common one in EU. :fire:


Nice, well done!

Don’t you think this fits better under the Share your Projects! - Home Assistant Community section?

I thought so, but there were only software categories, maybe a moderator can find a better place to move it.