36 Commits

Author SHA1 Message Date
GrKoR
87f686564e ref: show firmware version at compile time 2024-05-08 02:19:51 +03:00
GrKoR
37c261700b upd: added uptime sensor 2024-05-08 02:09:37 +03:00
GrKoR
789053e4be ref: AP SSID name changed 2024-05-08 02:07:15 +03:00
GrKoR
f8d3714871 new AC tested: Centek CT-65EDC07 2024-05-07 18:45:05 +03:00
GrKoR
e5704ba869 new AC tested: Centek CT-65J09 2024-04-25 18:39:15 +03:00
GrKoR
e3e60e4f4f new AC tested: AUX AMWM-H12/4R3 multisplit 2024-04-21 22:46:53 +03:00
GrKoR
e98c67e75e new AC tested: IGC RAS-V09N2X 2024-04-21 22:29:16 +03:00
GrKoR
3f1e928a09 new AC tested: Centek CT-65FDC09 2024-04-21 21:34:47 +03:00
GrKoR
507fc06813 new AC tested: Mirage EWC121E - CWC121E 2024-04-21 21:23:37 +03:00
GrKoR
a48ec376b1 new AC tested: Royal Clima RC-VNR29HN 2024-04-21 19:26:05 +03:00
GrKoR
c2dfbefbcf new AC tested: Centek CT-65J12 2024-04-21 16:15:00 +03:00
GrKoR
f324cd1a0e upd: hardware description - USB pinout for newer ACs changed 2024-04-21 16:06:01 +03:00
GrKoR
4bd5c4509d new AC: Subtropic SUB-09HN1 tested 2024-04-08 12:15:48 +03:00
GrKoR
8228ee0777 docs: how to use specific version of the component 2024-04-04 17:24:38 +03:00
GrKoR
453f697c48 Doc - Info on 5V pin (RUS) 2024-04-04 17:22:27 +03:00
Najdanovic Ivan
82a17f0247 Descrption for the 5V PIN 2024-04-04 17:22:04 +03:00
Najdanovic Ivan
d14ed9650d new AC tested: Tesla TA35FFML-12410M 2024-04-04 17:21:18 +03:00
GrKoR
e7377604ba new AC tested: AUX ASM-H24LD 2024-04-04 17:20:30 +03:00
GrKoR
2f0f514ea6 new AC tested: AUX ASM-H12LL 2024-04-04 17:19:58 +03:00
GrKoR
394e64e1f8 new AC tested: Ishimatsu AVK-09I 2024-04-04 17:19:32 +03:00
GrKoR
fcbc853835 new AC tested: AUX AWM-09G1V4-X 2024-04-04 17:18:59 +03:00
GrKoR
c8d661377f new AC tested: AUX ASW-H12C5C4/JOR3DI-B8 2024-04-04 17:18:00 +03:00
GrKoR
9c6faeecb8 new AC tested: AUX ASW-H12A4/HA-R2DI 2024-04-04 17:16:10 +03:00
GrKoR
8afa70a999 new: advanced example have slider for power limitation function. 2024-04-04 17:15:38 +03:00
GrKoR
ca9a76124c new AC tested: Ballu BSUI-18HN8 2024-04-04 17:14:46 +03:00
GrKoR
dacd435177 doc update: new USB-connector pinout and voltage 2024-04-04 17:13:54 +03:00
GrKoR
bf8ab77c02 new AC tested: Xigma XG-SJ56RHA-IDU 2024-04-04 17:12:55 +03:00
GrKoR
61cad07acc fix: version++ 2023-11-09 23:14:13 +03:00
GK
3110c482c9 Merge pull request #88 from GrKoR/brokly's_power
fix: inverter power limitation by Brokly
2023-11-10 00:12:07 +04:00
GrKoR
53a886f818 ref: minor fixes of Brokly's changes 2023-11-09 23:07:54 +03:00
GrKoR
2d4162323a Brokly's changes for power limitation 2023-11-01 18:04:16 +03:00
GK
74d555b5e1 Merge pull request #87 from GrKoR/dev
fix: inverter power limitation off
2023-10-30 02:06:42 +04:00
GrKoR
7df8ab3cc2 fix: version++ 2023-10-30 01:05:30 +03:00
GrKoR
90d9a5cfa7 fix: inverter power limitation off 2023-10-28 22:42:04 +03:00
GrKoR
864ad07699 new AC tested: Ballu BSW-09HN1, Ballu BSW-12HN1 2023-10-17 01:18:16 +03:00
GrKoR
e595a4acf9 new AC tested: Roda RS-AL24F 2023-10-15 22:44:04 +03:00
9 changed files with 210 additions and 98 deletions

View File

@@ -46,6 +46,14 @@ external_components:
type: git
url: https://github.com/GrKoR/esphome_aux_ac_component
```
In case you need a specific version of the component, you can use the component declaration from the example below. The example uses version 0.2.14 of the component. You can find a list of available versions [on the GitHub tags page](https://github.com/GrKoR/esphome_aux_ac_component/tags).
```yaml
external_components:
- source:
type: git
url: https://github.com/GrKoR/esphome_aux_ac_component
ref: v.0.2.14
```
2. Configure UART to communicate with air conditioner:
```yaml
uart:

View File

@@ -54,6 +54,14 @@ external_components:
type: git
url: https://github.com/GrKoR/esphome_aux_ac_component
```
Если требуется прошить определенную версию компонента, используйте синтаксис из примера ниже. Здесь прошивается версия 0.2.14. Список версий смотрите [в тегах на гитхаб](https://github.com/GrKoR/esphome_aux_ac_component/tags).
```yaml
external_components:
- source:
type: git
url: https://github.com/GrKoR/esphome_aux_ac_component
ref: v.0.2.14
```
2. Настройте UART для коммуникации с вашим кондиционером:
```yaml
uart:

View File

@@ -113,7 +113,8 @@ namespace esphome
static const uint32_t AC_PACKET_TIMEOUT_MIN;
};
const std::string Constants::AC_FIRMWARE_VERSION = "0.2.12";
// AUX_AC_FIRMWARE_VERSION will be defined by the ESPHome code generator at compile time
const std::string Constants::AC_FIRMWARE_VERSION = AUX_AC_FIRMWARE_VERSION;
// custom fan modes
const std::string Constants::MUTE = "mute";
@@ -128,8 +129,9 @@ namespace esphome
const float Constants::AC_MIN_TEMPERATURE = 16.0;
const float Constants::AC_MAX_TEMPERATURE = 32.0;
const float Constants::AC_TEMPERATURE_STEP = 0.5;
const uint8_t Constants::AC_MIN_INVERTER_POWER_LIMIT = 30; // 30%
const uint8_t Constants::AC_MAX_INVERTER_POWER_LIMIT = 100; // 100%
// AUX_AC_MIN_INVERTER_POWER_LIMIT and AUX_AC_MAX_INVERTER_POWER_LIMIT will be defined by the ESPHome code generator at compile time
const uint8_t Constants::AC_MIN_INVERTER_POWER_LIMIT = AUX_AC_MIN_INVERTER_POWER_LIMIT;
const uint8_t Constants::AC_MAX_INVERTER_POWER_LIMIT = AUX_AC_MAX_INVERTER_POWER_LIMIT;
const uint32_t Constants::AC_STATES_REQUEST_INTERVAL = 7000;
// таймаут загрузки пакета
// По расчетам выходит:
@@ -141,8 +143,9 @@ namespace esphome
// команды будут теряться. От такой коллизии мы не защищены в любом случае. Но чем меньше таймаут,
// тем меньше шансов на коллизию.
// Из этих соображений выбраны границы диапазона (_MIN и _MAX значения).
const uint32_t Constants::AC_PACKET_TIMEOUT_MAX = 600;
const uint32_t Constants::AC_PACKET_TIMEOUT_MIN = 150;
// AUX_AC_PACKET_TIMEOUT_MAX and AUX_AC_PACKET_TIMEOUT_MIN will be defined by the ESPHome code generator at compile time
const uint32_t Constants::AC_PACKET_TIMEOUT_MAX = AUX_AC_PACKET_TIMEOUT_MAX;
const uint32_t Constants::AC_PACKET_TIMEOUT_MIN = AUX_AC_PACKET_TIMEOUT_MIN;
//****************************************************************************************************************************************************
//********************************************************* ОСНОВНЫЕ СТРУКТУРЫ ***********************************************************************
@@ -626,10 +629,18 @@ namespace esphome
// GK: define убрал, т.к. считаю, что сбрасывать счетчик не надо.
// #define AC_MIN_COUNTER_MASK 0b00111111
// включение-выключение функции "Ограничение мощности".
#define AC_POWLIMSTAT_MASK 0b10000000
enum ac_powLim_state : uint8_t
{
AC_POWLIMSTAT_OFF = 0x00,
AC_POWLIMSTAT_ON = 0x80,
AC_POWLIMSTAT_UNTOUCHED = 0xFF
};
// маски ограничения мощности для инверторного кондиционера
#define AC_INVERTER_POWER_LIMITATION_ENABLE_MASK 0b10000000
#define AC_INVERTER_POWER_LIMITATION_VALUE_MASK 0b01111111
#define AC_INVERTER_POWER_LIMITATION_VALUE_UNTOUCHED 0xFF
#define AC_POWLIMVAL_MASK 0b01111111
#define AC_POWLIMVAL_UNTOUCHED 0xFF
// положение вертикальных жалюзи для фронтенда
enum ac_vlouver_frontend : uint8_t
@@ -707,8 +718,8 @@ namespace esphome
ac_realFan realFanSpeed; // текущая скорость вентилятора
uint8_t inverter_power; // мощность инвертора
bool defrost; // режим разморозки внешнего блока (накопление тепла + прогрев испарителя)
bool inverter_power_limitation_enable; // ограничение мощности инвертора
uint8_t inverter_power_limitation_value; // значение ограничения мощности инвертора
ac_powLim_state power_lim_state; // статус ограничения мощности инвертора
uint8_t power_lim_value; // значение ограничения мощности инвертора
};
typedef ac_command_t ac_state_t; // текущее состояние параметров кондея можно хранить в таком же формате, как и комманды
@@ -1134,8 +1145,8 @@ namespace esphome
cmd->realFanSpeed = AC_REAL_FAN_UNTOUCHED;
cmd->inverter_power = 0;
cmd->defrost = false;
cmd->inverter_power_limitation_enable = false;
cmd->inverter_power_limitation_value = AC_INVERTER_POWER_LIMITATION_VALUE_UNTOUCHED;
cmd->power_lim_state = AC_POWLIMSTAT_UNTOUCHED;
cmd->power_lim_value = AC_POWLIMVAL_UNTOUCHED;
};
// очистка буфера размером AC_BUFFER_SIZE
@@ -1510,15 +1521,13 @@ namespace esphome
stateChangedFlag = stateChangedFlag || (_current_ac_state.mildew != (ac_mildew)stateByte);
_current_ac_state.mildew = (ac_mildew)stateByte;
// enable flag of power limitation for inverter ACs
bool temp = small_info_body->inverter_power_limitation_enable;
stateChangedFlag = stateChangedFlag || (_current_ac_state.inverter_power_limitation_enable != temp);
_current_ac_state.inverter_power_limitation_enable = temp;
stateByte = AC_POWLIMSTAT_ON * small_info_body->inverter_power_limitation_enable;
stateChangedFlag = stateChangedFlag || (_current_ac_state.power_lim_state != (ac_powLim_state)stateByte);
_current_ac_state.power_lim_state = (ac_powLim_state)stateByte;
// the limit value of power limitation for inverter ACs
stateByte = small_info_body->inverter_power_limitation_value;
stateChangedFlag = stateChangedFlag || (_current_ac_state.inverter_power_limitation_value != stateByte);
_current_ac_state.inverter_power_limitation_value = stateByte;
stateChangedFlag = stateChangedFlag || (_current_ac_state.power_lim_value != stateByte);
_current_ac_state.power_lim_value = stateByte;
// уведомляем об изменении статуса сплита
if (stateChangedFlag)
@@ -1921,13 +1930,17 @@ namespace esphome
}
}
// ограничение мощности инвертора
if ((cmd->inverter_power_limitation_enable) &&
(cmd->inverter_power_limitation_value != AC_INVERTER_POWER_LIMITATION_VALUE_UNTOUCHED))
// значение ограничения мощности инвертора
if ((cmd->power_lim_value != AC_POWLIMVAL_UNTOUCHED))
{
pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_ENABLE_MASK) | (cmd->inverter_power_limitation_enable << 7);
cmd->inverter_power_limitation_value = _power_limitation_value_normalise(cmd->inverter_power_limitation_value);
pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_VALUE_MASK) | cmd->inverter_power_limitation_value;
cmd->power_lim_value = _power_limitation_value_normalise(cmd->power_lim_value);
pack->body[13] = (pack->body[13] & ~AC_POWLIMVAL_MASK) | (cmd->power_lim_value & AC_POWLIMVAL_MASK);
}
// включение/выключение ограничения мощности инвертора
if ((cmd->power_lim_state != AC_POWLIMSTAT_UNTOUCHED))
{
pack->body[13] = (pack->body[13] & ~AC_POWLIMSTAT_MASK) | (cmd->power_lim_state & AC_POWLIMSTAT_MASK);
}
// обнулить счетчик минут с последней команды
@@ -2791,11 +2804,10 @@ namespace esphome
sensor_vlouver_state_->publish_state((float)this->getCurrentVlouverFrontendState());
// флаг включенного ограничения мощности инвертора
if (sensor_inverter_power_limit_state_ != nullptr)
sensor_inverter_power_limit_state_->publish_state(_current_ac_state.inverter_power_limitation_enable);
sensor_inverter_power_limit_state_->publish_state(_current_ac_state.power_lim_state == AC_POWLIMSTAT_ON);
// значение ограничения мощности инвертора
if (sensor_inverter_power_limit_value_ != nullptr)
sensor_inverter_power_limit_value_->publish_state(_current_ac_state.inverter_power_limitation_value);
sensor_inverter_power_limit_value_->publish_state(_current_ac_state.power_lim_value);
// сенсор состояния сплита
if (sensor_preset_reporter_ != nullptr)
{
@@ -2838,11 +2850,9 @@ namespace esphome
#endif
ESP_LOGCONFIG(TAG, " [?] Is inverter %s", millis() > _update_period + 1000 ? YESNO(_is_inverter) : "pending...");
LOG_SENSOR(" ", "Inverter Power", this->sensor_inverter_power_);
LOG_SENSOR(" ", "Inverter Power Limit Value", this->sensor_inverter_power_limit_value_);
LOG_BINARY_SENSOR(" ", "Inverter Power Limit State", this->sensor_inverter_power_limit_state_);
LOG_SENSOR(" ", "Indoor Temperature", this->sensor_indoor_temperature_);
LOG_SENSOR(" ", "Outdoor Temperature", this->sensor_outdoor_temperature_);
LOG_SENSOR(" ", "Inbound Temperature", this->sensor_inbound_temperature_);
@@ -3534,63 +3544,99 @@ namespace esphome
return true;
}
// выключает ограничение мощности сплита
bool powerLimitationOffSequence()
// устанавливает ограничение мощности сплита на нужный уровень
bool powerLimitationSetSequence(uint8_t power_limit, bool set_on=false)
{
// нет смысла в последовательности, если нет коннекта с кондиционером
if (!get_has_connection())
{
_debugMsg(F("powerLimitationOffSequence: no pings from HVAC. It seems like no AC connected."), ESPHOME_LOG_LEVEL_ERROR, __LINE__);
return false;
}
if (!this->_is_inverter)
return false; // если кондиционер не инверторный, то выходим
// формируем команду
ac_command_t cmd;
_clearCommand(&cmd); // не забываем очищать, а то будет мусор
cmd.inverter_power_limitation_enable = false;
cmd.inverter_power_limitation_value = this->_current_ac_state.inverter_power_limitation_value;
// добавляем команду в последовательность
if (!commandSequence(&cmd))
return false;
_debugMsg(F("powerLimitationOffSequence: loaded (value = %02X)"), ESPHOME_LOG_LEVEL_VERBOSE, __LINE__, cmd.inverter_power_limitation_enable);
return true;
}
// включает ограничение мощности сплита на нужный уровень
bool powerLimitationOnSequence(uint8_t power_limit = Constants::AC_MIN_INVERTER_POWER_LIMIT)
{
// нет смысла в последовательности, если нет коннекта с кондиционером
if (!get_has_connection())
{
_debugMsg(F("powerLimitationOnSequence: no pings from HVAC. It seems like no AC connected."), ESPHOME_LOG_LEVEL_ERROR, __LINE__);
_debugMsg(F("powerLimitationSetSequence: no pings from HVAC. It seems like no AC connected."), ESPHOME_LOG_LEVEL_ERROR, __LINE__);
return false;
}
if (!this->_is_inverter)
{ // если кондиционер не инверторный, то выходим
_debugMsg(F("powerLimitationOnSequence: unsupported for noninverter AC."), ESPHOME_LOG_LEVEL_WARN, __LINE__);
_debugMsg(F("powerLimitationSetSequence: unsupported for noninverter AC."), ESPHOME_LOG_LEVEL_WARN, __LINE__);
return false;
}
power_limit = this->_power_limitation_value_normalise(power_limit);
if(power_limit != this->_power_limitation_value_normalise(power_limit))
{
_debugMsg(F("powerLimitationSetSequence: incorrect power limit value."), ESPHOME_LOG_LEVEL_WARN, __LINE__);
return false;
}
// формируем команду
ac_command_t cmd;
_clearCommand(&cmd); // не забываем очищать, а то будет мусор
cmd.inverter_power_limitation_enable = true;
cmd.inverter_power_limitation_value = power_limit;
cmd.power_lim_value = power_limit;
if (set_on)
{
cmd.power_lim_state = AC_POWLIMSTAT_ON;
}
// добавляем команду в последовательность
if (!commandSequence(&cmd))
return false;
_debugMsg(F("powerLimitationOnSequence: loaded (power limit = %02X)"), ESPHOME_LOG_LEVEL_VERBOSE, __LINE__, power_limit);
if (set_on)
{
_debugMsg(F("powerLimitationSetSequence: loaded (state = %02X, power limit = %02X)"), ESPHOME_LOG_LEVEL_VERBOSE, __LINE__, cmd.power_lim_state, power_limit);
} else {
_debugMsg(F("powerLimitationSetSequence: loaded (power limit = %02X)"), ESPHOME_LOG_LEVEL_VERBOSE, __LINE__, power_limit);
}
return true;
}
// включает/выключает ограничение мощности сплита
bool powerLimitationOnOffSequence(bool enable_limit)
{
// нет смысла в последовательности, если нет коннекта с кондиционером
if (!get_has_connection())
{
_debugMsg(F("powerLimitationOnOffSequence: no pings from HVAC. It seems like no AC connected."), ESPHOME_LOG_LEVEL_ERROR, __LINE__);
return false;
}
if (!this->_is_inverter)
{
_debugMsg(F("powerLimitationOnSequence: unsupported for noninverter AC."), ESPHOME_LOG_LEVEL_WARN, __LINE__);
return false; // если кондиционер не инверторный, то выходим
}
// формируем команду
ac_command_t cmd;
_clearCommand(&cmd); // не забываем очищать, а то будет мусор
if(enable_limit){
cmd.power_lim_state = AC_POWLIMSTAT_ON; // включить ограничение мощности
} else {
cmd.power_lim_state = AC_POWLIMSTAT_OFF; // отключить ограничение мощности
}
// добавляем команду в последовательность
if (!commandSequence(&cmd))
return false;
_debugMsg(F("powerLimitationOnOffSequence: loaded (state = %02X)"), ESPHOME_LOG_LEVEL_VERBOSE, __LINE__, cmd.power_lim_state);
return true;
}
// включает ограничение мощности сплита
bool powerLimitationOnSequence()
{
return powerLimitationOnOffSequence(true);
}
// включает ограничение мощности сплита на нужный уровень
bool powerLimitationOnSequence(uint8_t power_limit)
{
return powerLimitationSetSequence(power_limit, true);
}
// выключает ограничение мощности сплита
bool powerLimitationOffSequence()
{
return powerLimitationOnOffSequence(false);
}
// конвертирует состояние жалюзи из кодов сплита в коды для фронтенда
ac_vlouver_frontend AUXvlouverToVlouverFrontend(const ac_louver_V vLouver)
{

View File

@@ -1,4 +1,5 @@
import logging
from esphome.core import CORE, Define
import esphome.config_validation as cv
import esphome.codegen as cg
from esphome.components import climate, uart, sensor, binary_sensor, text_sensor
@@ -32,6 +33,12 @@ from esphome.components.climate import (
ClimateSwingMode,
)
AUX_AC_FIRMWARE_VERSION = '0.2.15'
AC_PACKET_TIMEOUT_MIN = 150
AC_PACKET_TIMEOUT_MAX = 600
AC_POWER_LIMIT_MIN = 30
AC_POWER_LIMIT_MAX = 100
_LOGGER = logging.getLogger(__name__)
CODEOWNERS = ["@GrKoR"]
@@ -120,8 +127,6 @@ AirConPowerLimitationOnAction = aux_ac_ns.class_(
)
AC_PACKET_TIMEOUT_MIN = 150
AC_PACKET_TIMEOUT_MAX = 600
def validate_packet_timeout(value):
minV = AC_PACKET_TIMEOUT_MIN
maxV = AC_PACKET_TIMEOUT_MAX
@@ -130,8 +135,6 @@ def validate_packet_timeout(value):
raise cv.Invalid(f"Timeout should be in range: {minV}..{maxV}.")
AC_POWER_LIMIT_MIN = 30
AC_POWER_LIMIT_MAX = 100
def validate_power_limit_range(value):
minV = AC_POWER_LIMIT_MIN
maxV = AC_POWER_LIMIT_MAX
@@ -182,7 +185,7 @@ def validate_raw_data(value):
def output_info(config):
"""_LOGGER.info(config.items())"""
_LOGGER.info("AUX_AC firmware version: %s", AUX_AC_FIRMWARE_VERSION)
return config
@@ -330,6 +333,21 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config):
CORE.add_define(
Define("AUX_AC_FIRMWARE_VERSION", '"'+AUX_AC_FIRMWARE_VERSION+'"')
)
CORE.add_define(
Define("AUX_AC_PACKET_TIMEOUT_MIN", AC_PACKET_TIMEOUT_MIN)
)
CORE.add_define(
Define("AUX_AC_PACKET_TIMEOUT_MAX", AC_PACKET_TIMEOUT_MAX)
)
CORE.add_define(
Define("AUX_AC_MIN_INVERTER_POWER_LIMIT", AC_POWER_LIMIT_MIN)
)
CORE.add_define(
Define("AUX_AC_MAX_INVERTER_POWER_LIMIT", AC_POWER_LIMIT_MAX)
)
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
await climate.register_climate(var, config)
@@ -414,13 +432,13 @@ async def to_code(config):
cg.add(var.set_custom_fan_modes(config[CONF_CUSTOM_FAN_MODES]))
DISPLAY_ACTION_SCHEMA = maybe_simple_id(
{
cv.Required(CONF_ID): cv.use_id(AirCon),
}
)
@automation.register_action(
"aux_ac.display_off", AirConDisplayOffAction, DISPLAY_ACTION_SCHEMA
)
@@ -428,6 +446,7 @@ async def display_off_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.display_on", AirConDisplayOnAction, DISPLAY_ACTION_SCHEMA
)
@@ -436,13 +455,13 @@ async def display_on_to_code(config, action_id, template_arg, args):
return cg.new_Pvariable(action_id, template_arg, paren)
VLOUVER_ACTION_SCHEMA = maybe_simple_id(
{
cv.Required(CONF_ID): cv.use_id(AirCon),
}
)
@automation.register_action(
"aux_ac.vlouver_stop", AirConVLouverStopAction, VLOUVER_ACTION_SCHEMA
)
@@ -450,6 +469,7 @@ async def vlouver_stop_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_swing", AirConVLouverSwingAction, VLOUVER_ACTION_SCHEMA
)
@@ -457,6 +477,7 @@ async def vlouver_swing_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_top", AirConVLouverTopAction, VLOUVER_ACTION_SCHEMA
)
@@ -464,6 +485,7 @@ async def vlouver_top_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_middle_above", AirConVLouverMiddleAboveAction, VLOUVER_ACTION_SCHEMA
)
@@ -471,6 +493,7 @@ async def vlouver_middle_above_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_middle", AirConVLouverMiddleAction, VLOUVER_ACTION_SCHEMA
)
@@ -478,6 +501,7 @@ async def vlouver_middle_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_middle_below", AirConVLouverMiddleBelowAction, VLOUVER_ACTION_SCHEMA
)
@@ -485,6 +509,7 @@ async def vlouver_middle_below_to_code(config, action_id, template_arg, args):
paren = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, paren)
@automation.register_action(
"aux_ac.vlouver_bottom", AirConVLouverBottomAction, VLOUVER_ACTION_SCHEMA
)
@@ -493,7 +518,6 @@ async def vlouver_bottom_to_code(config, action_id, template_arg, args):
return cg.new_Pvariable(action_id, template_arg, paren)
VLOUVER_SET_ACTION_SCHEMA = cv.Schema(
{
cv.Required(CONF_ID): cv.use_id(AirCon),
@@ -501,6 +525,7 @@ VLOUVER_SET_ACTION_SCHEMA = cv.Schema(
}
)
@automation.register_action(
"aux_ac.vlouver_set", AirConVLouverSetAction, VLOUVER_SET_ACTION_SCHEMA
)
@@ -512,13 +537,13 @@ async def vlouver_set_to_code(config, action_id, template_arg, args):
return var
POWER_LIMITATION_OFF_ACTION_SCHEMA = maybe_simple_id(
{
cv.Required(CONF_ID): cv.use_id(AirCon),
}
)
@automation.register_action(
"aux_ac.power_limit_off", AirConPowerLimitationOffAction, POWER_LIMITATION_OFF_ACTION_SCHEMA
)
@@ -527,7 +552,6 @@ async def power_limit_off_to_code(config, action_id, template_arg, args):
return cg.new_Pvariable(action_id, template_arg, paren)
POWER_LIMITATION_ON_ACTION_SCHEMA = cv.Schema(
{
cv.Required(CONF_ID): cv.use_id(AirCon),
@@ -535,6 +559,7 @@ POWER_LIMITATION_ON_ACTION_SCHEMA = cv.Schema(
}
)
@automation.register_action(
"aux_ac.power_limit_on", AirConPowerLimitationOnAction, POWER_LIMITATION_ON_ACTION_SCHEMA
)
@@ -546,7 +571,6 @@ async def power_limit_on_to_code(config, action_id, template_arg, args):
return var
# *********************************************************************************************************
# ВАЖНО! Только для инженеров!
# Вызывайте метод aux_ac.send_packet только если понимаете, что делаете! Он не проверяет данные, а передаёт

View File

@@ -3,25 +3,29 @@
Кондиционеры из списка ниже протестированы и точно совместимы с `aux_ac`.
+ Argo (models: Greenstyle 9000, Greenstyle 12000, Greenstyle 18000)
+ AUX (models: ALMD-H48/5DR2 / AL-H48/5DR2(U), AMWM-H07/4R1 multisplit, ASW-H07A4/DE-R1DI, ASW-H07A4/FP-R1DI, ASW-H09A4/FP-R1DI, ASW-H09A4/LK-700R1, ASW-H09A4/LK-700R1DI, ASW-H12B4/JD-R2DI, ASW-H12A4/FAR1, ASW-H09B4/LK-700R1, ASW-H12U3/JIR1DI-US, AUX-18QC/I / AUX-18QC/O, KFR-26GW/BpHRB+3, KFR-26GW/BpQYA2+2R3, KFR-26GW/BpQYD2+2R3, KFR-26GW/BpR3QYA1+1, KFR-26GW/BpR3QYD1+1, KFR-26GW/BpR3QYQ1+1, KFR-26GW/BpR3QYQ2+2, KFR-35GW/BpQYA1+1R3, KFR-35GW/BpQYA2+2R3, KFR-35GW/BpQYD1+1R3, KFR-35GW/BpQYD2+2R3, KFR-35GW/BpR3QYQ1+1, KFR-35GW/BpR3QYQ2+2 (see [issue #71](https://github.com/GrKoR/esphome_aux_ac_component/issues/71) for detais of `Aegean Sea`[爱琴海] AUX family AC connection)
+ Ballu (models: BLC_CF/in-60HN1, BSUI-09HN8, BSUI-12HN8)
+ Centek (models: CT-65A12, CT-65F09, CT-65F12, CT-65Q09, CT-65Q12, CT-65U13, CT-65Z10, CT-65Z18, CT-65V24)
+ AUX (models: ALMD-H48/5DR2 / AL-H48/5DR2(U), AMWM-H07/4R1 multisplit, AMWM-H12/4R3 multisplit, ASM-H12LL, ASM-H24LD, ASW-H07A4/DE-R1DI, ASW-H07A4/FP-R1DI, ASW-H09A4/FP-R1DI, ASW-H12A4/HA-R2DI, ASW-H09A4/LK-700R1, ASW-H09A4/LK-700R1DI, ASW-H12B4/JD-R2DI, ASW-H12A4/FAR1, ASW-H09B4/LK-700R1, ASW-H12C5C4/JOR3DI-B8, ASW-H12U3/JIR1DI-US, AUX-18QC/I / AUX-18QC/O, AWM-09G1V4-X, KFR-26GW/BpHRB+3, KFR-26GW/BpQYA2+2R3, KFR-26GW/BpQYD2+2R3, KFR-26GW/BpR3QYA1+1, KFR-26GW/BpR3QYD1+1, KFR-26GW/BpR3QYQ1+1, KFR-26GW/BpR3QYQ2+2, KFR-35GW/BpQYA1+1R3, KFR-35GW/BpQYA2+2R3, KFR-35GW/BpQYD1+1R3, KFR-35GW/BpQYD2+2R3, KFR-35GW/BpR3QYQ1+1, KFR-35GW/BpR3QYQ2+2 (see [issue #71](https://github.com/GrKoR/esphome_aux_ac_component/issues/71) for detais of `Aegean Sea`[爱琴海] AUX family AC connection)
+ Ballu (models: BLC_CF-60HN1, BSUI-09HN8, BSUI-12HN8, BSUI-18HN8, BSW-09HN1, BSW-12HN1)
+ Centek (models: CT-65A12, CT-65EDC07, CT-65F09, CT-65F12, CT-65FDC09, CT-65J09, CT-65J12, CT-65Q09, CT-65Q12, CT-65U13, CT-65V24, CT-65Z10, CT-65Z18)
+ Dimstal (model: SMND-QC-12-J-Smart ECO)
+ Elgin (models: HWFI09B2IA/ HWFE09B2NA)
+ Energolux (models: SAS07L2-A, SAS07L4-A, SAS07M2-AI, SAS09B3-A, SAS09L4-A, SAS09Z4-AI, SAS12BN1-AI, SAS12CH1-AI, SAS12Z3-AI)
+ Hyundai (models: H-AR16-07H, H-AR21-07H, H-AR21-09H)
+ iClima (models: ICI-09A/IUI-09A)
+ Idea (models: ISR-12HR-SA7-DN1 ION)
+ IGC (models: RAK-07NH multysplit, RAS-07AX/RAC-07AX)
+ IGC (models: RAK-07NH multysplit, RAS-07AX/RAC-07AX, RAS-V09N2X/RAC-V09N2X)
+ Ishimatsu (models: AVK-09I)
+ Loriot (models: LAC-09AS)
+ Mirage (models: EWC121E - CWC121E)
+ RCool (models: GRA12B0-KSZKLM641)
+ Roda (models: RS-AL09F)
+ Roda (models: RS-AL09F, RS-AL24F)
+ Rovex (models: RS-07ALS1, RS-09ALS1, RS-12ALS1)
+ Royal Clima (models: CO-D 18HNI/CO-E 18HNI, RCI-SA30HN)
+ Royal Clima (models: CO-D 18HNI/CO-E 18HNI, RC-VNR29HN, RCI-SA30HN)
+ Samurai (models: SMA-07HRN1 ION, SMA-09HRN1 ION)
+ Subtropic (models: SUB-07HN1, SUB-12HN1)
+ Subtropic (models: SUB-07HN1, SUB-09HN1, SUB-12HN1)
+ Tesla (models: TA35FFML-12410M)
+ TOYOTOMI (models: SONZAI THN/THG-A35SZ)
+ VOX (models: IVA5-12JR1, IJO09-SC4D)
+ Xigma (models: XG-SJ56RHA-IDU)
+ Zephir (models: ZEL 12000BTU)
+ Бирюса (models: B-07DPR/B-07DPQ, B-09FIR/B-09FIQ)

View File

@@ -16,7 +16,7 @@ It use [JST SM](https://www.jst-mfg.com/product/pdf/eng/eSM.pdf) connector for 5
### Pinout ###
1. Yellow: +12V..+14V DC. Measured +14.70V max and +13.70V min. Service manual declares up to +16V.
2. Black: ground.
3. White: +5V DC (max: +5.63V; min: +4.43V) I have no idea what this is for. It goes directly to the air conditioner microcontroller through resistor 1kOhm and it does not affect the operation of the module.
3. White: +5V DC (max: +5.63V; min: +4.43V) Enable signal for the 3V3 buck regulator on the OEM module. It goes directly to the air conditioner microcontroller through resistor 1kOhm. It's non used with the EPS module.
4. Blue: TX of air conditioner. High is +5V.
5. Red: RX of air conditioner. High is +5V.
@@ -28,16 +28,20 @@ For 4-wire connection it is used USB-like connector. It is only physical USB but
**ATTENTION!** It is incompatible with normal USB devices! Ordinary USB device like USB flash drive will be damaged if it will be plugged in air conditioner USB connector.
**ATTENTION #2!** Manufacturer was changed power circuit and connector pinout in 2022-2023: power rail has +8.5V DC and TX/RX pins are swapped.
### Pinout ###
<img src="https://github.com/GrKoR/esphome_aux_ac_component/blob/master/images/USB-pinout.png?raw=true" width="400">
1. +12V..+14V DC. Service manual declares up to +16V.
2. RX of air conditioner. High level is +5V.
3. TX of air conditioner. High level is +5V.
1. +12V..+14V DC before 2022-2023, possible +8.5V DC after 2022-2023. Service manual declares up to +16V.
2. RX of the air conditioner for models manufactured before about Jul.2022, TX of the air conditioner for later modifications. High level is +5V.
3. TX of the air conditioner for models manufactured before about Jul.2022, RX of the air conditioner for later modifications. High level is +5V.
4. GND - ground.
Big thanks to [@diabl0](https://github.com/diabl0) for this pinout in [issue #70](https://github.com/GrKoR/esphome_aux_ac_component/issues/70).
If you are not sure, on which USB-pins do you have RX and TX lines, than don't afraid to connect it randomly. Neither air conditioner nor ESP will be damaged in this situation, just `aux_ac` can't receive data from the air conditioner. Swap TX and RX and your device will probably work.
## Power supply
For power supply it is possible to use any kind of suitable modules. I use this:

View File

@@ -15,7 +15,7 @@
### Распиновка ###
1. Желтый: +12В..+14В постоянного тока. Осциллограф показал от +13.70В до +14.70В. В сервисном мануале встречалось, что питание возможно до +16В.
2. Черный: земля.
3. Белый: +5В постоянного тока (измерено от +4.43В до +5.63В). Для чего нужна эта линия - не понятно. У меня нет версий. Эксперименты с родным Wi-Fi модулем сплит-системы показали, что эта линия в работе Wi-Fi не участвует. Линия идет напрямую на ножку контроллера в сплите через резистор 1 кОм.
3. Белый: +5В постоянного тока (измерено от +4.43В до +5.63В). По информации от пользователей, это сигнальная линия, включающая по DC-DC конвертор на wifi-модуле по команде с кондиционера. Линия идет напрямую на ножку контроллера в сплите через резистор 1 кОм. Эксперименты с родным Wi-Fi модулем сплит-системы показали, что эта линия в работе Wi-Fi не участвует и имеет всегда высокий уровень. В работе компонента и самодельного wifi-модуля эта линия не используется.
4. Синий: TX кондиционера. Высокий уровень +5В.
5. Red: RX кондиционера. Высокий уровень +5В.
@@ -26,16 +26,20 @@
**ВНИМАНИЕ!** С устройствами c настоящим USB этот интерфейс не совместим! Если вставить в разъём обычную USB-флешку или другое устройство, скорее всего оно просто сгорит.
**ВНИМАНИЕ №2!** В 2022-2023 производитель поменял распиновку и схему питания. Теперь кондиционеры на USB-коннектор выдают +8.5В. А пины RX и TX поменялись местами.
### Распиновка ###
<img src="https://github.com/GrKoR/esphome_aux_ac_component/blob/master/images/USB-pinout.png?raw=true" width="400">
1. +12В..+14В постоянного тока. Осциллограф показал от +13.70В до +14.70В. В сервисном мануале встречалось, что питание возможно до +16В.
2. RX кондиционера. Высокий уровень +5В.
3. TX кондиционера. Высокий уровень +5В.
1. +12В..+14В постоянного тока для кондиционеров до 2023 года, возможно +8.5В для кондиционеров 2022-2023 годов и моложе. В сервисном мануале на кондиционеры до 2022 года встречалось, что питание возможно до +16В.
2. RX кондиционера для моделей, произведенных примерно до 07.2022, TX кондиционера для более поздних модификаций. Высокий уровень +5В.
3. TX кондиционера для моделей, произведенных примерно до 07.2022, RX кондиционера для более поздних модификаций. Высокий уровень +5В.
4. земля.
Большое спасибо [@diabl0](https://github.com/diabl0) за эту распиновку ([issue #70](https://github.com/GrKoR/esphome_aux_ac_component/issues/70)).
Если вы не знаете, на каких именно пинах USB-разъема в вашем случае расположены TX и RX, то не бойтесь подключить наугад. Ни кондиционер, ни ESP не пострадают, если вы перепутаете линии TX и RX. Просто компонент не увидит кондиционер, о чем будут сообщения в логе. В таком случае просто попробуйте поменять TX и RX местами.
## Питание
Для питания ESP8266 можно использовать любой подходящий DC-DC преобразователь. Я использовал такой:

View File

@@ -139,6 +139,8 @@ sensor:
unit_of_measurement: "dBa"
accuracy_decimals: 0
- platform: uptime
name: ${upper_devicename} Uptime Sensor
switch:
- platform: template
@@ -215,3 +217,15 @@ number:
- aux_ac.vlouver_set:
id: aux_id
position: !lambda "return x;"
- platform: template
name: ${upper_devicename} Power Limit
id: ${devicename}_power_limit
icon: "mdi:battery-unknown"
mode: "slider"
min_value: 30
max_value: 100
step: 1
set_action:
then:
- lambda: !lambda "id(aux_id).powerLimitationOnSequence( x );"

View File

@@ -20,7 +20,7 @@ wifi:
password: !secret wifi_pass
reboot_timeout: 0s
ap:
ssid: Test AUX Fallback Hotspot
ssid: $upper_devicename Fallback Hotspot
password: !secret wifi_ap_pass
logger: