ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::panasonic_ir Namespace Reference

Data Structures

struct  FrameParams
 
struct  ModelBytes
 Per model bytes. B17 is the horizontal vane on DKE and RKR, always sent in the middle (0x06). More...
 
class  PanasonicIrClimate
 

Enumerations

enum class  Model : uint8_t {
  DKE , JKE , LKE , NKE ,
  CKP , RKR , PKE
}
 
enum class  Mode : uint8_t {
  AUTO = 0 , DRY = 2 , COOL = 3 , HEAT = 4 ,
  FAN = 6
}
 

Functions

void fill_template (uint8_t *state)
 The part of the state that doesn't depend on the settings. Built in code, so it doesn't take up RAM on an ESP8266.
 
uint8_t calc_checksum (const uint8_t *state, size_t len)
 
void encode_frame (const FrameParams &p, uint8_t *state)
 Encodes p as is: the temperature is not clamped, except that fan only mode always sends 27 C.
 
bool decode_frame (const uint8_t *state, FrameParams &p)
 Decode a state. Returns false if the state doesn't look like a valid Panasonic A/C state.
 
bool peek_footer (const remote_base::RemoteReceiveData &data)
 A footer mark, followed by the end of the capture or a long space (idle time or section gap), never a bit.
 
size_t receive_section (remote_base::RemoteReceiveData &data, uint8_t *bytes)
 Reads header + bytes + footer mark of a section of either length. Returns the number of bytes read, or 0.
 
bool read_state (remote_base::RemoteReceiveData &data, uint8_t *state)
 Reads a state from a received capture.
 
 ESPHOME_LOG_TAG (TAG, "panasonic_ir.climate")
 
 PROGMEM_STRING_TABLE (ModelStrings, "DKE", "JKE", "LKE", "NKE", "CKP", "RKR", "PKE")
 

Enumeration Type Documentation

◆ Mode

enum class esphome::panasonic_ir::Mode : uint8_t
strong
Enumerator
AUTO 
DRY 
COOL 
HEAT 
FAN 

Definition at line 40 of file panasonic_ac_frame.h.

◆ Model

enum class esphome::panasonic_ir::Model : uint8_t
strong
Enumerator
DKE 
JKE 
LKE 
NKE 
CKP 
RKR 
PKE 

Definition at line 38 of file panasonic_ac_frame.h.

Function Documentation

◆ calc_checksum()

uint8_t esphome::panasonic_ir::calc_checksum ( const uint8_t * state,
size_t len )
inline

Definition at line 110 of file panasonic_ac_frame.h.

◆ decode_frame()

bool esphome::panasonic_ir::decode_frame ( const uint8_t * state,
FrameParams & p )
inline

Decode a state. Returns false if the state doesn't look like a valid Panasonic A/C state.

Definition at line 129 of file panasonic_ac_frame.h.

◆ encode_frame()

void esphome::panasonic_ir::encode_frame ( const FrameParams & p,
uint8_t * state )
inline

Encodes p as is: the temperature is not clamped, except that fan only mode always sends 27 C.

Definition at line 113 of file panasonic_ac_frame.h.

◆ ESPHOME_LOG_TAG()

esphome::panasonic_ir::ESPHOME_LOG_TAG ( TAG ,
"panasonic_ir.climate"  )

◆ fill_template()

void esphome::panasonic_ir::fill_template ( uint8_t * state)
inline

The part of the state that doesn't depend on the settings. Built in code, so it doesn't take up RAM on an ESP8266.

Definition at line 94 of file panasonic_ac_frame.h.

◆ peek_footer()

bool esphome::panasonic_ir::peek_footer ( const remote_base::RemoteReceiveData & data)
inline

A footer mark, followed by the end of the capture or a long space (idle time or section gap), never a bit.

Definition at line 178 of file panasonic_ac_frame.h.

◆ PROGMEM_STRING_TABLE()

esphome::panasonic_ir::PROGMEM_STRING_TABLE ( ModelStrings ,
"DKE" ,
"JKE" ,
"LKE" ,
"NKE" ,
"CKP" ,
"RKR" ,
"PKE"  )

◆ read_state()

bool esphome::panasonic_ir::read_state ( remote_base::RemoteReceiveData & data,
uint8_t * state )
inline

Reads a state from a received capture.

Returns true if state holds a complete state (not yet validated).

The 10 ms gap between the sections is as long as the default idle time, so a capture holds the whole frame or one section. The first section is constant and outside the checksum, so a lone second section is enough and a lone first section is ignored.

Definition at line 202 of file panasonic_ac_frame.h.

◆ receive_section()

size_t esphome::panasonic_ir::receive_section ( remote_base::RemoteReceiveData & data,
uint8_t * bytes )
inline

Reads header + bytes + footer mark of a section of either length. Returns the number of bytes read, or 0.

Definition at line 183 of file panasonic_ac_frame.h.