esphome-daikin-s21
esphome-daikin-s21 copied to clipboard
Issues with FTXC-D (and other units)
Follow up to issue in ESP32-Faikin: https://github.com/revk/ESP32-Faikin/issues/62.
The first problem is that some units don't have TX line inverted and they require level shifter because the unit won't respond to 3.3V signal on RX line. This can be solved by inverting the ESP's RX line and adding level shifter (or modifying the Faikin PCB as documented there in the new design), so it can just be noted in the README of this port.
The second, bigger problem, is that my FTXC60D replies to RH, RI, Ra and RL commands with NAK. And this ESPHome port heavily relies on temperature received from RH query to calculate offset and setpoint, making it unusable and causing all settings to reset to default (temperature set to 0 degrees, state off) on every status update because update()
returns false
I was able to make it usable with this simple patch:
diff --git a/components/daikin_s21/climate/daikin_s21_climate.cpp b/components/daikin_s21/climate/daikin_s21_climate.cpp
index cc3cc30..7540e33 100644
--- a/components/daikin_s21/climate/daikin_s21_climate.cpp
+++ b/components/daikin_s21/climate/daikin_s21_climate.cpp
@@ -95,7 +95,7 @@ float DaikinS21Climate::get_effective_current_temperature() {
}
float DaikinS21Climate::get_room_temp_offset() {
- if (!this->use_room_sensor()) {
+ if (this->use_room_sensor()) {
return 0.0;
}
float room_val = this->room_sensor_degc();
diff --git a/components/daikin_s21/s21.cpp b/components/daikin_s21/s21.cpp
index 45d6e56..7c219fb 100644
--- a/components/daikin_s21/s21.cpp
+++ b/components/daikin_s21/s21.cpp
@@ -354,7 +354,7 @@ bool DaikinS21::run_queries(std::vector<std::string> queries) {
}
void DaikinS21::update() {
- std::vector<std::string> queries = {"F1", "F5", "RH", "RI", "Ra", "RL", "Rd"};
+ std::vector<std::string> queries = {"F1", "F5", "Rd"};
if (this->run_queries(queries) && !this->ready) {
ESP_LOGI(TAG, "Daikin S21 Ready");
this->ready = true;
This is a simple fix for my case where I have defined a temp sensor from HA, and the code is happy with it.
What would be the best approach for an universal fix? My idea is to add a config flag that would set set_supports_current_temperature
to false and disable all calculations. Since this is just a convenient feature enabled by the link to Home Assistant, it shouldn't be a hard requirement. Or, alternatively, make adding external sensor mandatory if the unit doesn't respond to RH so we don't break the user's expectation about the look of a climate component?