Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support powerful and econo modes #9

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

ddv2005
Copy link

@ddv2005 ddv2005 commented Jul 13, 2023

No description provided.

@MassiPi
Copy link

MassiPi commented Jul 14, 2023

this is working only for some units, should we make this in someway conditional?

@ddv2005
Copy link
Author

ddv2005 commented Jul 16, 2023

Added has_preset config option in 605db07

@@ -30,6 +31,7 @@
cv.Optional(
CONF_SETPOINT_INTERVAL, default="300s"
): cv.positive_time_period_seconds,
cv.Optional(CONF_HAS_PRESETS, default=True): cv.boolean,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaulting to True here is backwards-incompatible and will break existing configs for some units. For instance, my units do not support the F6/F7 queries (even though they do support powerful mode). As a result, building my existing configs with this change causes the unit to report incorrect data to Home Assistant, but setting this to false fixes the issue.

An alternative would be some sort of graceful degradation in the event presets do not work, though that would require some reworking of how the module elects which queries to use. This would be a worthwhile/valuable enhancement in general, as I suspect there are going to be more cases where different queries are required, but I don't expect that in this PR.

@danijelt
Copy link

I was recently working on this independent of this pull request and I also found that my unit won't accept what's sent in D6/D7 (F6/F7) queries. Interestingly, if I change the preset via remote, it will correctly report back powerful or eco mode. I was thinking that maybe it could be toggled via YAML?

@wrouesnel
Copy link

Seems like this PR would benefit from merging with changes in #11 which adds the concept of failable queries?

@danijelt
Copy link

@wrouesnel Maybe for some units? My FTXC-D responds with success to these queries but it doesn't change the mode (it returns 0x00s in the packet). Alhough it does report the correct mode when I change it with IR remote.

However, the pull requests are in conflict with their queries array which would have to be addressed when merging.

All in all, I think there's still too many unknowns in S21 protocol to correctly implement everything for all units. In the end, I resorted to capturing the IR signals sent by original remote and implementing that in a custom ESPHome component. That way, I also get econo+sleep mode (while I couldn't find any reference to the sleep mode in reverse engineered S21 docs at all).

@wrouesnel
Copy link

By comparison to the ESP32-Faikin project, if you look at https://github.com/revk/ESP32-Faikin/blob/d1c87cdb4c49ee9d6dd9d10e5c863b9341edeae4/ESP32/main/Faikin.c#L416 then it looks like it's possible that the mode change on your might actually be reported as "G3". When I run debug protocol on the unit I have access to FTXD80CV4 I get no response for F6, but I do get a response for G3 (which faikin revk concludes is a synonym for G6).

This is a unit at my parents place so I'm not sitting in front of it with the remote, but I'll see if I can map out what's happening - it's possible your issues are just that the response codes are all over the place (if it works I'll borrow the work here and try and see if using it in #11 can make it reliable).

[03:10:30][D][climate:380]: 'Air Conditioning' - Sending state:
[03:10:30][D][climate:383]:   Mode: OFF
[03:10:30][D][climate:385]:   Action: OFF
[03:10:30][D][climate:391]:   Custom Fan Mode: 5
[03:10:30][D][climate:400]:   Swing Mode: BOTH
[03:10:30][D][climate:403]:   Current Temperature: 22.00°C
[03:10:30][D][climate:409]:   Target Temperature: 0.00°C
[03:10:30][D][daikin_s21:304]: S21: G1 -> 03B7 (4)
[03:10:30][D][daikin_s21:304]: S21: G5 -> 7?0\x80 (4)
[03:10:30][D][daikin_s21:304]: S21: Sd -> 000 (3)
[03:10:30][D][daikin_s21:271]: NAK from S21 for F6 query
[03:10:30][D][daikin_s21:271]: NAK from S21 for F7 query
[03:10:30][D][daikin_s21:271]: NAK from S21 for F9 query
[03:10:31][D][daikin_s21:304]: S21: SH -> 022+ (4)
[03:10:31][D][daikin_s21:304]: S21: SI -> 002+ (4)
[03:10:31][D][daikin_s21:304]: S21: Sa -> 081+ (4)
[03:10:31][D][daikin_s21:304]: S21: SL -> 000 (3)
[03:10:31][D][daikin_s21:405]: ** BEGIN STATE *****************************
[03:10:31][D][daikin_s21:407]:   Power: OFF
[03:10:31][D][daikin_s21:410]:    Mode: Cool (idle)
[03:10:31][D][daikin_s21:413]:  Target: 19.0 C (66.2 F)
[03:10:31][D][daikin_s21:415]:     Fan: 5 (0 rpm)
[03:10:31][D][daikin_s21:417]:   Swing: H:YES V:YES
[03:10:31][D][daikin_s21:419]:  Inside: 22.0 C (71.6 F)
[03:10:31][D][daikin_s21:421]: Outside: 18.0 C (64.4 F)
[03:10:31][D][daikin_s21:423]:    Coil: 20.0 C (68.0 F)
[03:10:31][D][daikin_s21:425]: ** END STATE *****************************
[03:10:31][D][daikin_s21:392]: ** UNKNOWN QUERIES **
[03:10:31][D][daikin_s21:304]: S21: G2 -> <;\x00\x80 (4)
[03:10:31][D][daikin_s21:361]: Unknown response G2 -> "<;\x00\x80"
[03:10:31][D][daikin_s21:304]: S21: G3 -> 0000 (4)
[03:10:31][D][daikin_s21:361]: Unknown response G3 -> "0000"
[03:10:31][D][daikin_s21:304]: S21: G4 -> 0\x00\x80\x00 (4)
[03:10:31][D][daikin_s21:361]: Unknown response G4 -> "0\x00\x80\x00"
[03:10:31][D][daikin_s21:304]: S21: G8 -> 0\x00\x00\x00 (4)
[03:10:31][D][daikin_s21:361]: Unknown response G8 -> "0\x00\x00\x00"
[03:10:31][D][daikin_s21:271]: NAK from S21 for F9 query
[03:10:31][D][daikin_s21:271]: NAK from S21 for F0 query
[03:10:31][D][daikin_s21:271]: NAK from S21 for FA query
[03:10:31][D][daikin_s21:271]: NAK from S21 for FB query
[03:10:31][D][daikin_s21:271]: NAK from S21 for FC query
[03:10:31][D][daikin_s21:271]: NAK from S21 for FD query
[03:10:31][D][daikin_s21:271]: NAK from S21 for FE query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FF query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FG query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FH query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FI query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FJ query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FK query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FL query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FM query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FN query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FO query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FP query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FQ query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FR query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FS query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FT query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FU query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FV query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FW query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FX query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FY query
[03:10:32][D][daikin_s21:271]: NAK from S21 for FZ query

@danijelt
Copy link

danijelt commented Dec 22, 2023

I think I didn't experiment with F3, but, as I said, my AC won't change the mode when sending F5/F6, but it will report back powerful mode in G5/G6 if set on remote. I'm sitting right next to it when experimenting so I'd know if it reacted to the command.

But, even if F3 would set powerful mode, it won't set eco mode according to Faikin's code, and there's no documented way to enable sleep mode at all, which is a must for me (sleep+eco mode can be enabled with original IR remote).

I got a B45 adapter which is listed as compatible with FTXC-D, but the problem is that it doesn't offer powerful/eco/sleep modes, they're missing from both the old and the new Daikin Android app - so I can't capture the command that it would send. I read somewhere that some adapters don't offer all features, so maybe B41 or B42 would do the trick, but at the prices of 40-50 euros/dollars per adapter, I don't plan on spending a small fortune on experimenting when a 50 cent IR diode soldered to ESP8266 does the trick. Unless someone wants to trade their extra adapter for my B45.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants