revk / ESP32-Faikin

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

[BUG] Demand control cannot be set anymore #339

Open eupesco opened 1 month ago

eupesco commented 1 month ago

Daikin hardware S21, 3MXM40A9 + 2x CTXM15R + 1x FTXM20R

Describe the bug When I try to change the demand control to another value (HA or directly on Faikin webpage), it is alway reset to previous value. In MQTT, message failed-set demand is displayed.

revk commented 1 month ago

That means the Daikin is not accepting the message. You can dump S21 messages if you like.

This is not a bug, it is correctly logging that it failed to set.

The fix is turn off demand control feature in the settings.

eupesco commented 1 month ago

I am just wondering, because it worked properly for a long time and then suddenly it stopped working. Now when I set a new demand control value in the Onecta app, the new value is not synchronized in Faikin (and vice versa) and it seems that some S21 message is sent in G07 . I could also see there some strange values in the demand control MQTT message (like 61, 49 which are not really possible) when I set a value in the Onecta App. Is it maybe related to the latest firmware update of the Daikin WiFi module (1_31_0)?

revk commented 1 month ago

OK, then something is odd.

Can you get a dump of the S21 messages when you make a change?

eupesco commented 1 month ago

Message G7 is correct? I did some changes in the Onecta app and here are the G7 messages (after change, there were several G7 messages): Demand off: N0A= / N0A> Demand 60: N0A; / N0A: Demand 50: N0A9 / N0A8 / N0A7 Demand 95: N0A6 / 50A6 / 50A5 Demand 50: 50A4 / N0A4 / N0A5 / N0A4

revk commented 1 month ago

Ok and changing on Faikin, is it sending the messages to make a change?

We should be sending a D7

What is interesting is that my code has D7 where demand is in the first byte. Your logs suggest the last byte changing mostly. Can you provide the exact logs from MQTT of the faikin sending D7 and getting G7 responses?

eupesco commented 1 month ago

I am setting demand control from 70 to 50 in Faikin, D7 b000 is sent several times. G7 is not changing (it stays N0BC in my case). Error failed-set = {"demand":50} is displayed.

What is more strange: when I look in MQTT explorer in Faikin (not in info) , I see changes in demand control although G7 has not changed: "demand": [ 50, 58, 70 ], (these messages are red, current value in green is 70).

revk commented 1 month ago

That status is a min/ave/max value over a reporting period, it thinks it has changed until it gives up, so a red herring.

I have not changed how D7/G7 works so not sure how this worked for you before.

The issue looks like we change the first byte, but you are seeing changes in last byte. And the last byte is not changing by anything like the amount I would expect. So this looks like a protocol difference in your model.

eupesco commented 1 month ago

Yes, it worked perfectly before - I used it a lot with HA automations for example.

The only change that was made was the mentioned fw update of the WiFi module (BRP069C4x to version 1_31_0). Do you think it could be related to this?

eupesco commented 1 month ago

I tried it with another indoor unit. Demand control is 70 according to Faikin (in Onecta 50%): G7 N0ED I set in Faikin to 50: D7 b000 Several changes to G7: N0EE N0ED N0EE N0ED --> failed-set

Third indoor unit: Demand control is 70 according to Faikin (in Onecta 50%): G7 N0@G I set in Faikin to 50: D7 b000 No chanes in G7 (stays N0@G) and error is displayed

revk commented 1 month ago

I really do not think I have changed demand control logic at all - do feel free to look at the commits. I am not sure what the fw update comment was to be honest. Where was that - in a commit? Which one?

eupesco commented 1 month ago

Sorry for confusion - the firmware update was done on the Daikin internal WiFi-module - nothing to do with Faikin.

revk commented 1 month ago

OK, does that update firmware in your Daikin itself as well? Could it be that your Daikin now has different messages than before. That would explain it. I mean I thought Faikin replaced the Daikin WiFi module.

It may be we can work out what messages it now expects, but they don't look as obvious at all.

eupesco commented 1 month ago

I would expect that only WiFi has been updated (due to the changes to Daikin cloud) - I can't say for sure, but I think the SW version of the indoor units hasn't changed (SW 20003002, EEPROM 12FC). And it looks like only demand control is affected. Why would Daikin change just that?

Does anybody have an comparable configuration of Daikin (so WiFi BRP069C4x with 1_31_0)?

MUN0X commented 1 month ago

Have you tried setting all units to 100% and then changing the value of just one indoor unit?

eupesco commented 1 month ago

More weird things are happening: I set all units to 100% in the Onecta app and I can see in Faikin MQTT messages 100%. But in the info status MQTT messages, the demand control has NOT changed to 100% (stays at 70%).

Now when I change the demand control of one unit to 40% in the Faikin web page, the following happens:

When I change one back to 100:

The error message is now only shown occasionally. I don't have any HA automation active, that changes demand control.

Looking at the S21 messages: demand is at 90 -> G7 :0BF and :0BE (changing) other unit at 90 -> G7 :0@H changing to 60 on one unit: G7 N0@H other unit changes also to 60: G7 N0BF

D7 message is only sent to one unit - anyway all other unit change, too.

revk commented 1 month ago

There are different messages you can turn on and off. The one you are looking at is almost certainly the periodic summary, I think usually every minute, and shows min/ave/max for the period. There is a setting for live status messages if you want.

eupesco commented 1 month ago

I activated live livestatus but I still see the interim values (like 86, 82, etc.). I also disconnected the units from the mains - and now the behaviour is worse again (currently I only get failed-set errors).

Do you have any idea what might be wrong with my setup? Is there anything else I can check?

revk commented 1 month ago

There are settings and commands to allow you to see the S21 messages each way and generate custom S21 messages for you to test.

No, I don't have any ideas why your unit is being odd.

eupesco commented 1 month ago

This is a great pity :(. Is there an easy way to flash an older version of the Faikin fw, for example from February (so a time when it certainly worked properly)?

revk commented 1 month ago

You have to check out old version from GitHub, and either manually flash the binary from that (there are instructions somewhere) or build and flash.

eupesco commented 1 month ago

Ok, doesn't seem to be that easy. Maybe this is a stupid question, but is it possible that you upload the 2024-02-28 release for S3 (https://github.com/revk/ESP32-Faikin/commit/0cfe2ac6384c0fdf76b788646552f14c5bc69643) to beta for a few minutes so that I can just OTA flash it?

revk commented 1 month ago

People auto load code so I would rather not. You can change the URL it uses for OTA to something where you put that binary...

eupesco commented 1 month ago

Good idea, tried it but I get error upgrade check failed. I'll give up for now :(

MUN0X commented 1 month ago

More weird things are happening: I set all units to 100% in the Onecta app and I can see in Faikin MQTT messages 100%. But in the info status MQTT messages, the demand control has NOT changed to 100% (stays at 70%).

Now when I change the demand control of one unit to 40% in the Faikin web page, the following happens:

  • info MQTT demand message changes to 40
  • Faiking MQTT messages show some strange values like 68 until it changes to 40
  • Strangely all units are set 40

When I change one back to 100:

  • status message changes to 100 at the changed unit
  • Faikin messages change from 40 to 44 to 100
  • All other units change to 100: Faikin messages change on one from 40 to 86 to 100 - other from 40 to 88 to 100
  • Info state messages of the other units: one stays at 40, the other changes to 70.

The error message is now only shown occasionally. I don't have any HA automation active, that changes demand control.

Looking at the S21 messages: demand is at 90 -> G7 :0BF and :0BE (changing) other unit at 90 -> G7 :0@H changing to 60 on one unit: G7 N0@H other unit changes also to 60: G7 N0BF

D7 message is only sent to one unit - anyway all other unit change, too.

In my experience, that is how its supposed to work.

In a multi-split system demand control seems to behave strangely when setting various values on multiple units simultaneously. It is unclear which value or unit gets priority. As i mentioned in another topic, this behavior seems to have changed with firmware updates in recent years.

In the end, demand control applies to the outdoor unit so it doesnt really matter that you set it for every unit individually. I just set all my unit to 100% and chose 1 unit to change demand control with. Whenever I want to change the demand control I change it on that particular unit and all other units just follow suit.

eupesco commented 1 month ago

Yes, that's right. The demand control only applies to the outdoor unit. However, the description in the Onecta app is different: it says, that the least restrictive demand control value set in an indoor unit is applied to all the indoor units (e.g. if you set the units to 50%, 60% and 80%, 80% is used for the outdoor unit).

Unfortunately, I still have the problem that I can no longer set the value correctly via Faikin.

revk commented 1 month ago

As I say, if you can work out there required S21, I can add it. Sadly I do not have every model of Daikin on hand here to try and debug such things myself here.

eupesco commented 1 month ago

Yes, that is absolutly clear. However, I am still not able to get an older sw version of Faikin running to check if the problem is on Faikin or Daikin side :(

wurmtal868 commented 2 weeks ago

I had a similar issue with my 3MXM40 a while ago. I fixed it by sending every change in demand control to all indoor units connected to the same outdoor unit. When the indoor units request different demand values the outdoor unit seemed to reject changes until all request the same value.

MUN0X commented 2 weeks ago

I had a similar issue with my 3MXM40 a while ago. I fixed it by sending every change in demand control to all indoor units connected to the same outdoor unit. When the indoor units request different demand values the outdoor unit seemed to reject changes until all request the same value.

Thats how the old daikin app used to do it

hokreb commented 2 weeks ago

I had the same problems in spring this year (~march). I was only able to resolve this by switching the fuse to make the complete units currentless. After that, everything worked again, I tried several things, but never have any hint what was wrong. And I also use only one specific dedicated indoor unit to change the values of demand control (that means, I use always the same), otherwise, sometimes things get out of order.

eupesco commented 2 weeks ago

I still have the problem. @wurmtal868 : I have an automation in HA, that sends the new demand control value to all indoor units. Like said, this worked for a long time until an unknown time (maybe related to the Daikin update so 1_31_0). @hokreb : I have tried this several times without success.

The thing that confuses me is the random behavior. Sometimes it works, sometimes it doesn't (currently it doesn't work at all).

fichtenmoped82 commented 13 hours ago

I observe the same like MUN0X with my system of 2MXM50 and 2 indoor units (both one of the newer 2023 models incl. the 1_31 FW update). I also control it by setting all units initially to 100%, then using just one after a few seconds to set the demand percentage. The other unit follows automatically.