wow, very Thanks
sorry if I ask you, were you able to configure the rest as well? how to switch the thermostat on and off? and its other functions as locked and ecomode? and the weekly programming? Thanks
In order: lock, screen, eco
- platform: mqtt
name: "Lock Termostato Camera"
state_topic: 'termostato/camera/state'
value_template: "{{ value_json.locked }}"
command_topic: 'termostato/camera/locked'
payload_on: "true"
payload_off: "false"
state_on: true
state_off: false
qos: 0
retain: false
- platform: mqtt
name: "Schermo Termostato Camera"
state_topic: 'termostato/camera/state'
value_template: "{{ value_json.deviceOn }}"
command_topic: 'termostato/camera/deviceOn'
payload_on: "true"
payload_off: "false"
state_on: true
state_off: false
qos: 0
retain: false
- platform: mqtt
name: "Eco Mode Termostato Camera"
state_topic: 'termostato/camera/state'
value_template: "{{ value_json.ecoMode }}"
command_topic: 'termostato/camera/ecoMode'
payload_on: "true"
payload_off: "false"
state_on: true
state_off: false
qos: 0
retain: false
Binary sensor for on/off status:
- platform: template
sensors:
termostato_camera:
friendly_name: "Stato Termostato Camera"
value_template: "{{ (state_attr('climate.camera','current_temperature')) < (state_attr('climate.camera','temperature')) }}"
Temperature Report Sensors: current and desidered
- platform: template
sensors:
temperatura_camera:
friendly_name: "Temperatura Camera"
unit_of_measurement: '°C'
value_template: "{{ (state_attr('climate.camera','current_temperature')) }}"
temperatura_termostato_camera:
friendly_name: "Termostato Camera"
unit_of_measurement: '°C'
value_template: "{{ (state_attr('climate.camera','temperature')) }}"
That’s all I’ve configured, To manually turn on/off the thermostat internal relay maybe a workaround is possible: Make a template switch that sets the temperature to max temp / min temp.
Thank you, I don’t know why on 3 thermostats one makes a fuss, when ravvio home assistant lights up and goes off and I have to switch it on manually again.I prvatyo to reset it and ring it but nothing. Thanks cmq for everything.
I’ve similar problem on hass restart (temperature setting was wrong). Probably is something related to mqtt retain. Try to make an automation that sets correct desidered value on hass restart.
Sorry, to get the configuration working with that config,
climate:
- platform: mqtt
name: Camera
value_template: >-
{% set values = {'false':'auto','true':'heat'} %}
{{ values[value] if value in values.keys() else value }}
modes:
- "heat"
- "auto"
- "off"
initial: 5
mode_command_topic: "termostato/camera/mode"
temperature_command_topic: "termostato/camera/desiredTemperature"
mode_state_topic: "termostato/camera/state"
mode_state_template: "{% if value_json.actualTemperature > value_json.desiredTemperature %}
off
{% else %}
{% if value_json.manualMode == true %}
heat
{% else %}
auto
{% endif %}
{% endif %}"
current_temperature_topic: "termostato/camera/state"
current_temperature_template: "{{ value_json.actualTemperature }}"
temperature_state_topic: "termostato/camera/state"
temperature_state_template: "{{ value_json.desiredTemperature }}"
min_temp: 5
max_temp: 35
temp_step: 0.5
You have to add that automations:
- alias: 'hvac_auto camera'
trigger:
platform: mqtt
topic: termostato/camera/mode
payload: 'auto'
action:
service: mqtt.publish
data_template:
topic: 'termostato/camera/manualMode'
payload: 'false'
- alias: 'hvac_man camera'
trigger:
platform: mqtt
topic: termostato/camera/mode
payload: 'heat'
action:
service: mqtt.publish
data_template:
topic: 'termostato/camera/manualMode'
payload: 'true'
- alias: 'hvac_off camera'
trigger:
platform: mqtt
topic: termostato/camera/mode
payload: 'off'
action:
- service: mqtt.publish
data_template:
topic: 'termostato/camera/manualMode'
payload: 'true'
- service: mqtt.publish
data_template:
topic: 'termostato/camera/desiredTemperature'
payload: '5'
About schedules and other mqtt commands refer to https://github.com/klausahrenberg/WThermostatBeca
but keep in mind that where the mqtt command is:
<YOUR_TOPIC>/schedules/0
it means
<YOUR_TOPIC>/schedules
and 0
as PayLoad for readings
for setting the schedules the Payload is in Json Format
Hey, awesome work, if that really works!
But I can’t get the custom component to work. I’ve created all the files and edited the climate.py file.
How do I get that custom component to show up in my lovelace UI though? I am struggleing with that atm.
Your climate.py file has a syntax error at the end. “_LOGGER.debug(“Update Fail, maybe device busy”)” rather than “_LOGGER.debug(“Update Fail, maybe device busy”)```”
Thanks, fixed that.
I didn’t get your custom component to work though! Does it work for you?
I managed to flash my thermostat with a custom sonoff software and made a mqtt climate component.
Well, yes it does. But, as many people before me and i’m sure after me, I have soldered thermostate and changed firmware. There is one fatal caveat using thermostat with original firmware.
You cannot close internetl access for it. Because there is only one way it cat get current time - by connection to tuya servers. You cannot set NTP server or somethong similar on it.
So, it’s better to change firmware and.
Hi, can you explain your setup to flash the new firmware?
I have a BHT-6000 but I’m not able to put It in programming mode with serial method.
I followed klausahrenberg flashing page but It doesn’t work for my device.
Esptool Is unable to connect.
As I remember I’ve followed the setup in https://github.com/klausahrenberg/WThermostatBeca/blob/2df063b09bcd5a56616c81802e1ade4b8fc4e5db/Flashing.md
Before soldering try the solderless option, I’ve read some good report about that.
For the solder-way try with a different ftdi converter, as I remember, I had some issues with one of mine.
Hi all,
Thanks for all your inspiration here on this thread, especially to Fraschi.
After a lot of time tinkering, I have now 4 BHT-002-GBLW(Wifi) Tuya thermostats flashed with Klaus Ahrenberg’s amazing 3rd party bin file. These thermostats are for electric underfloor heating mats but I am sure it works for the other types as well.
To flash those, I used Tuya convert and followed Digiblurs Video to the dot: https://www.youtube.com/watch?v=dt5-iZc4_qU&t=68s
I used WThermostat_1.00.bin as 0.95 didn’t quite work for me.
Hopefully, this helps someone else but let me know in case you require some further input.
Happy heating!
Hi, guys can you help me? What I need to do if i want to use tuya cloud but with your integration?
Good day, i have a hardware related question. I flashed the thermostat and it’s working well.
It controls air conditioning units.
Problem I have is the installed valve/actuator is of this type which effecviely uses 230volts, whilst the thermostat valve control is ver low voltage.
any recommendation on a replacement valve or any other solution is welcome.
thank you
hello and big thank you, it works but eco mode not.
is this normal? thank you
Hi. I’m glad You like it. Unfortunatelly, I don’t Yuse this code anymore. As most of owner this kind of thermostat I have changed firmware and use it natively in HA.
I can recommend this firmware.
I just ordered a theromstat BW 002 To see if it works Once setup I’ll make a post. Very excited if it works
Hello all, new HA newbie mate speaking here
I bought the Bht-6000 thermostat a while ago and I’m trying to get the most out of it. I followed another guide which was intended for the implementation of a climate component for tuya devices, and so far it seems to work fine. I can turn the screen on/off, set the temperature and I managed to have a switch to turn the auto to manual mode via a custom scene made within the Tuya app. Now I tried to read what was written here in this thread, but I’m a bit lost amongst the various configurations, soldering, flashing and so on… So my question would be: is there a chance to have everything which I described above without using the Tuya cloud and without the need of flashing/soldering anything? I was looking at this too: https://esphome.io/guides/getting_started_hassio.html but I’m not sure it’s good for me…