IRremoteESP8266 icon indicating copy to clipboard operation
IRremoteESP8266 copied to clipboard

LG AC AKB75415316

Open abdulhannan97 opened this issue 1 year ago • 5 comments

Hi i am abdul i am trying to control lg ac

this is data what i get from remote

Timestamp : 000005.234 Library : v2.8.2

Protocol : LG2 Code : 0x880094D (28 Bits) Mesg Desc.: Model: 2 (AKB75215403), Power: On, Mode: 0 (Cool), Temp: 24C, Fan: 4 (Maximum) uint16_t rawData[59] = {3144, 9658, 558, 1490, 550, 474, 530, 494, 530, 470, 560, 1484, 558, 468, 552, 474, 520, 504, 530, 470, 556, 468, 560, 460, 562, 468, 520, 504, 530, 494, 532, 468, 556, 468, 558, 1486, 554, 472, 520, 504, 530, 1518, 532, 468, 558, 1486, 558, 468, 552, 472, 522, 1524, 532, 1488, 558, 466, 556, 1490, 558}; // LG2 880094D uint32_t address = 0x88; uint32_t command = 0x94; uint64_t data = 0x880094D;

Timestamp : 000008.215 Library : v2.8.2

Protocol : LG2 Code : 0x88C0051 (28 Bits) Mesg Desc.: Model: 2 (AKB75215403), Power: Off uint16_t rawData[59] = {3146, 9654, 556, 1490, 526, 500, 522, 504, 530, 470, 558, 1488, 558, 468, 556, 468, 522, 504, 530, 1490, 558, 1490, 558, 466, 526, 500, 520, 506, 530, 470, 558, 466, 556, 466, 526, 500, 522, 508, 528, 468, 558, 466, 558, 470, 552, 1494, 532, 494, 530, 1490, 560, 466, 556, 470, 554, 472, 530, 1516, 530}; // LG2 88C0051 uint32_t address = 0x88; uint32_t command = 0xC005; uint64_t data = 0x88C0051;

and this is code what i am useing

#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRac.h>
#include <IRutils.h>

const uint16_t kIrLed = 4;  // The ESP GPIO pin to use that controls the IR LED.
IRac ac(kIrLed);  // Create a A/C object using GPIO to sending messages with.

void setup() {
  Serial.begin(115200);
  delay(200);

  // Set up what we want to send.
  // See state_t, opmode_t, fanspeed_t, swingv_t, & swingh_t in IRsend.h for
  // all the various options.
  ac.next.protocol = decode_type_t::LG2;  // Set a protocol to use.
  ac.next.model = 1;  // Some A/Cs have different models. Try just the first.
  ac.next.mode = stdAc::opmode_t::kCool;  // Run in cool mode initially.
  ac.next.celsius = true;  // Use Celsius for temp units. False = Fahrenheit
  ac.next.degrees = 25;  // 25 degrees.
  ac.next.fanspeed = stdAc::fanspeed_t::kMedium;  // Start the fan at medium.
  ac.next.swingv = stdAc::swingv_t::kOff;  // Don't swing the fan up or down.
  ac.next.swingh = stdAc::swingh_t::kOff;  // Don't swing the fan left or right.
  ac.next.light = false;  // Turn off any LED/Lights/Display that we can.
  ac.next.beep = false;  // Turn off any beep from the A/C if we can.
  ac.next.econo = false;  // Turn off any economy modes if we can.
  ac.next.filter = false;  // Turn off any Ion/Mold/Health filters if we can.
  ac.next.turbo = false;  // Don't use any turbo/powerful/etc modes.
  ac.next.quiet = false;  // Don't use any quiet/silent/etc modes.
  ac.next.sleep = -1;  // Don't set any sleep time or modes.
  ac.next.clean = false;  // Turn off any Cleaning options if we can.
  ac.next.clock = -1;  // Don't set any current time if we can avoid it.
  ac.next.power = false;  // Initially start with the unit off.

  Serial.println("Try to turn on & off every supported A/C type ...");
}

void loop() {
  // For every protocol the library has ...
  for (int i = 1; i < kLastDecodeType; i++) {
    decode_type_t protocol = (decode_type_t)51;
    // If the protocol is supported by the IRac class ...
    if (ac.isProtocolSupported(protocol)) {
      Serial.println("Protocol " + String(protocol) + " / " +
                     typeToString(protocol) + " is supported.");
      ac.next.protocol = protocol;  // Change the protocol used.
      ac.next.power = true;  // We want to turn on the A/C unit.
      Serial.println("Sending a message to turn ON the A/C unit.");
      ac.sendAc();  // Have the IRac class create and send a message.
      delay(5000);  // Wait 5 seconds.
      ac.next.power = false;  // Now we want to turn the A/C off.
      Serial.println("Send a message to turn OFF the A/C unit.");
      ac.sendAc();  // Send the message.
      delay(1000);  // Wait 1 second.
    }
  }
  Serial.println("Starting from the begining again ...");
}

BUT LG AC DID NOT GET TURN ON or OFF

CAN YOU PLEASE HELP ME ON THIS

LG REMOTE MODEL NO IN BACKSIDE IS :- AKB75415316

abdulhannan97 avatar Dec 28 '22 08:12 abdulhannan97