ESPEasy to control air conditioners / heat pumps

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
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?

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

Re: ESPEasy to control air conditioners / heat pumps

#81 Post by Bluesmell » 02 Apr 2018, 23:55

Got it work ( at least I can see blinking regular led, "Heatpump IR code transmitted" in LOG and no error message) will test with real pump tomorrow.
Had to use "fujitsu_awyz" instaed of "Fujitsu" like this: http://192.168.1.181/control?cmd=heatpu ... 2,0,30,0,0
Also compiled with ESPEasy 2.0 with no problems (just few warnings)

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

Re: ESPEasy to control air conditioners / heat pumps

#82 Post by whatsupskip » 03 Apr 2018, 02:09

Bluesmell wrote: 02 Apr 2018, 23:55 Also compiled with ESPEasy 2.0 with no problems (just few warnings)
As in the stable version, not the dev Mega?

Did you compile with Platform?

Thanks for reporting your efforts. This thread activity had died off. I have only managed to compile the dev Mega with Platform. I haven't had a chance to compile with this library.
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#83 Post by ToniA » 03 Apr 2018, 06:58

I have a fully working, but quite old version of ESPEasy with HeatpumpIR here: https://github.com/ToniA/ESPEasy. Porting to the latest ESP Easy has been on my task list for ages... I'm still using this old build as it works well enough for my purposes.

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

Re: ESPEasy to control air conditioners / heat pumps

#84 Post by Bluesmell » 03 Apr 2018, 08:44

whatsupskip wrote: 03 Apr 2018, 02:09 As in the stable version, not the dev Mega?

Did you compile with Platform?
I think it's stable 2.0. Downloaded from here: https://github.com/letscontrolit/ESPEasy/tree/v2.0
then copied _P115_HeatpumpIR.ino that I got from here: https://github.com/letscontrolit/ESPEas ... Playground to src.
Compiled with Platform-IO.
Had to add HeatpumpIR under lib_deps in platformio.ini. (remove empty quotes that's in original file)
Working on D1 mini v2.1.0

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#85 Post by kr0815 » 12 May 2018, 18:26

Edit: forget this post, see below

Hi Toni,

i have a problem maybe you could help me with, i´m not good enough in coding.
I try to control a cheap TCL AC with your plugin

raw decoder says it looks like a Fuego, so

Code: Select all

curl 192.168.178.103/control?cmd=heatpumpir,fuego,0,3,0,22,0,0
Result: no reaction from AC

While investigating further / trying with power off, the original remote sends:

Code: Select all

Number of symbols: 115
Symbols:
Hh11000100110100110110010010000000000000000000010011000000100100000000000000000000000000000000000$
Bytes:
23,CB,26,01,00,20,03,09,00,00,00,00,00,41
Timings (in us):
PAUSE SPACE:  0
HEADER MARK:  3260
HEADER SPACE: 1700
BIT MARK:     436
ZERO SPACE:   278
ONE SPACE:    1100
Decoding known protocols...
Looks like a Fuego etc. protocol
Checksum matches
POWER OFF
MODE COOL
Temperature: 22
FAN: AUTO
Vertical air direction: AUTO
ESPeasy with your plugin sends:

Code: Select all

Number of symbols: 115
Symbols:
Hh11000100110100110110010010000000000000010000010011000000100100000000101000000000000000000000000$
Bytes:
23,CB,26,01,80,20,03,09,50,00,00,00,00,11
Timings (in us):
PAUSE SPACE:  0
HEADER MARK:  3840
HEADER SPACE: 1580
BIT MARK:     451
ZERO SPACE:   320
ONE SPACE:    1319
Decoding known protocols...
Looks like a Fuego etc. protocol
Checksum matches
POWER OFF
MODE COOL
Temperature: 22
FAN: AUTO
Vertical air direction: MIDDLE UP
I think the problem is the last line, maybe my AC doesn´t have this "Middle UP" feature

My understanding is that the last 2 values i send are vertical and horizontal air direction?
But whatever i change, like ,1,1 or ,2,2 , i still get this "Middle UP" ?

Is it maybe a bug in the code?

Best regards

Klaus

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#86 Post by kr0815 » 13 May 2018, 18:17

I made some more effort to get this AC working, but now i´m stuck again.

I could send recorded commands to the AC with rawsender.ino on ESP8266, making the following timing changes:

Code: Select all

#define IR_ONE_SPACE    1040
#define IR_ZERO_SPACE   240
#define IR_BIT_MARK     480
#define IR_PAUSE_SPACE  38200
#define IR_HEADER_MARK  2000
#define IR_HEADER_SPACE 1000
I found a small bug, when sending

Code: Select all

Hh1100010011010011011001001000000000000000001001001100000000110000000000000000000000000000000000000000000000010010
it doesn´t send the first "1", so i have to change this to Hh111000....

Question: i tried many values for IR_HEADER_SPACE, max output i got was 1020? orginal remote gives something about 1500?

Now i changed the timing Values in FuegoHeatpumpIR.h to the following:

Code: Select all

#define FUEGO_AIRCON1_HDR_MARK   2000
#define FUEGO_AIRCON1_HDR_SPACE  1000
#define FUEGO_AIRCON1_BIT_MARK   480
#define FUEGO_AIRCON1_ONE_SPACE  1040
#define FUEGO_AIRCON1_ZERO_SPACE 240
still no success, i investigated further:
In FuegoHeatPumpIR.cpp i have to change:

Code: Select all

uint8_t FuegoTemplate[] = { 0x23, 0xCB, 0x26, 0x01, 0x80, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00 };
to

Code: Select all

uint8_t FuegoTemplate[] = { 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
ESPEasy still can´t send to my AC, but what is possible now:
I could send a command now with espeasy, log it with raw decoder, and send this logged command with raw sender, this works

I guess it´s a timing problem, but what could i do? i can´t reflash the ESP each time i try a new value?

This is what raw logger gets directly from the ESP:

Code: Select all

Number of symbols: 121
Symbols:
WWWWHh1100010011010011011001001000000000000000001001001100000000110000000000000000000000000000000000000000000000010010WW
Bytes:
23,CB,26,01,00,24,03,0C,00,00,00,00,00,48
Timings (in us):
PAUSE SPACE:  45121
HEADER MARK:  2180
HEADER SPACE: 860
BIT MARK:     515
ZERO SPACE:   79
ONE SPACE:    919
Decoding known protocols...
Looks like a Fuego etc. protocol
Checksum matches
POWER ON
MODE COOL
Temperature: 19
FAN: AUTO
Vertical air direction: AUTO
this is what i get when sending the received code with raw_sender:

Code: Select all

Number of symbols: 117
Symbols:
Hh1100010011010011011001001000000000000000001001001100000000110000000000000000000000000000000000000000000000010010HW
Bytes:
23,CB,26,01,00,24,03,0C,00,00,00,00,00,48
Timings (in us):
PAUSE SPACE:  28404
HEADER MARK:  8542
HEADER SPACE: 960
BIT MARK:     496
ZERO SPACE:   137
ONE SPACE:    960
Decoding known protocols...
Looks like a Fuego etc. protocol
Checksum matches
POWER ON
MODE COOL
Temperature: 19
FAN: AUTO
Vertical air direction: AUTO
Regards

Klaus

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

Re: ESPEasy to control air conditioners / heat pumps

#87 Post by ToniA » 14 May 2018, 17:55

The hex code seems to be OK, but does something else cause some extra blinks or something, as there are these extra 'W' and 'H' symbols in the beginning and at the end of the code? I just wonder...

I think it has to be about the timings, and the logic the software is really quite simple. But note that my receiver/decoder also makes some assumptions about the code lengths, so save precious memory on Arduino. Could you try the sender first on Arduino, instead of the ESP, just to try out if that makes any difference?

Gramy
New user
Posts: 1
Joined: 15 May 2018, 18:12

Re: ESPEasy to control air conditioners / heat pumps

#88 Post by Gramy » 15 May 2018, 18:24

Hallo everybody, this is my first post on this forum but I'm using ESP_Easy for a while.
I'm using NodeMcu V2 devices with Esp_Easy_Mega soft in my house now and after reading this discussion I'd like to control my Mitsubishi MSZ-HC25VA room air conditioner.
Could somebody provide a bin file with heatpumpir for EspEasy firmware for my device, please? I'm not able to compile all the stuff with your library - can I find it anywhere?
Thank you
Gramy

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#89 Post by kr0815 » 15 May 2018, 20:21

Hi Toni,

have it running now :-)

In the End my main problem (besides others) was that i used the raw decoder with setting 1 - this gave me wrong measured timings and i tried long to correct these timings
In the End i used a logic analyzer and measured the times.

For all that want to control a TCL AC - choose in Raw decoder Option 3

The timing values i posted above (from rawsender) also work for TCL / ESPEasy

One question stays? How could i integrate additional functions like the Plasma Air Cleaner?
I know which byte changes, also could hardcode it, but how to make it changeable by command?

Best regards and thanks for your great work

Klaus

Tygerr
New user
Posts: 2
Joined: 18 May 2018, 12:21

Re: ESPEasy to control air conditioners / heat pumps

#90 Post by Tygerr » 18 May 2018, 13:42

Hi Toni

Thanks for the plug-in. I've got it working on my Wemos D1 (well, working in the sense that it is successfully transmitting IR signals from my LED triggered by MQTT commands).

But I'm not sure about how to select the correct code-set for my HVAC.

The remote it uses is one of those YKR K/002 ones, with custom branding for the local distributor.

I see you mentioned those under the AUX ones on your Raw Decoder page. Do I need to perform the decoding with an IR receiver, or do one of the included code sets already work with those remotes?

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#91 Post by kr0815 » 19 May 2018, 21:17

Hi Tygerr,

didi you build the raw receiver?
If not, i suggest to do so and check what your original remote sends

There are so many possible faults you could do, if you are not using the exact type of AC someone else had already success with, do yourself a favour, buld the receiver and check what´s going on

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#92 Post by kr0815 » 21 May 2018, 19:48

Hi Toni,

sorry, looks like i need your help again

i could send desired temp 18 to 25, but not 16 or 17, very strange - 16 and 17 are always interpreted as 23 degrees

Is there the possibility to send the raw hex codes in your script?

This is what i get from the original remote:

Code: Select all

16° : 23,CB,26,01,00,24,03,0F,00,00,00,00,00,4B
 

Code: Select all

17° : 23,CB,26,01,00,24,03,0E,00,00,00,00,00,4A

Code: Select all

18° : 23,CB,26,01,00,24,03,0D,00,00,00,00,00,49 

Code: Select all

23° : 23,CB,26,01,00,24,03,08,00,00,00,00,00,44
 
your script:

Code: Select all

16° : 23,CB,26,01,00,24,08,08,00,00,00,00,00,49 

Code: Select all

23° : 23,CB,26,01,00,24,08,08,00,00,00,00,00,49
 
Thats what i modified so far:

Code: Select all

void FuegoHeatpumpIR::sendFuego(IRSender& IR, uint8_t powerMode, uint8_t operatingMode, uint8_t fanSpeed, uint8_t temperature, uint8_t swingV, uint8_t swingH)
{
  uint8_t FuegoTemplate[] = { 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
//uint8_t FuegoTemplate[] = { 0x23, 0xCB, 0x26, 0x01, 0x80, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00 };
  //                             0     1     2     3     4     5     6     7     8     9    10    11    12    13

  uint8_t checksum = 0x00;
  (void)swingH;

  // Set the operatingmode on the template message
  FuegoTemplate[5] |= powerMode;
  FuegoTemplate[6] |= operatingMode;

  // Set the temperature on the template message
  FuegoTemplate[7] |= 31 - temperature;

  // Set the fan speed and vertical air direction on the template message
  FuegoTemplate[8] |= fanSpeed | swingV;

  
  
  // Calculate the checksum
  for (unsigned int i=0; i < (sizeof(FuegoTemplate)-1); i++) {
    checksum += FuegoTemplate[i];
  }

  FuegoTemplate[13] = checksum;

  // 38 kHz PWM frequency
  IR.setFrequency(38);

  // Header
  IR.mark(FUEGO_AIRCON1_HDR_MARK);
  IR.space(FUEGO_AIRCON1_HDR_SPACE);

  // Data
  for (unsigned int i=0; i<sizeof(FuegoTemplate); i++) {
    IR.sendIRbyte(FuegoTemplate[i], FUEGO_AIRCON1_BIT_MARK, FUEGO_AIRCON1_ZERO_SPACE, FUEGO_AIRCON1_ONE_SPACE);
  }

Tygerr
New user
Posts: 2
Joined: 18 May 2018, 12:21

Re: ESPEasy to control air conditioners / heat pumps

#93 Post by Tygerr » 21 May 2018, 23:08

kr0815 wrote: 19 May 2018, 21:17 Hi Tygerr,

didi you build the raw receiver?
If not, i suggest to do so and check what your original remote sends

There are so many possible faults you could do, if you are not using the exact type of AC someone else had already success with, do yourself a favour, buld the receiver and check what´s going on
Hi, yes I built the raw receiver and checked it.

It picked up valid codes when I used the Hyundai timings (option 4) and reported that it 'Looks like a AUX protocol'

But I'm not quite sure how to proceed from there. I don't see an AUX protocol option in the HeatpumpIR library. Do I need to edit the HyundaiHeatpumpIR.h file to change to the values that the decoder picked up for my remote and create a new library file?

This is what I got from the decoder:

Code: Select all

Number of symbols: 107
Symbols:
Hh11000011111010010000011100000000000001000000001000000001000000000000000000000000000000001010000011111000
Bytes:
C3,97,E0,00,20,40,80,00,00,00,00,05,1F
Timings (in us): 
PAUSE SPACE:  0
HEADER MARK:  9240
HEADER SPACE: 4560
BIT MARK:     517
ZERO SPACE:   496
ONE SPACE:    1659
Decoding known protocols...
Looks like a AUX protocol
POWER OFF
TURBO: ON
MODE HEAT
Temperature: 26
FAN: 3
Horizontal swing: On
Vertical swing: On
Checksum matches
But I noticed in the HyundaiHeatpumpIR.h file, they are set as:

Code: Select all

// Hyundai timing constants
#define HYUNDAI_AIRCON1_HDR_MARK   8840 // 8700
#define HYUNDAI_AIRCON1_HDR_SPACE  4440 // 4200
#define HYUNDAI_AIRCON1_BIT_MARK   640  // 580
#define HYUNDAI_AIRCON1_ONE_SPACE  1670 // 1530
#define HYUNDAI_AIRCON1_ZERO_SPACE 570  // 460

kr0815
Normal user
Posts: 136
Joined: 18 Nov 2015, 18:24

Re: ESPEasy to control air conditioners / heat pumps

#94 Post by kr0815 » 03 Jun 2018, 22:37

I found the answer to my problem above now - there were some restriction in the code for temperatures under 18 degrees, 23 was the default value

Question:
Is it possible to send raw commands / hex codes to the AC with this plugin?

My AC has additional features like sleep Mode, ionizer and such things
As i know through your faboulous raw receiver which codes are expected, i guess the easiest thing would be to just send these raw codes?

Regards
Klaus

Nateonas
New user
Posts: 1
Joined: 07 Jun 2018, 21:06
Location: Netherlands

Re: ESPEasy to control air conditioners / heat pumps

#95 Post by Nateonas » 07 Jun 2018, 21:40

Hi Toni,

this is my first message on this forum... :)

based your https://github.com/ToniA/Raw-IR-decoder-for-Arduino, I've written a decoder for my ZH/LT-01 airco remote control, which was great fun. This remote control is used in over 10 different locally branded Airconditioners. Of course, I want to share my ZHLT01Remote.cpp with the Github-community, but being a noob, I have no idea how to proceed, so please, can someone help me out here. :?:

Besides for the cpp-file I have two remarks to make the decoding easier:
* The suggested IR-sensor is very old and cannot be bought in the market anymore. A very, very common IR-sensor is the VS1838, which also works fine. My suggestion is to add this to the readme, making it easier for other people to start help decoding.
* I suggest to set PIN3 HIGH and PIN4 LOW, (ab)using these pins as pseudo-VCC and -GND and eliminating the need for any wiring; also much easier to set up, see the photo.

Of course, I want to use the decoder to make an encoder for my heatpump (and I'll need som help for that too), but let's do that next...

Awaiting you response!

Cheers, Marcel
Attachments
Stick your VS1838 right into the Arduino with PIN3 and PIN4
Stick your VS1838 right into the Arduino with PIN3 and PIN4
2018-06-07 21.07.42.jpg (160.51 KiB) Viewed 62259 times

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

Re: ESPEasy to control air conditioners / heat pumps

#96 Post by whatsupskip » 20 Sep 2018, 12:33

I was finally able to compile the code and run correctly on Wemos D1 mini.

I can confirm that the Panasonic PKR series uses the same remote protocol as the Panasonic JKE and NKE. It would be great if this was added to code notes.

Has anyone found a good solution the range or direction issue with using standard IR LEDs?
I think the issue might be more that the LEDs are very directional. I have been driving the LED from the 5V via a transistor. If I point the LED directly at the AC it seems to pick up the signal, but when it off axis it doesn't work.
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#97 Post by whatsupskip » 21 Sep 2018, 01:16

Ok, I did find some interesting ideas for IR LED configuration from the design of the Broadlink brand of WiFi universal remote controls. They use 7 IR LEDs, six pointing horizontally and one pointing up.

Image

This answers my question about how many LEDs might be required and the use of a diffuser.

Now I just need to find out the best circuit design to drive the 7 LEDs.
Friends with kangaroos and some time koala rescuer.

UC530
New user
Posts: 2
Joined: 26 Sep 2018, 20:39

Re: ESPEasy to control air conditioners / heat pumps

#98 Post by UC530 » 26 Sep 2018, 20:51

Hello!

I am new on forum and I have a problem with compiling firmware with heatpumpIR.
Is it possible, that someone could be so kind and compile the bin file with heatpumpIR library for me?
I do not understand very well how to compile for uploading.

Thanks UC530

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

Re: ESPEasy to control air conditioners / heat pumps

#99 Post by whatsupskip » 27 Sep 2018, 00:43

Ok, this is a case of the blind leading the almost blind.

I have only just managed to compile it myself and I haven't used Github before, but I have uploaded a pre-complied bin file.
Easiest method is to have a working version of the mega ESPEasy running on a 4MB flash version of an ESP8266. Then use the builtin "Load Firmware" to upload this file:
https://github.com/whatsupskip/ESPEasy/ ... 6_4096.bin

I take no responsibility if it bricks your MCU. I have tested this method on a WEMOS D1 mini.

I hope this helps.
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#100 Post by ToniA » 27 Sep 2018, 08:45

I have a working build here: https://github.com/ToniA/ESPEasy (branch HeatpumpIR). I also have the binaries (they run at least on Wemos D1 Mini) under 'releases'.

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

Re: ESPEasy to control air conditioners / heat pumps

#101 Post by whatsupskip » 27 Sep 2018, 12:25

Great! I didn't see them under releases.

I will remove mine soon then. Far better to use yours.
Friends with kangaroos and some time koala rescuer.

bojan
Normal user
Posts: 11
Joined: 29 Aug 2018, 07:55
Location: Ljubljana, Slovenia

Re: ESPEasy to control air conditioners / heat pumps

#102 Post by bojan » 28 Sep 2018, 09:05

Hi ToniA,

i've just checked my Panasonic AC remote with your Raw-IR-decoder-for-Arduino and it shows Panasonic CS protocol. Is this protocol supported? I can't find it.

Regards
Bojan

BTW, thank you very much for your work

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

Re: ESPEasy to control air conditioners / heat pumps

#103 Post by whatsupskip » 28 Sep 2018, 11:07

bojan wrote: 28 Sep 2018, 09:05 i've just checked my Panasonic AC remote with your Raw-IR-decoder-for-Arduino and it shows Panasonic CS protocol. Is this protocol supported? I can't find it.
Hmmm, what is the actual model number of the unit?
It is normally CS-E7PKR or similar. CS normally just means indoor unit.

The most common Panasonic codes seem to be the JKE/NKE/PKR one. As in the codes for these three series are all the same. Failing that, just try the other two options. I can't see that you can do any damage. If it isn't the right code set it just won't do anything.
Friends with kangaroos and some time koala rescuer.

UC530
New user
Posts: 2
Joined: 26 Sep 2018, 20:39

Re: ESPEasy to control air conditioners / heat pumps

#104 Post by UC530 » 29 Sep 2018, 10:25

Thanks for help. I did not find the bin file, but I finally compiled a working sw and It works.
I'll download yours too, because it's newer release.

Nice day to all. MatejS

bojan
Normal user
Posts: 11
Joined: 29 Aug 2018, 07:55
Location: Ljubljana, Slovenia

Re: ESPEasy to control air conditioners / heat pumps

#105 Post by bojan » 29 Sep 2018, 13:52

whatsupskip wrote: 28 Sep 2018, 11:07
bojan wrote: 28 Sep 2018, 09:05 i've just checked my Panasonic AC remote with your Raw-IR-decoder-for-Arduino and it shows Panasonic CS protocol. Is this protocol supported? I can't find it.
Hmmm, what is the actual model number of the unit?
It is normally CS-E7PKR or similar. CS normally just means indoor unit.

The most common Panasonic codes seem to be the JKE/NKE/PKR one. As in the codes for these three series are all the same. Failing that, just try the other two options. I can't see that you can do any damage. If it isn't the right code set it just won't do anything.
It's a RE12JKX. There is a separate file for decoding the CS protocol in the Raw-IR-decoder so I assumed, that CS is just another protocol. I'll try all of the codes as soon as I get the IR LED.

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

Re: ESPEasy to control air conditioners / heat pumps

#106 Post by whatsupskip » 05 Oct 2018, 07:46

ToniA wrote: 27 Sep 2018, 08:45 I have a working build here: https://github.com/ToniA/ESPEasy (branch HeatpumpIR). I also have the binaries (they run at least on Wemos D1 Mini) under 'releases'.
Thanks for these.

I tried both of these and I was (eventually) able to send the IR commands via MQTT. However there was very little information regarding MQTT showing up in the log. I had the Advanced > Log Settings > Web log Level (& Serial log Level) on "Debug dev" which is showing as above the web based logging screen as "Logging: Debug dev (9)". This I assume is the most verbose.

On boot up there is no confirmation in the log that a connection has been made with the MQTT server.
When I send an MQTT message to the ESP8266 with the commands for the air conditioner, the air conditioner receives it correctly. However the only relevant entry that shows in the ESPEasy log is: "P115: Heatpump IR code transmitted".

On a previous build of your firmware that I compiled I did see some entries in the log for MQTT at boot up along with connecting to the WiFi. Now all that shows in the log is:
105546: : Rebooting...
105547: sendcontent free: 13264 chunk size:11
105548: sendcontent free: 13264 chunk size:0
105756: sendcontent free: 14464 chunk size:400

Now it is more than possible that I have changed a setting or done something else wrong. Having the debugging information showing for MQTT would be very handy.
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#107 Post by whatsupskip » 05 Oct 2018, 07:49

One small suggestion would be to add something so that a relevant entry appears in the System Info > GIT version:

Thanks again for all your hard work with this project.

I am in the process of writing a brief set of instructions for configuring your plugin up with MQTT. I think a few of use have struggled with this part.
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#108 Post by whatsupskip » 12 Oct 2018, 01:06

I am having some trouble with the https://github.com/ToniA/Raw-IR-decoder-for-Arduino

I am trying to use it with an ESP8266. I appear to be having problems with the defining of the PIND. Clearly it doesn't know what to use for the ESP8266.

What changes should I make to the code for it to work?

I am using Wemos D1 mini with the output from the IR sensor connected to D5 (GPIO14).
Friends with kangaroos and some time koala rescuer.

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

Re: ESPEasy to control air conditioners / heat pumps

#109 Post by ToniA » 12 Oct 2018, 06:10

It doesn't work on ESP8266, I think it would require quite a bit of changes as it's somewhat hardware-dependent.

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

Re: ESPEasy to control air conditioners / heat pumps

#110 Post by whatsupskip » 12 Oct 2018, 07:44

ok, thanks for the prompt reply.
Friends with kangaroos and some time koala rescuer.

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests