revk / ESP32-Faikin

ESP32 based module to control Daikin aircon units
GNU General Public License v3.0
308 stars 45 forks source link

Demand control changes of onecta Daikin are not reflected on faikin webpage #288

Closed hokreb closed 3 weeks ago

hokreb commented 2 months ago

Faikin hardware 2024-01-06, I bought this module from Amazon germany. The faikin module is conntected by the s21 connected with an own made cable with plugs and crimpt with a tool. The cable is about 40cm long. The faikin software is updated by ota to the latest version. I have not changed any advanced settings

Daikin hardware FTXM42R, multisplit system with five indoor and one outdoor unit

Describe the bug If I change the demand control value in the onecta app, this change is not reflected on the faikin webpage. If I change the Fan mode (1, 2, 3, 4, 5), this is imediately reflected on the faikin webpage. It's also the other way around, if I change the demand control value in the faikin webpage, this change is not reflected in the onecta app (it needs to be restarted for getting updated data). This works without any problem with the fan mode.

The same thing happens with the Econo mode, the change in the onecta Daikin app is not reflected, but the Streamer mode is reflected immediately.

If I can help with activation of debug/dump messages, just give me instructions, I would be happy to help!

hokreb commented 2 months ago

As an additional finding, although the changes are not reflected the demand control goes active, which I see at the power usage, so this is not a functional problem.

revk commented 2 months ago

It is reverse engineered, but I think we have it right.

For one way, turning on the dump setting should provide some logs on MQTT.

If you can post those before and after the change, we can see what the aircon is telling the Daikin.

hokreb commented 2 months ago

So, I now have set dump mode on, and log the mqtt info topic (and also the error, event setting and command topics). When I set econo mode or change the demand control from 40 to 50 %, I do not see any "new" command or which is supposed to be the D7 command. When I set the eco mode by the faikin web ui, it tries to set it by the command "D7" and payload "]200", but after trying it 10 times, it fails and an error will be printed on the error topic (failed-set {"econo":true}). I have installed a second faikin modul to another indoor unit (I have five indoor units, but till this morning only one faikin installed), there is the behaviour the same, these indoor units only differ by the maximum heating/cooling power.

The setting of the demand control (40% ..100%) does need also several tries, sometimes an error will be send to the error topic. Sometimes after 8 tries the value is set and the state is updated.

Does the dump mode really dumps all commands, the indoor unit receives? Or is it a kind of internal debug mode, which sends all command/query over mqtt? Is there the possibility to eavesdrop the wifi modul to get the commands, it receives by the daikin cloud? I am myself into computer programming and embedded systems (although only from the programming side, not from the electrical side). I could even buy some stuff, to help out if it would be helpful, but I would need a concrete step by step guide for this.

revk commented 2 months ago

There is a debug as well, which may help.

hokreb commented 2 months ago

Is it possible to send s21 commands directly to the faikin? I am still not able to set the econo mode with the web ui from the faikin modul, I always got error (error/../failed-set {"econo":true}). Sometimes I see in the G7 Response the second position set to ascii char 8. So it would be interesting to see, what happend, if i send this command to the s21 port.

revk commented 2 months ago

You can send a command from MQTT. There is something in the manual pages for that.

miniluma commented 1 month ago

@revk Maybe related to this issue, if I try to modify the Demand value, I see an error in MQTT: image

It refers X50A protocol but I have S21.

miniluma commented 1 month ago

I enabled "debug" and "dump". If I understand the implementation correct, you expect Econo and Demand in S21_G7, right?

Question: How is the debug output encoded? So what do I get if e.g. s21_G7 = l2HP is shown?

revk commented 1 month ago

Unless you can find another S21 message that tells us what you want, the faikin won't be able to tell.

Maybe there is a system wide demand control or something that uses different messages?

miniluma commented 1 month ago

I had to correct my writing. After a Power reset of the Daikin Unit (complete switch off and on), I see G7 messages, when I modify it in the App. But it will not be shown in the faikin demand value. And setting a new value in the faikin does not reflect in a change in the App. Maybe they modified the message or it's a bug in the Daikin 1.30 Firmware.

So again my question regarding the encoding. I'd like to understand what I see.

revk commented 1 month ago

The S21 messages use a fun range of different codings. I'll check this one shortly and let you know.

revk commented 1 month ago

OK for this one, the first character in G7 is demand, and is coded as the character '0' (0x30) plus a number 0 to 100.

Econo mode is second character, coded as '0' or '2'

miniluma commented 1 month ago

Here is what I see:

  1. I set demand in Faikin Webapp -> rx_G7 shows the set value after a couple of seconds -> I do not see a change in value in the app

  2. I change the value in the app -> no update in rx_G7 (so no update in the Faikin Webapp or MQTT)

Econo works as expected: A change in the Faikin Webapp or the Daikin App is visible in rx_G7 Side note: Sometimes I see Values different from '0' or '2' in the rx_G7 message. E.g. I noticed a ':'.


In the G7 message, there are 2 more bytes. I see frequent changes there. Do you have an idea what they are for?


To look for unknown messages

revk commented 1 month ago

Some of the S21 has been documented but not entirely up to date, and it would be a good project to get a lot more up to date.

No I don't know what the other two bytes are (yet).

Where do you see 024/025?

miniluma commented 1 month ago

rx/tx_dump starts with 024 or 025. E.g "0253643632304F03"

revk commented 1 month ago

That is the raw packet in hex

0253643632304F03

02 is start 53 S 64 d 36 6 32 2 30 0 4F O 03 is end

(Off the top of my head ASCII)

Easier to look at the decoded messages.

miniluma commented 1 month ago

Holy shit! I just installed a new faikin on a 2MX unit. I think with Firmware 1.30, Daikin made a major improvement: It was always unclear how the Multi-Split units behave with different demand values of the indoor units.

Now, I see the following:

Unit A and B have Demand 50 set. Action: Unit A App -> Demand to 40 (lower than Unit B) Unit B sees no message. After a while, Unit A jumps back to 50. Action: Unit A App -> Demand to 60 (greater than Unit B) Unit B gets a message and also jumps to 60.

The same if you set it in the Faikin WebApp. It seems to use the highest set value. To set a lower value, At least the value of the unit with the highest value must be modified. Otherwise, changes in Units with lower values jump back to the value of the higher one.

Why I saw no message: I tested with a 4MX Multi-Split but focussed on a single indoor unit and I had to powercycle the outdoor unit!

@revk Everything is fine ;-) @hokreb Hast du die Daikin Firmware 1.28 oder über die App 1.30? Hast du auf deinem Faikin in UZpdate gemacht? Kannst du mal deine gesamte Anlage für in paar Minuten Stromlos machen?

hokreb commented 1 month ago

So, I have firmware 1.28, didnt start the update, as I was to suspicious they change something, which makes the faikin not work anymore (maybe too cautious). What I observed was that the econo mode was not selectable by the faikin, then I needed to switch if the power of the whole climate, than I could use the econo mode by faikin. But before I observed, if I use indoor kitchen system to change demand value, I only can use exact this system to change it again. It was really strange, but maybe this has to do with the global aspect of demand control. Unfortunately this week was so busy, that I didn’t find time to play around more with it. I have the feeling, that if the ONECTA takes control, the faikin commands do not „work“ anymore regarding demand and econo feature. Tomorrow I try to get a better understanding for this.

miniluma commented 1 month ago

So, I have firmware 1.28, didnt start the update, as I was to suspicious they change something, which makes the faikin not work anymore (maybe too cautious). What I observed was that the econo mode was not selectable by the faikin, then I needed to switch if the power of the whole climate, than I could use the econo mode by faikin. But before I observed, if I use indoor kitchen system to change demand value, I only can use exact this system to change it again. It was really strange, but maybe this has to do with the global aspect of demand control. Unfortunately this week was so busy, that I didn’t find time to play around more with it. I have the feeling, that if the ONECTA takes control, the faikin commands do not „work“ anymore regarding demand and econo feature. Tomorrow I try to get a better understanding for this.

Do you have a Single or Multi Split?

hokreb commented 1 month ago

Multisplit with five indoor units

hokreb commented 1 month ago

Today I played a little bit, but I don't get any clues. When I try to set the econo mode over faikin website, econo mode does not get set, after a while (10-20 sec) the econo mode get switch off again. When I switched on the econo mode once with the ir remote, I can set on/off the econo mode by the faikin website without any problem. I can repeat this on another indoor system, it's exact the same behavior, before I can control the econo mode by faikin website, I have to set it on/off by the ir-remote at least once. And only

hokreb commented 1 month ago

And after I switched of the econo mode with the remote the return value of G7 is "g8Xe". This should be "g0Xe".

revk commented 1 month ago

I've started an S21.md to write up what we find.

miniluma commented 1 month ago

@revk I observed something: With my Single Split, it stops working after a while. But it seems to be something in the AC-Firmware. Let me explain:

AC is powered off. (really powered off, not just switched off) I switch the AC on I see S21 G7 with the Demand value I set in the App. When I change it in the App, I see a new G7 with the according value after some seconds. When I change it in the Faikin Webapp, I see it in the Daikin App.

After some hours, the G7 message shows Demand value '0' (=100), which is reflected properly in Faikin. If I change the value in the Daikin App, there will be no more G7 updates. If I change it in the Faikin WebApp, I see it again in the G7, but not in the Daikin App. After a while (some hours or so), the G7 jumps back to '0' (and Faikin to 100 accordingly).

When I power cycle the AC, it starts from the beginning. So Faikin does it right according to the S21 G7, but the Firmware or Daikin App does some weird stuff.