SkillAgentSearch skills...

WThermostatBeca

Open Source firmware replacement for Tuya Wifi Thermostate from Beca and Moes with Home Assistant Autodiscovery

Install / Use

/learn @fashberg/WThermostatBeca
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

WThermostat - FAS-Fork

GitHub version GitHub release (latest by date including pre-releases) GitHub download Gitpod ready-to-code Github Actions

Fork of https://github.com/klausahrenberg/WThermostatBeca with some new features.

Replaces original Tuya firmware on Beca/Moes/Qiumi thermostat with ESP8266 WiFi module.

Supported Devices

The firmware has been tested or reported to work with following devices:

  • BHT-002 WiFi Thermostat
    • BHT-002-GALW (Water/Gas heating)
    • BHT-002-GBLW (Electrical floor heating)
    • BHT-002-GCLW (Water/Gas Boiler)
  • BHT-6000 WiFi Thermostat
    • BHT-6000-GALW, BHT-6000-GBLW, BHT-6000-GCLW
  • BHT-3000 WiFi Thermostat
    • BHT-3000-GALW, BHT-3000-GBLW, BHT-3000-GCLW
    • also known as BTH-3000L-ABLW, BTH-3000L-GBLW, BTH-3000L-GCLW
  • BAC-1000-ALW WiFi Thermostat for Conditioning (heating, cooling, ventilation)
    • also known as BAC-002-ALW

homeassistant

Features

  • No Cloud dependencies!
  • Enables thermostat to communicate via MQTT and/or Mozilla WebThings
  • Autodiscovery for WebThings via mDNS
  • Configuration of connection, device parameters and schedules via web interface
  • Provides NTP, time zone handling and Daylight-Saving-Calculation to set the clock of thermostat
  • Provides Fallback to Access Point mode if requested using panel-buttons
  • Reading and setting of all parameters via MQTT
  • Reading and setting of main parameters via WebThings
  • Only BHT-002-GxLW: actualFloorTemperature (external temperature sensor)
  • Only BAC-002-ALW: fanSpeed:auto|low|medium|high; systemMode:cooling|heating|ventilation
  • Reading and setting of time schedules via MQTT
  • Reading and setting of Schedules via Web-GUI
  • Automatic switching back to temperature-scheduling from manual mode next schedule interval (optional)
  • FAS-Fork enhancements
    • RelayStateCalculation - shows current state of heating/cooling - without soldering (fas)
    • Autodiscovery for Home Assistant via MQTT (fas)
    • Logging to MQTT (fas)
    • Logging to WebBrowser using Websockets (fas)
    • Captive Portal support for setup (fas)
    • show password in cleartext for setup (fas)
    • TimeBug Workaround (precicion fixed to 1 sec) (fas)
    • All State Information at status page (fas)
    • GitPod-Support (fas)
    • PlatformIO Direct OTA-Upload to device (fas)
    • Eco-Mode fixed to 20 degrees (fas)
    • RSSI Information (Info-Page, MQTT and Home-Assistant Support) (fas)
    • More detailed Documentation (fas)

(fas): Only available in -fas version

Hardware-Versions

You need the WiFi Version! (W in product name suffix, like -GALW). There are also a versions without WLAN (Offline-Version and ZigBee-Version (-GALZBW)). See Diagnose Can we add WiFi to Non-WiFi Thermostat bac-002.pdf

The BHT Version is for heating only. The BAC-Version has modes Cooling, Heating and Ventilation. The BHT-002-GA/GB/GC versions only differs in relays-wiring.

Difference between GA, GB and GC

  • GA - Water-Heating
    • Two Relays for opening and closing valve
    • Only one Relay will be closed at the same time
    • Closing Relay PIN 1 - PIN 3 (N or L)
    • Opening Relay PIN 2 - PIN 3 (N or L)
    • Product Spec says Max Power: 3 A
  • GB - Electric-Heating
    • Connect Heating between PIN 1 and PIN 2
    • Product Spec says Max Power: 16 A
  • GC - Water/Gas Boiler
    • One Relay - potential free (dry contact)
    • Relay on PIN 1 - PIN 2 (dry contacts)
    • Product Spec says Max Power: 3 A

Hardware Installation

Here a description of how to install the hardware - indepentdent from Open Source WThermostat. No special Hardware installation necessary for Upgrading to this firmware!

Download binaries

Pre-built binaries can be downloaded at releases-page.

Software Installation

:warning: Nearly all devices are now shipped with a new Firmware which cannot be upgraded Over The Air with non-tuya-servers. In this case you cannot longer use tuya-convert and you have to open the device for soldering or use a 3d-printed pogo-adapter.

You can install the firmware either

  • by using tuya-convert - no Hardware Modifications necessary
  • by soldering cables to the ESP-Modules using an ESP/Arduino-Programmer (3,3 Volt TTL)
  • by using OTA Upgrade on tasmota or other Open Source ESP Firmware

Yoube video of converting to 1.14-fas with tuya-convert: https://youtu.be/fqfghJqnK_8

Follow instructions here: Flashing.md

Initial configuration

  • The devices becomes an Access Point
  • Connect to WiFi Thermostat-xxxxxx with Password 12345678
  • Open http://192.168.4.1 or wait for Captive Portal to be opened on Android
  • Configure your WiFi Settings
  • After initial setup, the device configuration is available at http://<device_ip>/
  • Configure device model, clock and other settings

See Configuration.md for a detailed explanation of the setup.

Upgrading

You can Upgrade over the Air from other versions of WThermostatBeca on the Web-GUI. Please check all settings after Upgrade!

If you upgrade from Klaus-Ahrenberg's version, please note:

  • Only WLAN settings are kept
  • If you get "Not Enough Space" you can use WThermostat_1.xx-fas-minial.bin as interim version.
    • WLAN settings are kept
    • no MQTT, no Beca-control, no Clock in -minimal
    • Then Upgrade to normal version
    • Not necessary when upgrading from fas to fas versions

Screenshots

Main Screen:

setup_main

Network Screen:

setup_network

Schedule Screen:

setup_schedules

Live WebLog Screen:

weblog_screen

Integration in Home Assistant

homeassistant homeassistant hass_discovery

Controlling BAC in HomeAssistant

  • Use Operation to Switch between 'heat', 'cool', 'fan_only' and 'off'
  • Use Preset to switch between 'None' (manual), 'Scheduler' and 'eco'
  • Changing temp disables scheduler and switches to preset 'None'

homeassistant

HASS Autodiscovery

WThermostatBeca supports optional HASS-Autodiscovery since Version 1.08-fas. You must enable it at Thermostat (settings network) and of course it must be enabled in your HASS configuration.yaml file:

mqtt:
  broker: <ip of broker>
  discovery: true
  discovery_prefix: homeassistant

Use a persistent MQTT-Broker

You should use a persistent MQTT-Broker, keeping all retained messages during reboot/restart. HASS integrated MQTT broker is not persistent. Otherwise all autodiscovered messages are getting lost and you must reboot all devices, to send HASS autodiscover messages again! See: https://www.home-assistant.io/docs/mqtt/discovery/

Example for users of mosquitto, file mosquitto.conf:

persistence true
persistence_file mosquitto.db
persistence_location /var/lib/mosquitto/
autosave_interval 1800
# The default if not set is to never expire persistent clients.
persistent_client_expiration 24h

See https://mosquitto.org/man/mosquitto-conf-5.html for more details.

HASS Manual Configuration

For manual Configuration here is an example for your configuration.yaml file:

Heating:

climate:
  - platform: mqtt
    name: Room_Thermostat
    availability_topic: "home/room/tele/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    action_topic: "home/room/stat/things/thermostat/properties"
    action_template: "{{value_json.action}}"
    temperature_command_topic: "home/room/cmnd/things/thermostat/properties/targetTemperature"
    temperature_state_topic: "home/room/stat/things/thermostat/properties"
    temperature_state_template: "{{value_json.targetTemperature}}"
    current_temperature_topic: "home/room/stat/things/thermostat/properties"
    current_temperature_template: "{{value_json.temperature}}"
    mode_command_topic: "home/room/cmnd/things/thermostat/properties/mode"
    mode_state_topic: "home/room/stat/things/thermostat/properties"
    mode_state_template: "{{value_json.mode}}"
    modes: [ "heat", "auto", "off" ]
    preset_mode_command_topic: "home/room/cmnd/things/thermostat/properties/preset"
    preset_mode_state_topic: "home/room/stat/things/thermostat/properties"
    preset_mode_value_template: "{{value_json.preset}}"
    preset_modes: ["away"]
    min_temp: 5
    max_temp: 35
    temp_step: 0.5
    precision: 0.5

Air Conditioning:

The BAC-002/BAC-1000 does not support auto mode. The Device (MCU) can not switch automatically between heating, cooling or fan mode.

To Switch between Automatic Scheduling and Manual Mode we use 'holdState' with the following mode: 'scheduler' and 'manual', combined with mode 'eco'. If you choose 'None' it disables 'eco' and device jumps back to last mode (scheduler/manual). Do not use away_mode_ combined with holdState.

climate:
  - platform: mqtt
    name: Bedroom AC Control
    availability_topic: "home/bedroom/tele/LWT"
    payload_available: "Online"
    payloa

Related Skills

View on GitHub
GitHub Stars370
CategoryDevelopment
Updated22d ago
Forks73

Languages

C++

Security Score

80/100

Audited on Mar 18, 2026

No findings