question about heatpumpir control

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

question about heatpumpir control

#1 Post by reza » 30 Aug 2020, 11:34

hi
i want control A/C with espeasy.
i see @ToniA post and explanations about this . but i have some questions.

1.after compile the code "Raw-IR-decoder-for-Arduino" if i see a code in terminal like "Hh001101011010111100000111001001010100000000000111000000001111111011010100000001000111001011" , so that means the remote control and brand is support?!
and if dont show this code so brand not support?!

2.i want control a LG brand.and this name is not between support's brands.what am i do ?

3.i want use a D1mini , so which .bin file i must use ?
ESP_Easy_mega_20200801_minimal_IRext_ESP8266_1M.bin
or
ESP_Easy_mega_20200801_minimal_IRext_ESP8266_4M1M.bin
or
ESP_Easy_mega_20200801_minimal_IRext_ESP8266_4M2M.bin

thank you for help.

TD-er
Core team member
Posts: 8746
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: question about heatpumpir control

#2 Post by TD-er » 30 Aug 2020, 12:16

Can't help you with the IR stuff, but I can explain the "4M1M" kinda notation on the build names.

"1M" means it is meant for nodes with 1M flash size
The Wemos D1 mini has 4M flash, so you should go with a 4M flavor :)

"4M1M" means 4M flash, 1M allocated for SPIFFS file system. (the default)
"4M2M" means 4M flash, 2M allocated for SPIFFS file system.

Just be aware that when you update the node, you should always use the same flash layout, or else all your settings will be lost.
IMHO the 4M2M is the nicest layout as it is still enough for OTA updates and gives most space on the file system.
The reason it isn't the default is because it used to be not available for a long time as an option to select.

As long as you always check the used size when updating, you can chose either 4M1M or 4M2M.

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: question about heatpumpir control

#3 Post by reza » 31 Aug 2020, 12:42

TD-er wrote: 30 Aug 2020, 12:16 Can't help you with the IR stuff, but I can explain the "4M1M" kinda notation on the build names.

As long as you always check the used size when updating, you can chose either 4M1M or 4M2M.
thank you for help my friend <3

StefanD
Normal user
Posts: 21
Joined: 28 Jan 2017, 20:07

Re: question about heatpumpir control

#4 Post by StefanD » 03 Sep 2020, 22:50

Hi,
I modified 3 years ago IR plugin to work with LG AC and it is still working properly for me. Try to compile espeasy with a modified plugin 035 that I will post it below. It is working with my model of LG AC. Example of the command to power on the AC unit in cool mode with 22 deg will be something like http://192.168.x.x/control?cmd=IRSEND,LG_ON . With this plugin you have available the following commands: LG_ON,LG_OFF,LG_FAN2,LG_FAN3,LG_L and LG_LL (low low power saving). Try it to see if is working for you
Best regards

//#######################################################################################################
//#################################### Plugin 035: Output IR ############################################
//#######################################################################################################

#include <IRremoteESP8266.h>
IRsend *Plugin_035_irSender;

#define PLUGIN_035
#define PLUGIN_ID_035 35
#define PLUGIN_NAME_035 "Infrared Transmit"

boolean Plugin_035(byte function, struct EventStruct *event, String& string)
{
boolean success = false;

switch (function)
{
case PLUGIN_DEVICE_ADD:
{
Device[++deviceCount].Number = PLUGIN_ID_035;
Device[deviceCount].Type = DEVICE_TYPE_SINGLE;
Device[deviceCount].SendDataOption = false;
break;
}

case PLUGIN_GET_DEVICENAME:
{
string = F(PLUGIN_NAME_035);
break;
}

case PLUGIN_GET_DEVICEVALUENAMES:
{
break;
}

case PLUGIN_INIT:
{
int irPin = Settings.TaskDevicePin1[event->TaskIndex];
if (Plugin_035_irSender == 0 && irPin != -1)
{
addLog(LOG_LEVEL_INFO, "INIT: IR TX");
Plugin_035_irSender = new IRsend(irPin);
Plugin_035_irSender->begin(); // Start the sender
}
if (Plugin_035_irSender != 0 && irPin == -1)
{
addLog(LOG_LEVEL_INFO, "INIT: IR TX Removed");
delete Plugin_035_irSender;
Plugin_035_irSender = 0;
}
success = true;
break;
}

case PLUGIN_WRITE:
{
String IrType;
unsigned long IrCode;
unsigned int IrBits;
char command[120];
command[0] = 0;
char TmpStr1[100];
TmpStr1[0] = 0;
string.toCharArray(command, 120);

unsigned int an[59] = {8750,4150, 500,1600, 450,550, 450,600, 450,600, 450,1600, 450,600, 400,600, 500,550, 500,500, 500,550, 500,550, 450,600, 450,550, 500,550, 450,550, 500,550, 450,1650, 450,600, 400,600, 450,550, 450,600, 450,550, 450,600, 450,600, 450,1600, 450,600, 450,550, 450,600, 450};
unsigned int aus[59] = {8750,4150, 500,1600, 450,550, 450,600, 450,600, 400,1650, 450,550, 450,600, 450,550, 450,1650, 450,1600, 450,600, 450,550, 450,600, 450,550, 450,600, 450,600, 450,550, 450,600, 450,600, 400,600, 450,550, 450,1600, 450,600, 450,1600, 450,600, 450,600, 450,550, 450,1600, 450};
unsigned int an01[59] = {8750,4150, 500,1550, 500,550, 500,550, 500,500, 500,1550, 500,550, 500,500, 500,500, 500,550, 500,550, 500,550, 500,500, 500,550, 500,500, 500,550, 500,500, 500,550, 500,1550, 500,1600, 500,1550, 500,500, 500,550, 500,1600, 500,500, 500,1550, 500,550, 500,500, 550,1550, 500};
unsigned int an02[59] = {8700,4150, 500,1600, 450,550, 500,550, 450,550, 500,1600, 450,600, 450,550, 450,600, 450,550, 450,600, 450,550, 500,550, 450,600, 450,550, 450,600, 450,550, 500,550, 450,1600, 500,1600, 450,1600, 450,600, 450,1600, 450,600, 400,600, 450,1600, 450,600, 450,1600, 450,1600, 450};
unsigned int an03[59] = {8800,4100, 500,1550, 500,550, 500,550, 500,500, 500,1550, 550,500, 500,550, 500,500, 500,1550, 500,1550, 500,550, 500,500, 500,550, 500,500, 500,500, 550,550, 450,550, 500,1600, 500,1550, 500,1550, 500,1550, 500,1550, 500,550, 450,1550, 550,500, 550,500, 500,550, 500,550, 450};
unsigned int an04[59] = {8800,4100, 500,1600, 450,600, 450,550, 500,550, 450,1600, 450,600, 450,550, 500,550, 450,1600, 500,1600, 450,550, 500,550, 450,550, 500,550, 450,550, 500,550, 500,550, 450,1600, 450,1600, 450,1600, 500,1550, 500,1600, 450,1600, 450,550, 500,550, 450,600, 450,600, 400,1600, 450};
unsigned int an1[99] = {3450,1700, 450,450, 400,1300, 450,450, 400,450, 400,450, 450,400, 450,400, 450,400, 450,450, 400,450, 400,450, 450,400, 450,450, 400,1300, 400,450, 450,450, 400,450, 400,450, 450,400, 450,400, 450,450, 400,450, 400,450, 450,1300, 400,450, 450,400, 450,400, 450,400, 450,450, 400,450, 450,400, 450,400, 450,1300, 450,400, 450,1300, 400,1300, 400,1300, 450,1300, 450,400, 450,400, 450,1300, 400,450, 450,1300, 400,1300, 450,1300, 400,1300, 450,400, 450,1300, 400};
unsigned int aus1[99] = {3500,1700, 400,450, 400,1300, 450,450, 400,450, 400,450, 450,400, 450,450, 400,450, 400,450, 400,500, 400,450, 400,450, 400,450, 400,1300, 450,450, 400,450, 400,450, 400,450, 450,450, 400,450, 400,450, 400,450, 450,450, 400,1300, 400,500, 400,450, 400,450, 400,450, 400,450, 400,450, 450,450, 400,450, 400,1300, 450,450, 400,1300, 400,1300, 450,1300, 400,1300, 450,450, 400,450, 400,1300, 450,450, 400,1300, 400,1300, 450,1300, 400,1300, 450,450, 400,1300, 400};
unsigned int an2[67] = {8900,4450, 550,550, 550,600, 550,1650, 550,550, 550,550, 550,550, 600,500, 600,550, 550,1650, 550,1650, 550,600, 550,1700, 500,1650, 550,1700, 550,1650, 600,1600, 600,550, 550,550, 550,550, 600,1600, 600,550, 550,550, 550,550, 600,500, 600,1650, 550,1650, 550,1650, 600,550, 550,1650, 550,1700, 500,1700, 550,1650, 550};




String tmpString = string;
int argIndex = tmpString.indexOf(',');
if (argIndex) tmpString = tmpString.substring(0, argIndex);

if (GetArgv(command, TmpStr1, 2)) IrType = TmpStr1;
if (GetArgv(command, TmpStr1, 3)) IrCode = strtoul(TmpStr1, NULL, 16); //(long) TmpStr1
if (GetArgv(command, TmpStr1, 4)) IrBits = str2int(TmpStr1);

if (tmpString.equalsIgnoreCase("IRSEND") && Plugin_035_irSender != 0)
{
success = true;


if (IrType.equalsIgnoreCase("NEC")) Plugin_035_irSender->sendNEC(IrCode, IrBits);
if (IrType.equalsIgnoreCase("JVC")) Plugin_035_irSender->sendJVC(IrCode, IrBits, 2);
if (IrType.equalsIgnoreCase("RC5")) Plugin_035_irSender->sendRC5(IrCode, IrBits);
if (IrType.equalsIgnoreCase("RC6")) Plugin_035_irSender->sendRC6(IrCode, IrBits);
if (IrType.equalsIgnoreCase("SAMSUNG")) Plugin_035_irSender->sendSAMSUNG(IrCode, IrBits);
if (IrType.equalsIgnoreCase("SONY")) Plugin_035_irSender->sendSony(IrCode, IrBits);
if (IrType.equalsIgnoreCase("PANASONIC")) Plugin_035_irSender->sendPanasonic(IrBits, IrCode);

if (IrType.equalsIgnoreCase("LG_ON")) Plugin_035_irSender->sendRaw(an,59,38);
if (IrType.equalsIgnoreCase("LG_OFF")) Plugin_035_irSender->sendRaw(aus,59,38);
if (IrType.equalsIgnoreCase("LG_FAN2")) Plugin_035_irSender->sendRaw(an01,59,38);
if (IrType.equalsIgnoreCase("LG_FAN3")) Plugin_035_irSender->sendRaw(an02,59,38);
if (IrType.equalsIgnoreCase("LG_L")) Plugin_035_irSender->sendRaw(an03,59,38);
if (IrType.equalsIgnoreCase("LG_LL")) Plugin_035_irSender->sendRaw(an04,59,38);
if (IrType.equalsIgnoreCase("PN_ON")) Plugin_035_irSender->sendRaw(an1,99,35);
if (IrType.equalsIgnoreCase("PN_OFF")) Plugin_035_irSender->sendRaw(aus1,99,35);
if (IrType.equalsIgnoreCase("LG_TV")) Plugin_035_irSender->sendRaw(an2,67,38);

addLog(LOG_LEVEL_INFO, "IR Code Sent");
if (printToWeb)
{
printWebString += F("IR Code Sent ");
printWebString += IrType;
printWebString += F("<BR>");
}


}
break;
}
}
return success;
}

reza
Normal user
Posts: 88
Joined: 13 Jun 2017, 21:14

Re: question about heatpumpir control

#5 Post by reza » 09 Sep 2020, 10:33

StefanD wrote: 03 Sep 2020, 22:50 Hi,
I modified 3 years ago IR plugin to work with LG AC and it is still working properly for me. Try to compile espeasy with a modified plugin 035 that I will post it below. It is working with my model of LG AC. Example of the command to power on the AC unit in cool mode with 22 deg will be something like http://192.168.x.x/control?cmd=IRSEND,LG_ON . With this plugin you have available the following commands: LG_ON,LG_OFF,LG_FAN2,LG_FAN3,LG_L and LG_LL (low low power saving). Try it to see if is working for you
Best regards
this is good way and work , thank you

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 29 guests