mirror of
https://github.com/GrKoR/esphome_aux_ac_component.git
synced 2025-12-13 23:16:59 +03:00
@@ -19,7 +19,6 @@ namespace aux_ac {
|
||||
AirCon *ac_;
|
||||
};
|
||||
|
||||
|
||||
template <typename... Ts>
|
||||
class AirConDisplayOnAction : public Action<Ts...>
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#warning "Saving presets does not work with ESP8266"
|
||||
#endif
|
||||
|
||||
//#define HOLMS 19 // раскоментируй ключ для вывода лога под Эксель, значение ключа - размер пакетов которые будут видны
|
||||
#define HOLMS 9 // раскоментируй ключ для вывода лога под Эксель, значение ключа - размер пакетов которые будут видны
|
||||
|
||||
namespace esphome {
|
||||
namespace aux_ac {
|
||||
@@ -189,9 +189,8 @@ struct packet_big_info_body_t {
|
||||
// БАЙТ 3
|
||||
bool power:1;
|
||||
bool sleep:1;
|
||||
bool v_louver:1;
|
||||
bool h_louver:1;
|
||||
bool louvers_on:1;
|
||||
bool louver_V:1;
|
||||
uint8_t louver_H:2; // у шторок лево-право, почему то два бита
|
||||
uint8_t mode:3; // enum { AC_BIG_MODE_AUTO = 0,
|
||||
// AC_BIG_MODE_COOL = 1,
|
||||
// AC_BIG_MODE_DRY = 2,
|
||||
@@ -216,6 +215,8 @@ struct packet_big_info_body_t {
|
||||
// 0x41 1000001 - DRY
|
||||
// 0x21 100001 - COOL
|
||||
// 0x81 10000001 - HEAT
|
||||
// 0x85 10000101 - HEAT+шторки верх-низ
|
||||
// 0x99 10011001 - HEAT+шторки влево вправо
|
||||
// 0xC1 11000001 - FAN // 7 и 6 бит связаны
|
||||
// 0x80 10000000 - продувка после переключения из HEAT в OFF
|
||||
// 0xC5 11000101 - FAN+шторки верх-низ
|
||||
@@ -225,8 +226,8 @@ struct packet_big_info_body_t {
|
||||
// 0x39 111001 - COOL+шторки лево-право
|
||||
// Очевидно битовые, но связные, поля, предположительные зависимости
|
||||
// ВНИМАНИЕ : режимы номинальны, например в режиме АВТО нагрев или охлаждение не отображаются
|
||||
// 7+6+5 4 3 2 1 0
|
||||
// MODE LouvON LouH LouV SLEEP ON/OFF
|
||||
// 7+6+5 4+3 2 1 0
|
||||
// MODE Louv_L Louv_H SLEEP ON/OFF
|
||||
//
|
||||
// ФУНКЦМЯ CLEEN, HEALTH, ANTIFUNGUS на данный байт не влияют
|
||||
//
|
||||
@@ -235,11 +236,11 @@ struct packet_big_info_body_t {
|
||||
// AC_BIG_MODE_COOL = 0x20,
|
||||
// AC_BIG_MODE_HEAT = 0x80,
|
||||
// AC_BIG_MODE_FAN = 0xC0}
|
||||
// #define AC_BIG_MASK_MODE b00011100
|
||||
// enum { AC_BIG_LOUVERS_H = 0x04,
|
||||
// AC_BIG_LOUVERS_L = 0x18,
|
||||
// AC_BIG_LOUVERS_BOTH = 0x1C}
|
||||
// #define AC_BIG_MASK_POWER b00000001
|
||||
// #define AC_BIG_MASK_LOUVERS_ON b00010000
|
||||
// #define AC_BIG_MASK_LOUVERS_H b00000100
|
||||
|
||||
// #define AC_BIG_MASK_LOUVERS_L b00001000
|
||||
// #define AC_BIG_MASK_SLEEP b00000010
|
||||
// #define AC_BIG_MASK_COOL b00100000
|
||||
//
|
||||
@@ -411,6 +412,7 @@ struct packet_small_info_body_t {
|
||||
uint8_t fan_speed; // три старших бита - скорость вентилятора, остальные биты не известны
|
||||
// AUTO = 0xA0, LOW = 0x60, MEDIUM = 0x40, HIGH = 0x20
|
||||
uint8_t fan_turbo_and_mute; // бит 7 = режим MUTE, бит 6 - режим TURBO; остальные не известны
|
||||
// БФЙТ 7
|
||||
uint8_t mode; // режим работы сплита:
|
||||
// AUTO : bits[7, 6, 5] = [0, 0, 0]
|
||||
// COOL : bits[7, 6, 5] = [0, 0, 1]
|
||||
@@ -529,7 +531,7 @@ enum ac_mildew : uint8_t { AC_MILDEW_OFF = 0x00, AC_MILDEW_ON = 0x08, AC_MILDEW_
|
||||
|
||||
// настройка усреднения фильтра температуры. Это значение - взнос нового измерения
|
||||
// в усредненные показания в процентах
|
||||
#define OUTDOOR_FILTER_PESCENT 1
|
||||
#define OUTDOOR_FILTER_PESCENT 0.2
|
||||
|
||||
/** команда для кондиционера
|
||||
*
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
external_components:
|
||||
- source:
|
||||
#type: git
|
||||
#url: https://github.com/GrKoR/esphome_aux_ac_component
|
||||
type: local
|
||||
path: my_components
|
||||
type: git
|
||||
url: https://github.com/Brokly/esphome_aux_ac_component
|
||||
#type: local
|
||||
#path: my_components
|
||||
components: [ aux_ac ]
|
||||
refresh: 0s
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
platform: ESP8266
|
||||
board: esp12e
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: arduino
|
||||
#esp32:
|
||||
# board: nodemcu-32s
|
||||
# framework:
|
||||
# type: arduino
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
@@ -34,9 +36,10 @@ debug:
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
baud_rate: 0
|
||||
|
||||
api:
|
||||
# password: !secret api_pass
|
||||
password: !secret api_pass
|
||||
|
||||
ota:
|
||||
password: !secret ota_pass
|
||||
@@ -49,8 +52,10 @@ web_server:
|
||||
|
||||
uart:
|
||||
id: ac_uart_bus
|
||||
tx_pin: GPIO16
|
||||
rx_pin: GPIO17
|
||||
#tx_pin: GPIO16
|
||||
#rx_pin: GPIO17
|
||||
tx_pin: GPIO1
|
||||
rx_pin: GPIO3
|
||||
baud_rate: 4800
|
||||
data_bits: 8
|
||||
parity: EVEN
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#===================================================================================
|
||||
|
||||
substitutions:
|
||||
devicename: kitchen_ac
|
||||
devicename: kitchen-ac
|
||||
low_devicename: kitchen_ac
|
||||
upper_devicename: Kitchen AC
|
||||
|
||||
# use different wifi_ip and wifi_ota_ip in case of esp ip-address change
|
||||
@@ -14,4 +15,4 @@ substitutions:
|
||||
wifi_ip: !secret wifi_ip_kitchen
|
||||
wifi_ota_ip: !secret wifi_ota_ip_kitchen
|
||||
|
||||
<<: !include ac_common.yaml
|
||||
<<: !include ac-energolux-bern.yaml
|
||||
@@ -6,7 +6,8 @@
|
||||
#===================================================================================
|
||||
|
||||
substitutions:
|
||||
devicename: livingroom_ac
|
||||
devicename: livingroom-ac
|
||||
low_devicename: livingroom_ac
|
||||
upper_devicename: Livingroom AC
|
||||
|
||||
# use different wifi_ip and wifi_ota_ip in case of esp ip-address change
|
||||
@@ -14,4 +15,4 @@ substitutions:
|
||||
wifi_ip: !secret wifi_ip_livingroom
|
||||
wifi_ota_ip: !secret wifi_ota_ip_livingroom
|
||||
|
||||
<<: !include ac_common.yaml
|
||||
<<: !include ac-energolux-bern.yaml
|
||||
@@ -1,122 +0,0 @@
|
||||
# DON'T COMPILE THIS FILE
|
||||
# This file contains common settings for all air conditioners of your house
|
||||
external_components:
|
||||
- source: github://GrKoR/esphome_aux_ac_component
|
||||
components: [ aux_ac ]
|
||||
refresh: 0s
|
||||
|
||||
esphome:
|
||||
name: $devicename
|
||||
platform: ESP8266
|
||||
board: esp12e
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_pass
|
||||
manual_ip:
|
||||
static_ip: ${wifi_ip}
|
||||
gateway: !secret wifi_gateway
|
||||
subnet: !secret wifi_subnet
|
||||
ap:
|
||||
ssid: ${upper_devicename} Hotspot
|
||||
password: !secret wifi_ap_pass
|
||||
use_address: ${wifi_ota_ip}
|
||||
|
||||
captive_portal:
|
||||
debug:
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
baud_rate: 0
|
||||
# set hardware_uart to UART1 and comment out baud_rate above in case of boot crashes
|
||||
# it is suitable if you need hardware loggin
|
||||
# hardware_uart: UART1
|
||||
|
||||
api:
|
||||
password: !secret api_pass
|
||||
|
||||
ota:
|
||||
password: !secret ota_pass
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
auth:
|
||||
username: !secret web_server_user
|
||||
password: !secret web_server_password
|
||||
|
||||
# UART0 configuration for AUX air conditioner communication
|
||||
uart:
|
||||
id: ac_uart_bus
|
||||
tx_pin: GPIO1
|
||||
rx_pin: GPIO3
|
||||
baud_rate: 4800
|
||||
data_bits: 8
|
||||
parity: EVEN
|
||||
stop_bits: 1
|
||||
|
||||
|
||||
|
||||
climate:
|
||||
- platform: aux_ac
|
||||
name: ${upper_devicename}
|
||||
id: aux_id
|
||||
uart_id: ac_uart_bus
|
||||
period: 7s
|
||||
show_action: true
|
||||
display_inverted: true
|
||||
indoor_temperature:
|
||||
name: ${upper_devicename} Indoor Temperature
|
||||
id: ${devicename}_indoor_temp
|
||||
internal: false
|
||||
display_state:
|
||||
name: $upper_devicename Display State
|
||||
id: ${devicename}_display_state
|
||||
internal: false
|
||||
visual:
|
||||
min_temperature: 16
|
||||
max_temperature: 32
|
||||
temperature_step: 0.5
|
||||
supported_modes:
|
||||
- HEAT_COOL
|
||||
- COOL
|
||||
- HEAT
|
||||
- DRY
|
||||
- FAN_ONLY
|
||||
custom_fan_modes:
|
||||
- MUTE
|
||||
- TURBO
|
||||
supported_presets:
|
||||
- SLEEP
|
||||
custom_presets:
|
||||
- CLEAN
|
||||
- FEEL
|
||||
- HEALTH
|
||||
- ANTIFUNGUS
|
||||
supported_swing_modes:
|
||||
- VERTICAL
|
||||
- HORIZONTAL
|
||||
- BOTH
|
||||
|
||||
|
||||
sensor:
|
||||
# just wifi signal strength for debug purpose only
|
||||
- platform: wifi_signal
|
||||
name: ${upper_devicename} WiFi Signal
|
||||
update_interval: 30s
|
||||
unit_of_measurement: "dBa"
|
||||
accuracy_decimals: 0
|
||||
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: $upper_devicename Display
|
||||
lambda: |-
|
||||
if (id(${devicename}_display_state).state) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
turn_on_action:
|
||||
- aux_ac.display_on: aux_id
|
||||
turn_off_action:
|
||||
- aux_ac.display_off: aux_id
|
||||
@@ -1,5 +1,5 @@
|
||||
external_components:
|
||||
- source: github://GrKoR/esphome_aux_ac_component
|
||||
- source: github://Brokly/esphome_aux_ac_component
|
||||
components: [ aux_ac ]
|
||||
refresh: 0s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user