crankyoldgit / IRremoteESP8266

Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
GNU Lesser General Public License v2.1
2.95k stars 831 forks source link

Daikin SetTemp to half degrees #1829

Open AntonWert opened 2 years ago

AntonWert commented 2 years ago

Hello, great library, works well with my Daikin. Just one thing: with the origianl remote you can set the temperatures to half degrees. But the temperature parameter is only int. Is there a chance to add the half degrees as well?

Nawile commented 1 year ago

With the Files I posted above, it was compailable for me using latest Arduino.

@AntonWert can you compile an tasmota-ir version and upload it? So i can make sure, that the mistake is in my sources. Thanks.

I still get the "wrong vendor" failure. Maybe my call is still wrong: {"IRHVAC{"Vendor":"DAIKIN312","Mode":"Heat","Power":"Off","Celsius":"On","Temp":15,"FanSpeed":"Auto","SwingV":"Stop","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"On","Light":"Off","Filter":"On","Clean":"On","Beep":"On"}}

AntonWert commented 1 year ago

First of all, I was able to test now my version with the real DAIKIN AC and got it to work (at least fo far for the functions I need). But I built with Arduino.

@Nawile : I do have Platform IO and downloaded the current source of tasmota. I was able to built the tasmota-ir as supplied from github.

Environment    Status    Duration
-------------  --------  ------------
tasmota-ir     SUCCESS   00:00:18.309

I replaced the 2 files (latest version atteaced) in the subfolder Tasmota-development\lib\lib_basic\IRremoteESP8266\IRremoteESP8266\src and was able to built again. But I do not know if the new IRDaikin312 class is used by tasmota

ir_Daikin.cpp.txt ir_Daikin.h.txt

Nawile commented 1 year ago

Thanks @AntonWert .

Getting the puzzle piece by piece.

I can compile and send DAIKIN312 via "IRSend". Maybe this was my Problem. But also helpfully ist deleting the caches and editing "my_user_config.h".

@AntonWert: How can you send (encode) the parameter like "Mode":"Heat","Power":"Off","Celsius":"On","Temp":15,"FanSpeed":"Auto","SwingV":"Stop","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"On","Light":"Off","Filter":"On","Clean":"On","Beep":"On"?

The "IRHVAC" command still doesn't work, because several entries aren't made in files "IRac.cpp" and "IRac.h". I wasn't able to made them, because i still don't understand the encode parameter to build correct classes.

AntonWert commented 1 year ago

Just for clarification. I use the library (and did therefore the extention) on a WemosD1mini. I run my own programm, providing me a simple WEB-GUI and an REST API. I do not run tasmota.

For sending the data to the AC i do have my own function:

void MyIRSendFunction(const bool isOn, const uint8_t acmode, const float temp) { IRDaikin312 ac(kIrLed); // Set the GPIO to be used to sending the message if (isOn) ac.on(); else ac.off(); ac.setFan(kDaikinFanAuto); ac.setMode(acmode); ac.setTemp(temp); ac.setSwingVertical(kDaikin312SwingVOff); ac.setSwingHorizontal(kDaikin312SwingVOff); Serial.println(ac.toString()); // Display what we are going to send. ac.setEcono(true); ac.setClean(true); ac.setLight(2); ac.send(); }

These functions seem to work since I posted them.

@Nawile: with these circumstances, what do you mean with encode parameters? this is done by the IRDaikin312 class now

Nawile commented 1 year ago

Ok, here we go. :)

I modified the files "IRac.cpp" and "IRac.h" and got an runable image. I just used code from DAIKIN2. Now i need some more modification to add parameters for "eye" and others.

IRac.cpp.txt IRac.h.txt

Now i got some issues and questions:

@AntonWert, thanks. And it's pitty, that you aren't using Tasmota.

Edit: Made some Tests: {"IRHVAC":{"Vendor":"DAIKIN312","Model":1,"Mode":"Heat","Power":"On","Celsius":"On","Temp":20,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Light":"Off","Filter":"Off","Clean":"Off","Beep":"Off","Sleep":-1}}

AntonWert commented 1 year ago

Thanks for your feedback @Nawile . Maybe I do have time tomorrow to check the Swing and other Items you mentioned.

Nawile commented 1 year ago

Here are my actual versions:

I'm trying to support the eyes...

ir_Daikin.cpp.txt IRsend.h.txt IRac.cpp.txt IRac.h.txt

AntonWert commented 1 year ago

I could not stop and just had a look on struct state_t There is no option provided for the eye. If I check if in ir_Daikin.cpp I will share

Nawile commented 1 year ago

I've added them to struct state_t, to IRDaikin312::toCommon and in IRac.cpp #if SEND_DAIKIN312.

I'm also don't understand why the eye-state isn't shown in the console output. I guess it is using IRDaikin312::toString

Edit: Console output is generated via xdrv_05_irremote_full.ino (Tasmota). Now it's working . It's recognizing "eye" via ir-remote, but i'm not sure if the Perfera got it. There is no state in the Onecta App.

EyeAuto seems not to be the "comfort airflow" (ca). Maybe the ca is part of SwingH similar as the "indoor unit quiet operation" is part of fanspeed.

SwingH positions or "comfort airflow" would be very nice features to use.

Edit2:

Eye seems not to work and swapped in decode. Maybe this help to decode:

  1. Without comfort airflow and without eye
  2. With comfort airflow and without eye
  3. Without comfort airflow and with eye
  4. With comfort airflow and with eye

13:14:44.667 MQT: tele/tasmota_ir_test/RESULT = {"IrReceived":{"Protocol":"DAIKIN312","Bits":312,"Data":"0x11DA27000254730000490000020010000000003611DA270000492A00A0000006602000C504087C","Repeat":0,"IRHVAC":{"Vendor":"DAIKIN312","Model":-1,"Mode":"Heat","Power":"On","Celsius":"On","Temp":42,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"Off","EyeAuto":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1}}} 13:14:50.952 MQT: tele/tasmota_ir_test/RESULT = {"IrReceived":{"Protocol":"DAIKIN312","Bits":312,"Data":"0x11DA27000254730000490000020010000000003611DA270000492A00A0000006602000C506087E","Repeat":0,"IRHVAC":{"Vendor":"DAIKIN312","Model":-1,"Mode":"Heat","Power":"On","Celsius":"On","Temp":42,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"On","EyeAuto":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1}}} 13:14:53.903 MQT: tele/tasmota_ir_test/RESULT = {"IrReceived":{"Protocol":"DAIKIN312","Bits":312,"Data":"0x11DA27000254730000490000020010000000003611DA270000492A00A0000006602000C50C0884","Repeat":0,"IRHVAC":{"Vendor":"DAIKIN312","Model":-1,"Mode":"Heat","Power":"On","Celsius":"On","Temp":42,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"Off","EyeAuto":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1}}} 13:14:57.424 MQT: tele/tasmota_ir_test/RESULT = {"IrReceived":{"Protocol":"DAIKIN312","Bits":312,"Data":"0x11DA27000255730000490000020010000000003711DA270000492A00A0000006602000C50E0886","Repeat":0,"IRHVAC":{"Vendor":"DAIKIN312","Model":-1,"Mode":"Heat","Power":"On","Celsius":"On","Temp":42,"FanSpeed":"Auto","SwingV":"Off","SwingH":"Off","Quiet":"On","Turbo":"Off","Econo":"On","Eye":"On","EyeAuto":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1}}}

AntonWert commented 1 year ago

So first of all for the swing. I checked the manual and there it is stated that you only can turn on swing, or stop it at the current position. According the manual there is no option for a fixed positoning. I confimed this with my remote and IR-Dump. The IR Remote only sends "kDaikin312SwingVAuto" and "kDaikin312SwingVOff" The other modes (copied from DAIKIN2) seem not to work. Same for "kDaikin312SwingHAuto" and "kDaikin312SwingHOff" where the constants seem to be wrong, what is now corrected.

With the eye it seems to be difficult to test, but maye it is fixed now due to moving from byte 13 to 36 from my remote IR debuggung. Sorry I can't test this because my AC is lookint to an wall and I cannot realy use the function. Maybe you can give me feedback

AntonWert commented 1 year ago

ir_Daikin.h.txt Here is the updated file

Nawile commented 1 year ago

Yeah great. With EyeAuto it can be activated! but not deactivated. :( The old DAIKIN switch it off (home automation send with still DAIKIN).

I had to uncomment all the positions, because .cpp has to be adapted...

Realy great would be control off comfort airflow.

AntonWert commented 1 year ago

That is strange. have you tried setEye and setEyeAuto in all 4 possible combinations?

Nawile commented 1 year ago

That is strange. have you tried setEye and setEyeAuto in all 4 possible combinations?

Yes, i think so. EyeAuto on -> Eye works. Both off -> Eye still works.

My smart home device send with std Tasmota ir an DAIKIN-protocol and it stops.

I can test on tuesday again.

AntonWert commented 1 year ago

If I chek the IR signals of my remote, I can clearly see the bit turning the function on. And it does so, as you have confirmed. But why it is not turning off, is strange, because exactly the same bit is removed. I cannot see any further changes.

@Nawile have you confirmed this with the onecta app?

Nawile commented 1 year ago

@AntonWert : The Onecta app doesn't show the state of the eye. You can't control ist there. Daikin makes imho a poor job building their firm-/software.

Maybe there is just an delay. I'll test it asap (Just got ill). But the test is just viewing the device behavior.

AntonWert commented 1 year ago

Is there a possibility to get the new develloped code now in the official project?

AntonWert commented 1 year ago

@Nawile: There was just an update to the Onecta app binging new functions, maybe this helps

Nawile commented 1 year ago

Sorry, i've got to much to do und had no time. Hope this will change soon.

There ist an firmware update available, but it seems to be faulty. The "Bedarfssteuerung" seems to vanish, if you are using Perfera like me. But i need "Bedarfssteuerung", so i'm not going to update. Daikin also seems not interested in fixing these things soon.

AntonWert commented 1 year ago

I did the update, and found no issue rigth now. I use my changed library to control the AC and use it for heating /cooling when there is solar power available. What is 'Bedarfssteuerung'? I did not spot it in the app before.

Do you have any idea how to get this library officially changed with the new features we added?

AntonWert commented 11 months ago

Hi, some month now went by, and I could succsessfully test a heating and cooling season with half degrees function as discribed above.

Canwe find a way, to add this to the man library?

crankyoldgit commented 9 months ago

You need to submit your code as a PR, that is how code gets merged into the main branch. See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

AntonWert commented 9 months ago

Sorry, I do neither have GIT nor any forked library. As seen above, I can provide the changed files