ESPEasy to control air conditioners / heat pumps

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#31 Post by ToniA » 02 Apr 2017, 17:34

Yes, that's the way all the supported models have been done.

User avatar
beic
Normal user
Posts: 142
Joined: 18 Aug 2016, 18:19

Re: ESPEasy to control air conditioners / heat pumps

#32 Post by beic » 02 Apr 2017, 19:06

So, if I give you all the RAW code with description then you can make a library for me/us (community)?!

Kind regards,
Viktor

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#33 Post by ToniA » 02 Apr 2017, 19:09

Let's hope so, but I need a lot of help from you :)

User avatar
beic
Normal user
Posts: 142
Joined: 18 Aug 2016, 18:19

Re: ESPEasy to control air conditioners / heat pumps

#34 Post by beic » 02 Apr 2017, 19:11

ToniA wrote: 02 Apr 2017, 19:09 Let's hope so, but I need a lot of help from you :)
It's just awesome Toni, just so, awesome! 8-)

I will do it all tonight!!! :twisted:

sneaksneak
New user
Posts: 7
Joined: 28 Feb 2017, 23:03

Re: ESPEasy to control air conditioners / heat pumps

#35 Post by sneaksneak » 14 Apr 2017, 19:59

ToniA wrote: 01 Mar 2017, 14:15 OK, so you have the decoder, and both the original remote control and the ESP will send the same code, but only the remote control works? Did I get it right? Do you see if there are any obvious differences in the symbol sequence?

You could also try out this sketch (https://github.com/ToniA/arduino-heatpu ... sender.ino), with the symbols sequence from the real remote, to test out the setup.

940nm IR leds should be OK, the color of the case should not matter.
When I send with the origial remote it decodes:

Number of symbols: 102
Symbols:
Hh101100100100110110111111010000000101110010100011hHh101100100100110110111111010000000101110010100011
Bytes:
4D,B2,FD,02,3A,C5,4D,B2,FD,02,3A,C5
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 4450
HEADER SPACE: 4740
BIT MARK: 497
ZERO SPACE: 512
ONE SPACE: 1620
Decoding known protocols...
Looks like a Carrier protocol #2
POWER: ON
FAN: AUTO
Temperature: 23
Checksum matches

-----------------------------------------------------------------------------------------------------------------------------------
When I send with the HeatpumpIR library the decoder says:

Number of symbols: 101
Symbols:
Hh101100100100110110011111011000000101000010101111Hh101100100100110110011111011000000101000010101111
Bytes:
4D,B2,F9,06,0A,F5,4D,B2,F9,06,0A,F5
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 4600
HEADER SPACE: 4600
BIT MARK: 600
ZERO SPACE: 458
ONE SPACE: 1540
Decoding known protocols...
Looks like a Carrier protocol #2
POWER: ON
FAN: 1
MODE: COOL
Temperature: 23
Checksum matches

101 or 102 symbols? Is that the thing that is wrong.

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#36 Post by ToniA » 14 Apr 2017, 20:28

Hi,

So you command it as CarrierMCAHeatpumpIR ?

Take a look at this code line: https://github.com/ToniA/arduino-heatpu ... R.cpp#L287

Would it work if you change the code starting from that line to this:

Code: Select all

  // New header
  IR.mark(CARRIER_AIRCON2_BIT_MARK);
  IR.space(CARRIER_AIRCON2_HDR_SPACE);
  IR.mark(CARRIER_AIRCON2_HDR_MARK);
  IR.space(CARRIER_AIRCON2_HDR_SPACE);

sneaksneak
New user
Posts: 7
Joined: 28 Feb 2017, 23:03

Re: ESPEasy to control air conditioners / heat pumps

#37 Post by sneaksneak » 14 Apr 2017, 23:43

ToniA wrote: 14 Apr 2017, 20:28 Hi,

So you command it as CarrierMCAHeatpumpIR ?

Take a look at this code line: https://github.com/ToniA/arduino-heatpu ... R.cpp#L287

Would it work if you change the code starting from that line to this:

Code: Select all

  // New header
  IR.mark(CARRIER_AIRCON2_BIT_MARK);
  IR.space(CARRIER_AIRCON2_HDR_SPACE);
  IR.mark(CARRIER_AIRCON2_HDR_MARK);
  IR.space(CARRIER_AIRCON2_HDR_SPACE);
No I command it as "carrier_mca"

And then I dont know what to do. Do not understand what you want me to edit.
I have followed this guide. ---> https://www.domoticz.com/wiki/AC_/_heatpumpIR

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#38 Post by ToniA » 15 Apr 2017, 09:55

Yes, that's what I mean. The C++ class name in the code is 'CarrierMCAHeatpumpIR', and in the web interface it's known as 'carrier_mca'. Are you able to build a new build of the ESPEasy? It looks like the file CarrierHeatpumpIR.cpp in the HeatpumpIR library would need a change, starting from line 287 on.

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#39 Post by ToniA » 17 Apr 2017, 10:18

I made the changes into the HeatpumpIR library and pushed into Github. So if the ESPEasy builds always use the latest library versions, the next build hopefully includes this. The Carrier MCA now also supports heat mode (it was originally sampled from a device which was only an air conditioner) and 'maintenance mode' (~10 degrees C heating mode), provided that your device has those capabilities. The Qlima heatpump should support these.

sneaksneak
New user
Posts: 7
Joined: 28 Feb 2017, 23:03

Re: ESPEasy to control air conditioners / heat pumps

#40 Post by sneaksneak » 17 Apr 2017, 20:15

ToniA wrote: 17 Apr 2017, 10:18 I made the changes into the HeatpumpIR library and pushed into Github. So if the ESPEasy builds always use the latest library versions, the next build hopefully includes this. The Carrier MCA now also supports heat mode (it was originally sampled from a device which was only an air conditioner) and 'maintenance mode' (~10 degrees C heating mode), provided that your device has those capabilities. The Qlima heatpump should support these.
Thank you ToniA
It is working now, every command that I have tried is working as it should, except for the heating mode :D
The Cool mode is activated when I set it too heating mode.
__________________________________________________________________________
When sending heating mode from espeasy, I recieve this code:

Number of symbols: 102
Symbols:
Hh101100100100110110111111010000000111000010001111hHh101100100100110110111111010000000111000010001111
Bytes:
4D,B2,FD,02,0E,F1,4D,B2,FD,02,0E,F1
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 4580
HEADER SPACE: 4600
BIT MARK: 560
ZERO SPACE: 489
ONE SPACE: 1573
Decoding known protocols...
Looks like a Carrier protocol #2
POWER: ON
FAN: AUTO
MODE: COOL
Temperature: 22
Checksum matches
__________________________________________________________________________
When sending heating mode from original remote, I recieve this code:

Number of symbols: 102
Symbols:
Hh101100100100110110111111010000000111110010000011hHh101100100100110110111111010000000111110010000011
Bytes:
4D,B2,FD,02,3E,C1,4D,B2,FD,02,3E,C1
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 4440
HEADER SPACE: 4753
BIT MARK: 494
ZERO SPACE: 520
ONE SPACE: 1620
Decoding known protocols...
Looks like a Carrier protocol #2
POWER: ON
FAN: AUTO
Temperature: 22
Checksum matches

__________________________________________________________________________
Here you can see the differences.

ESPEasy:Hh101100100100110110111111010000000111000010001111hHh101100100100110110111111010000000111000010001111
Original--: Hh101100100100110110111111010000000111110010000011hHh101100100100110110111111010000000111110010000011

sneaksneak
New user
Posts: 7
Joined: 28 Feb 2017, 23:03

Re: ESPEasy to control air conditioners / heat pumps

#41 Post by sneaksneak » 17 Apr 2017, 20:23

Ahhhhh.... I downloaded the library this morning after breakfast at 10:00
And you updated the library at 10:00?
Ok, I have to reflash again to test if the Heating mode is working now. :oops:


HAHA. Now It is working for me. Thank you ToniA.

I have this remote
Image

Sold by Jula in Sweden under the name Zibro
Sold by K-Rauta in Sweden under the name Qlima

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#42 Post by ToniA » 18 Apr 2017, 06:59

It also seems that the 'frost guard' or 'maintenance mode' (as I call it) has two different messages, based on the model year. The older version does not work yet, I need to implement something to have two different Qlima/Zibro models with different maintenance mode messages. So stay tuned for further changes...

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#43 Post by ToniA » 20 Apr 2017, 06:57

The library now has 'qlima_1' and 'qlima_2', as different model years of this heatpump have different control messages for the 'frost guard' mode, or 'maintenance' as I call it (heating at ~10 degrees C). If you just use the 'normal' functions, you can also use it as 'carrier_mca'.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#44 Post by helio58 » 21 Apr 2017, 17:47

Hi ToniA ,
I m a newbie but i will love to control my heat pump with your code.
I see you use the memos D1 mini, but the IR led which do you use the same goes to the resistor.
Do you have same schematics?
Thanks in advance

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#45 Post by ToniA » 21 Apr 2017, 17:52

Just look at the Arduino example on this page: https://github.com/ToniA/arduino-heatpumpir -> look at the readme.

You need an IR led + some resistor, the value does not matter much, something in the range from tens of ohms to a kilo-ohm. Regardless of which resistor you use the range is nowhere close to the real remote, a few meters at most.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#46 Post by helio58 » 21 Apr 2017, 18:14

ToniA wrote: 21 Apr 2017, 17:52 Just look at the Arduino example on this page: https://github.com/ToniA/arduino-heatpumpir -> look at the readme.

You need an IR led + some resistor, the value does not matter much, something in the range from tens of ohms to a kilo-ohm. Regardless of which resistor you use the range is nowhere close to the real remote, a few meters at most.
Thanks ToniA, will this work? http://www.ebay.com/itm/3mm-IR-LED-Pair ... 1374524483

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#47 Post by ToniA » 21 Apr 2017, 18:53

Yes, 940 nm IR LED is the right one. If you have any old and unused remote controllers, you can also strip those apart.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#48 Post by helio58 » 22 Apr 2017, 13:09

ToniA wrote: 21 Apr 2017, 18:53 Yes, 940 nm IR LED is the right one. If you have any old and unused remote controllers, you can also strip those apart.
Thanks ToniA have searched but no old unused controllers,have order one.
I have a Mitsubishi heat pump will try to flash a wemos mini with it if i manage compile.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#49 Post by helio58 » 22 Apr 2017, 14:46

Hi again I manage (I think) to flash a Nodemcu with your code.
But I don't see the option to choose the manufactur. Skall it be so?
Thanks
Attachments
Heatpump.png
Heatpump.png (56.6 KiB) Viewed 71135 times

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#50 Post by ToniA » 22 Apr 2017, 16:16

In ESPEasy you only need to configure the pin you connect the LED into (you can first try out with red/green/yellow/whatever color LED to see it's working).

The heatpump model is in the message, see the second message of this thread for an example. This works both with http and mqtt messages.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#51 Post by helio58 » 22 Apr 2017, 17:47

ToniA wrote: 22 Apr 2017, 16:16 In ESPEasy you only need to configure the pin you connect the LED into (you can first try out with red/green/yellow/whatever color LED to see it's working).

The heatpump model is in the message, see the second message of this thread for an example. This works both with http and mqtt messages.
Thanks, I don't have any led at the moment but I configure the pin in ESPEasy and I try the
"http://192.168.0.5/control?cmd=heatpump ... 2,3,30,0,0"
But I get "Unknown or restricted command!"
I think there is something wrong with the code i flashed not yours but the one I compiled.
Maybe is to much to ask but could you ToniA share the espeasy.bin for the nodemcu ?

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#52 Post by helio58 » 22 Apr 2017, 21:23

helio58 wrote: 22 Apr 2017, 17:47
ToniA wrote: 22 Apr 2017, 16:16 In ESPEasy you only need to configure the pin you connect the LED into (you can first try out with red/green/yellow/whatever color LED to see it's working).

The heatpump model is in the message, see the second message of this thread for an example. This works both with http and mqtt messages.
Thanks, I don't have any led at the moment but I configure the pin in ESPEasy and I try the
"http://192.168.0.5/control?cmd=heatpump ... 2,3,30,0,0"
But I get "Unknown or restricted command!"
I think there is something wrong with the code i flashed not yours but the one I compiled.
Maybe is to much to ask but could you ToniA share the espeasy.bin for the nodemcu ?
Hi again manage to accept the cmd have change to:
http://192.168.0.5/control?cmd=heatpump ... 2,3,30,0,0
Will wait until i get the Led

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#53 Post by ToniA » 23 Apr 2017, 11:41

I thought I replied to this chain yesterday, but can't find the message anywhere. Yes, the 'samsung' was a bad example, as I later refactored the Samsung implementation into two different models, so there's no 'samsung' there any more. If the log says the code was sent, then everything should be fine. But remember that the range is not nearly as good as with the original remote.

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#54 Post by helio58 » 23 Apr 2017, 12:14

ToniA wrote: 23 Apr 2017, 11:41 I thought I replied to this chain yesterday, but can't find the message anywhere. Yes, the 'samsung' was a bad example, as I later refactored the Samsung implementation into two different models, so there's no 'samsung' there any more. If the log says the code was sent, then everything should be fine. But remember that the range is not nearly as good as with the original remote.
Thanks ToniA,
I manage to get a green led and it works.
Its great, hope it works with my model Mitsubishi MSZ-GE25VA
Once more Thank you

helio58
Normal user
Posts: 20
Joined: 11 Mar 2017, 10:21

Re: ESPEasy to control air conditioners / heat pumps

#55 Post by helio58 » 17 May 2017, 15:07

helio58 wrote: 23 Apr 2017, 12:14
ToniA wrote: 23 Apr 2017, 11:41 I thought I replied to this chain yesterday, but can't find the message anywhere. Yes, the 'samsung' was a bad example, as I later refactored the Samsung implementation into two different models, so there's no 'samsung' there any more. If the log says the code was sent, then everything should be fine. But remember that the range is not nearly as good as with the original remote.
Thanks ToniA,
I manage to get a green led and it works.
Its great, hope it works with my model Mitsubishi MSZ-GE25VA
Once more Thank you
Hi ToniA,

Thank you for this. Now I have tested and works GREAT.
I can't send the right code for ISAVE the others work.
Once more thanks

mod25
New user
Posts: 8
Joined: 02 Jun 2017, 11:53

Re: ESPEasy to control air conditioners / heat pumps

#56 Post by mod25 » 02 Jun 2017, 12:10

Hi ToniA,
great work. I have setup my Pi3 with lirc to caputre raw send from my panasonic A75C376 Remote like described http://www.instructables.com/id/Reverse ... g-control/.
Now i don't know howto decode i wan't to send my reccords you. maybe you can help me to decode data and implement them in the source. My Conditioner is a Panasonic cs 1203 ke
one example for what i right now (Cool Fan_Auto Swing_Auto 21C):

2381934-pulse 3503-space 3445-pulse 852-space 884-pulse 853-space
2619 857 2623 852 886 852
2619 857 2619 857 2619 857
2619 853 885 930 2550 849
2623 853 885 857 2619 904
2572 900 2572 857 2623 926
812 849 2623 853 885 853
2627 849 885 930 808 853
885 874 864 853 885 857
2615 858 885 853 2618 853
885 853 885 853 885 853
886 3460 3496 849 885 853
2619 879 2602 849 911 827
2623 854 2618 909 2567 905
2572 935 803 853 2623 853
2624 853 885 900 2575 901
2572 853 2623 931 2550 871
863 853 2619 858 880 905
2576 853 881 852 890 874
864 870 868 848 890 852
2619 930 808 854 2622 853
889 849 885 853 885 853
884 3460 3488 857 13915 3512
3440 852 886 853 885 853
2627 849 885 875 863 900
838 900 838 900 838 904
834 853 885 901 2571 853
885 853 885 930 808 853
885 853 885 853 884 901
2579 849 2623 852 885 853
2623 853 2623 901 837 900
838 853 885 900 2572 857
2619 857 885 849 2623 878
2598 853 885 900 838 3464
3488 900 837 905 833 853
2626 849 885 853 885 853
885 904 833 853 885 857
881 930 808 853 2622 931
807 853 885 904 834 853
885 853 885 853 885 853
2627 896 2571 905 838 852
2619 857 2618 858 880 858
880 858 881 852 2624 930
2546 930 808 853 2619 862
2614 857 881 904 834 3469
3484 930

Thank you in advance,
Best mod25

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#57 Post by ToniA » 02 Jun 2017, 12:35

Could you try this decoder: https://github.com/ToniA/Raw-IR-decoder-for-Arduino

Even if it wouldn't understand the protocol, it should give out the data in a format which is easier to read.

mod25
New user
Posts: 8
Joined: 02 Jun 2017, 11:53

Re: ESPEasy to control air conditioners / heat pumps

#58 Post by mod25 » 02 Jun 2017, 12:51

sorry i have no arduino or can i use my nodemcu for scan?
mod25

ramppa
New user
Posts: 2
Joined: 03 Jun 2017, 21:41

Re: ESPEasy to control air conditioners / heat pumps

#59 Post by ramppa » 03 Jun 2017, 21:49

Hi, here is quick caption from LG remote, if someone likes to study them more (if needed, I can make more tests):

Ramppa






LG N12AWR ne1
(ASNW126ERH1)

Number of symbols: 31
Symbols:
Hhh000h0000000h000h00000000000
Bytes:
00
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8800
HEADER SPACE: 2091
BIT MARK: 598
ZERO SPACE: 429
ONE SPACE: 0
Decoding known protocols...
Unknown protocol


Power
Hhh000h000000000000hh00h0hh0hh on
Hhh000h000hh00000000000h0h000h off

temp:
Hhh000h0000000h0000h000000hh00 19
Hhh000h0000000h0000h0h0000hh0h 20
Hhh000h0000000h0000hh00000hhh0 21
Hhh000h0000000h0000hhh0000hhhh 22
Hhh000h0000000h000h00000000000 23
Hhh000h0000000h000h00h0000000h 24
Hhh000h0000000h000h0h0000000h0 25
Hhh000h0000000h000h0hh000000hh 26

Fan:
Hhh000h0000000h0000hh00000hhh0 1
Hhh000h0000000h0000hh000h00000 2
Hhh000h0000000h0000hh00h0000h0 3
Hhh000h0000000h0000hh00h0h00hh auto








Select model to decode (this affects the IR signal timings detection):
* '1' for Panasonic DKE>, Mitsubishi Electric, Fujitsu etc. codes
* '2' for Panasonic CKP, Midea etc. codes
* '3' for Mitsubishi Heavy etc. codes
* '4' for Hyundai etc. codes
* '5' for Samsung etc. codes
* '9' for entering the bit sequence on the serial monitor (instead of the IR receiver)

Enter choice: 1

Ready to decode IR for choice '1'





Number of symbols: 31
Symbols:
Hhh000h0000000h0000h0h0000hh0h
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8820
HEADER SPACE: 1845
BIT MARK: 600
ZERO SPACE: 428
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000hh00000hhh0
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8800
HEADER SPACE: 1849
BIT MARK: 600
ZERO SPACE: 425
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000h0h0000hh0h
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8800
HEADER SPACE: 1851
BIT MARK: 600
ZERO SPACE: 426
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000h000000hh00
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8800
HEADER SPACE: 1936
BIT MARK: 600
ZERO SPACE: 423
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000h0h0000hh0h
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8820
HEADER SPACE: 1846
BIT MARK: 600
ZERO SPACE: 422
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000h000000hh00
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8800
HEADER SPACE: 1937
BIT MARK: 600
ZERO SPACE: 424
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hhh000h0000000h0000h0h0000hh0h
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8820
HEADER SPACE: 1852
BIT MARK: 600
ZERO SPACE: 425
ONE SPACE: 0
Decoding known protocols...
Unknown protocol
Attachments
LG_set21deg.JPG
LG_set21deg.JPG (4.24 MiB) Viewed 57248 times

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#60 Post by ToniA » 04 Jun 2017, 10:12

You need to select a different decoding mode. The option '1' is not right for this model, as you see 'h' symbols in the middle of the data stream.

ramppa
New user
Posts: 2
Joined: 03 Jun 2017, 21:41

Re: ESPEasy to control air conditioners / heat pumps

#61 Post by ramppa » 04 Jun 2017, 11:59

Sorry, my mistake. I was sure, there was no change between modes, but after recheck, modes 4&5 gives these :

mode 4&5:
power
Hh1000100000000000011000000110 on (+21, cooling, fan 1)
Hh1000100000000000011000101000 on (+21, cooling, fan 2)
Hh1000100000000000011001001010 on (+21, cooling, fan 3)

Hh1000100000000000011100000111 on (+22, cooling, fan 1)
Hh1000100000000000011100101001 on (+22, cooling, fan 2)
Hh1000100000000000011101001011 on (+22, cooling, fan 3)

Hh1000100000000000100000001000 on (+23, cooling, fan 1)
Hh1000100000000000100000101010 on (+23, cooling, fan 2)

Hh1000100011000000000001010001 off

temp:
Hh1000100000001000001101010000 18
Hh1000100000001000010001010001 19
Hh1000100000001000010101010010 20
Hh1000100000001000011001010011 21
Hh1000100000001000011101010100 22
Hh1000100000001000100001010101 23
Hh1000100000001000100101010110 24
Hh1000100000001000101001010111 25
Hh1000100000001000101101011000 26
Hh1000100000001000110001011001 27
Hh1000100000001000110101011010 28
Hh1000100000001000111001011011 29
Hh1000100000001000111101011100 30

fan:
Hh1000100000001000010100001101 1
Hh1000100000001000010100101111 2
Hh1000100000001000010101000001 3
Hh1000100000001000010101010010 auto

Hh1000100000010000000000000001 air dir. up&down
Hh1000100000010011000000000100 air dir. l&r

Hh1000100000001000010101010010 cool
Hh1000100000001011011101000110 auto
Hh1000100000001001100000000001 de. humi.
Hh1000100000001100111101001111 warm






Enter choice: 4

Ready to decode IR for choice '4'



Number of symbols: 31
Symbols:
Hh1000100011000000000001010001
Bytes:
11,03,A0
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8820
HEADER SPACE: 4220
BIT MARK: 602
ZERO SPACE: 420
ONE SPACE: 1541
Decoding known protocols...
Unknown protocol

Number of symbols: 31
Symbols:
Hh1000100000000000100000101010
Bytes:
11,00,41
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 8820
HEADER SPACE: 4240
BIT MARK: 600
ZERO SPACE: 420
ONE SPACE: 1542
Decoding known protocols...
Unknown protocol

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#62 Post by ToniA » 04 Jun 2017, 15:38

Yes, this looks correct. The next step is to start building decoder functionality for this model, in the same sketch you are now running.

mod25
New user
Posts: 8
Joined: 02 Jun 2017, 11:53

Re: ESPEasy to control air conditioners / heat pumps

#63 Post by mod25 » 07 Jun 2017, 20:07

hi,

i have found out that my remote will work with panasonic ckp (used rawirdecode mode2) which showed me correct results.
Select model to decode (this affects the IR signal timings detection):
* '1' for Panasonic DKE>, Mitsubishi Electric, Fujitsu etc. codes
* '2' for Panasonic CKP, Midea etc. codes
* '3' for Mitsubishi Heavy etc. codes
* '4' for Hyundai etc. codes
* '5' for Samsung etc. codes
* '9' for entering the bit sequence on the serial monitor (instead of the IR receiver)

Enter choice: 2

Ready to decode IR for choice '2'


Number of symbols: 142
Symbols:
Hh01101111011011110100000001000000Hh01101111011011110100000001000000HhWHh00100000001000000110110001101100Hh00100000001000000110110001101100Hh
Bytes:
F6,F6,02,02,F6,F6,02,02,04,04,36,36,04,04,36,36
Timings (in us):
PAUSE SPACE: 14160
HEADER MARK: 3625
HEADER SPACE: 3442
BIT MARK: 903
ZERO SPACE: 759
ONE SPACE: 2538
Decoding known protocols...
Looks like a Panasonic CKP protocol
COOL
POWER SWITCH
FAN AUTO
Temperature: 21

but with my esp (without resitor) i get:

otocol
Select model to decode (this affects the IR signal timings detection):
* '1' for Panasonic DKE>, Mitsubishi Electric, Fujitsu etc. codes
* '2' for Panasonic CKP, Midea etc. codes
* '3' for Mitsubishi Heavy etc. codes
* '4' for Hyundai etc. codes
* '5' for Samsung etc. codes
* '9' for entering the bit sequence on the serial monitor (instead of the IR receiver)

Enter choice: 2

Ready to decode IR for choice '2'



Number of symbols: 4
Symbols:
0W0
Bytes:

Timings (in us):
PAUSE SPACE: 21628
HEADER MARK: 0
HEADER SPACE: 0
BIT MARK: 299
ZERO SPACE: 580
ONE SPACE: 0
Decoding known protocols...
Unknown protocol

Number of symbols: 7
Symbols:
0h011h
Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 0
HEADER SPACE: 3710
BIT MARK: 508
ZERO SPACE: 260
ONE SPACE: 3120
Decoding known protocols...
Unknown protocol

Number of symbols: 6
Symbols:
Hh11W
Bytes:

Timings (in us):
PAUSE SPACE: 8400
HEADER MARK: 2860
HEADER SPACE: 4640
BIT MARK: 410
ZERO SPACE: 0
ONE SPACE: 3040
Decoding known protocols...
Unknown protocol

Number of symbols: 1
Symbols:

Bytes:

Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 0
HEADER SPACE: 0
BIT MARK: 100
ZERO SPACE: 0
ONE SPACE: 0
Decoding known protocols...
Unknown protocol


but with ir led https://www.conrad.de/de/ir-emitter-940 ... 81713.html (used with 100Ohm or 1000Ohm or without resistor) i get uknown protocol i use nodemcu d7 or d6 which are free on esp. i always check with http://esp1.fritz.box/control?cmd=heatp ... 1,0,22,0,0. My cs-1203ks beeps but nothing else happens. please help me
thx
mod25

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#64 Post by ToniA » 13 Jun 2017, 19:24

This is really strange. So far I have only tried out the Wemos D1 mini microcontrollers, and they have been working just fine, never had any issues with those. Are you sure those output pins are free on NodeMCU, i.e. not tied into anything else? Any chance you could try with other pins?

marko67
New user
Posts: 7
Joined: 20 Jan 2017, 06:40

Re: ESPEasy to control air conditioners / heat pumps

#65 Post by marko67 » 27 Jun 2017, 09:22

Hello Toni

I have use all 3 protokolls for my Mitsubishi AC but nothing is possible (work). Now i have tested the Code with your dekoder and this is the Code:

Number of symbols: 91
Symbols:
Hh0100101001110101110000110110010010011011111111110000000011111111000000000111010110001010
Bytes:
52,AE,C3,26,D9,FF,00,FF,00,AE,51
Timings (in us):
PAUSE SPACE: 0
HEADER MARK: 3560
HEADER SPACE: 1280
BIT MARK: 350
ZERO SPACE: 337
ONE SPACE: 1162
Decoding known protocols...
Looks like a Mitsubishi Heavy ZJ-S protocol
Model SRKxxZJ-S Remote Control RKX502A001C
POWER OFF
MODE COOL
Temperature: 22
FAN AUTO
Vertical air direction: STOP
Horizontal air direction: STOP
Clean: OFF

Can you tell me witch code i must use for " Looks like a Mitsubishi Heavy ZJ-S protocol "

Thanks for helping!!

Marko

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#66 Post by ToniA » 27 Jun 2017, 10:36

This shuold be the 'mitsubishi_heavy_zj', see https://github.com/ToniA/arduino-heatpu ... pumpIR.cpp

marko67
New user
Posts: 7
Joined: 20 Jan 2017, 06:40

Re: ESPEasy to control air conditioners / heat pumps

#67 Post by marko67 » 27 Jun 2017, 14:24

Thank you verry much. It´s working!!

mjack
New user
Posts: 2
Joined: 29 Jun 2017, 10:54

Re: ESPEasy to control air conditioners / heat pumps

#68 Post by mjack » 29 Jun 2017, 11:14

Ok, so sorry for probably posting dumb questions, but im very new to this.

-Ive sucessfully controlled my heatpump with arduino-Uno and the heatpumpir-library. This is awesome :)
-Ive sucessfully flashed my esp 8266-01 with the espeasy firmware and made connection to Domoticz using dummydevices.

But now Im confused. Can I use the P115 plugin together with the Arduino-Uno with esp8266-01(ESPeasy) and controll this from Domoticz. Or do i have to get a board like the Wemos D1 Mini Pro with a integrated esp8266-module?

Im lost! Greatful for some help!

Thanks!

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#69 Post by ToniA » 29 Jun 2017, 21:33

Any device capable of running ESPEasy should work together with the P115 plugin.

mjack
New user
Posts: 2
Joined: 29 Jun 2017, 10:54

Re: ESPEasy to control air conditioners / heat pumps

#70 Post by mjack » 30 Jun 2017, 10:37

Finally got it compiled and working with only the ESP8266-01. Insane to be able to control the heatpump with such a small device!

Thanks a lot for the great work ToniA !!!!

BasemAlsaeed
Normal user
Posts: 10
Joined: 11 Sep 2016, 16:43

Re: ESPEasy to control air conditioners / heat pumps

#71 Post by BasemAlsaeed » 19 Jul 2017, 01:19

Hi Toni
is there any plans to include this work in the public ESPEasy dev release ? or we will have to compile every time ?
thanks a lot for your great work :)

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#72 Post by ToniA » 24 Jul 2017, 14:01

It could actually be a part of the Mega release... I haven't measured any memory usage etc, so I have no idea how it would affect the overall package.

tillo
New user
Posts: 3
Joined: 24 Sep 2017, 15:14

Re: ESPEasy to control air conditioners / heat pumps

#73 Post by tillo » 24 Sep 2017, 15:34

Hi ToniA.

First of, thanx for the great work that you have done.

I am trying out your code for the Mitsubishi FE on my Mitsubishi FH (A fairly new model), everything works fine, on/off, operation mode, temp and vane dir.
But not the Fan speed settings. What would you need me to do in order to get this working, aka set up a new profile in the Mitsubishi library for the FH?

Best regards

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#74 Post by ToniA » 24 Sep 2017, 18:54

We'd need to find out what goes wrong with the IR code. The most obvious way would be to build an IR receiver with Arduino + IR receiver, like in this sketch: https://github.com/ToniA/Raw-IR-decoder-for-Arduino

The just record a sample from the real remote, and compare it against the code sent by the library.

tillo
New user
Posts: 3
Joined: 24 Sep 2017, 15:14

Re: ESPEasy to control air conditioners / heat pumps

#75 Post by tillo » 25 Sep 2017, 15:31

thanx for a quick response.

I will look at one of the nearby electronic stores hear in Sweden. And buy a IR receiver before I go home today. And hopefully get back to you within 24h.

tillo
New user
Posts: 3
Joined: 24 Sep 2017, 15:14

Re: ESPEasy to control air conditioners / heat pumps

#76 Post by tillo » 27 Sep 2017, 09:40

Okey, it seamed like my issues was caused by my power source. I don't know how, but when i changed the power source, everything started working. Including the fan speed control.

I did see one thing however when i read the IR codes from the ESP. It would seam like the esp always sends the ionizer=On command. I wish to have this off, how could I dot it?

ToniA
Normal user
Posts: 69
Joined: 26 Aug 2016, 20:37

Re: ESPEasy to control air conditioners / heat pumps

#77 Post by ToniA » 27 Sep 2017, 13:58

check this row out: https://github.com/ToniA/arduino-heatpu ... R.cpp#L191, and let me know if setting 0x00 to the byte position 15 does the trick.

irongarment
New user
Posts: 3
Joined: 08 Feb 2018, 02:49

Re: ESPEasy to control air conditioners / heat pumps

#78 Post by irongarment » 08 Feb 2018, 03:29

Not sure where to put this, so here will do. I am trying to compile the source from github including the airconditioner control code for my Fujitsu heat pump. I have compiled another project that was forked from ToniA's original code, and that works, so I know the IR sending code works, however I want to integrate it better with Domoticz, and I want to use ESPEasy.

I have downloaded the source from github, and installed Platformio. I have downloaded all the libraries needed, but I am getting an error. One more thing, I am compiling on a Raspberry Pi.

I run the compiler with 'platformio run' and it all looks good, however, at the end of compilation I get this:

Code: Select all

Compiling .pioenvs/normal_1024/src/ESPEasy.ino.o
Linking .pioenvs/normal_1024/firmware.elf
/home/pi/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib/libm.a(lib_a-e_pow.o):(.literal+0xfc): undefined reference to `__ieee754_sqrt'
/home/pi/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib/libm.a(lib_a-e_pow.o): In function `__ieee754_pow':
/home/pi/xtensa/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libm/math/e_pow.c:164: undefined reference to `__ieee754_sqrt'
collect2: error: ld returned 1 exit status
*** [.pioenvs/normal_1024/firmware.elf] Error 1
========================= [ERROR] Took 57.84 seconds =========================
The errors are due to `__ieee754_pow' and `__ieee754_sqrt'.

So, a couple of questions.

Is it possible to compile the ESPEasy code and P115 airconditioner plugin on a Raspberry Pi? If it is, what can I do to get rid of the error? I have searched for a solution, and found similar mentions of the problem, but no solution.

What is the preferred way to compile the core and this module? Is there an obvious reason why I wouldn't get the same error?

Can I get the P115 plugin separately? If so, how to install it onto an already-flashed ESP8266?

That's all really. Just want to control my Fujitsu heatpump from Domoticz via ESPEasy on a Wemos D1 Mini Pro. Thanks!

whatsupskip
Normal user
Posts: 125
Joined: 28 Feb 2018, 07:40
Location: Melbourne, Australia

Re: ESPEasy to control air conditioners / heat pumps

#79 Post by whatsupskip » 05 Mar 2018, 04:06

I am having some real issues with the IR control of a Panasonic PKR series air conditioner.

I can't find any information if the PKR is the same protocol as any of the supported Panasonic procols: CKP, DKE, JKE or NKE.

I tried using the https://github.com/ToniA/Raw-IR-decoder-for-Arduino, however I receive a "Specified folder/zip file does not contain a valid library". I tried to do a manual install, but had no luck.

Also, am I correct in understanding that I need to recompile ESPEasy to use this plugin?
That is, there is no dev or testing version with it pre-installed.
Friends with kangaroos and some time koala rescuer.

Bluesmell
New user
Posts: 3
Joined: 02 Apr 2018, 16:55

Re: ESPEasy to control air conditioners / heat pumps

#80 Post by Bluesmell » 02 Apr 2018, 17:56

Any update on this?
Compiled Toni-s version ESPEasy on Wemos D1 (link on first page) and on startup from ESP Easy log I can see that "INIT: Heatpump IR transmitter activated"
but I'll get "Unknown or restricted command!" every time I try to use HeatpumpIR cmd over HTTP. (for example "http://192.168.1.181/control?cmd=heatpu ... 2,3,30,0,0" or same if I do "http://192.168.1.181/control?cmd=heatpumpir"
Any advice? Can we compile it with ESPEasy2.0 stable?

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests