updating configuration
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
sensor: []
|
||||
substitutions:
|
||||
board_name: Coffee Philips 5400
|
||||
device_name: coffee-philips-5400
|
||||
node_name: coffee-philips-5400
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${board_name}
|
||||
comment: ${board_name}
|
||||
name: ${node_name}
|
||||
friendly_name: coffee-philips-5400
|
||||
comment: ESP32 Coffee Philips 5400
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
@@ -33,7 +33,8 @@ ota:
|
||||
wifi:
|
||||
ssid: "MonsterFNV"
|
||||
password: "7065485qwe"
|
||||
use_address: ${device_name}.lan
|
||||
fast_connect: off
|
||||
reboot_timeout: 15min
|
||||
|
||||
#Если не будет связи с WiFi, то поднимется точка доступа
|
||||
ap:
|
||||
@@ -172,7 +173,111 @@ text_sensor:
|
||||
icon: mdi:alert-circle-outline
|
||||
update_interval: never
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: "Тип напитка"
|
||||
id: coffee_type
|
||||
options:
|
||||
- "Эспрессо"
|
||||
- "Американо"
|
||||
- "Капучино"
|
||||
- "Латте"
|
||||
- "Кофе с молоком"
|
||||
- "Молочная пена"
|
||||
- "Горячая вода"
|
||||
initial_option: "Эспрессо"
|
||||
optimistic: true
|
||||
|
||||
- platform: template
|
||||
name: "Крепость"
|
||||
id: coffee_strength
|
||||
options:
|
||||
- "Мягкий"
|
||||
- "Обычный"
|
||||
- "Крепкий"
|
||||
- "Молотый"
|
||||
initial_option: "Обычный"
|
||||
optimistic: true
|
||||
|
||||
- platform: template
|
||||
name: "Чашки"
|
||||
id: coffee_cups
|
||||
options:
|
||||
- "1"
|
||||
- "2"
|
||||
- "3"
|
||||
- "4"
|
||||
initial_option: "1"
|
||||
optimistic: true
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
name: "Объем кофе (мл)"
|
||||
id: coffee_volume
|
||||
min_value: 20
|
||||
max_value: 250
|
||||
step: 10
|
||||
initial_value: 100
|
||||
unit_of_measurement: "ml"
|
||||
optimistic: true
|
||||
|
||||
- platform: template
|
||||
name: "Объем молока (мл)"
|
||||
id: milk_volume
|
||||
min_value: 0
|
||||
max_value: 250
|
||||
step: 10
|
||||
initial_value: 0
|
||||
unit_of_measurement: "ml"
|
||||
optimistic: true
|
||||
|
||||
#Тестовый стенд: произвольный hex-пакет(ы) для отправки в материнскую плату.
|
||||
#Можно указывать несколько пакетов через разделитель ";".
|
||||
text:
|
||||
- platform: template
|
||||
name: "Test Hex"
|
||||
id: test_hex
|
||||
mode: TEXT
|
||||
optimistic: true
|
||||
max_length: 255
|
||||
initial_value: "AA AA AA FE 00 00 C8 87 1B 40 55"
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "SEND Test"
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
{
|
||||
std::string str = id(test_hex).state;
|
||||
std::vector<std::string> pkts;
|
||||
size_t pos = 0;
|
||||
while (pos <= str.size()) {
|
||||
size_t sep = str.find(';', pos);
|
||||
if (sep == std::string::npos) sep = str.size();
|
||||
std::string part = str.substr(pos, sep - pos);
|
||||
while (!part.empty() && std::isspace(part.front())) part.erase(part.begin());
|
||||
while (!part.empty() && std::isspace(part.back())) part.pop_back();
|
||||
if (!part.empty()) pkts.push_back(part);
|
||||
pos = sep + 1;
|
||||
}
|
||||
id(saeco_series_6000_component)->send_packets_to_mainboard(pkts, 50);
|
||||
}
|
||||
- platform: template
|
||||
name: "SEND Test RAW"
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(saeco_series_6000_component)->send_raw_to_mainboard(id(test_hex).state, 300);
|
||||
- platform: template
|
||||
name: "Включение (FE 00 01)"
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(saeco_series_6000_component)->send_packets_to_mainboard(
|
||||
std::vector<std::string>{
|
||||
"AA AA AA FE 00 01 5E B7 1C 37 55"
|
||||
}, 50);
|
||||
- platform: template
|
||||
name: "Американо"
|
||||
on_press:
|
||||
@@ -184,6 +289,29 @@ button:
|
||||
"AA AA AA 90 0F 0A 00 02 00 03 02 00 B4 00 00 00 67 48 E4 4B 55",
|
||||
"AA AA AA 91 10 01 03 56 9A 8C B8 55"
|
||||
}, 50);
|
||||
- platform: template
|
||||
name: "Выключение"
|
||||
on_press:
|
||||
then:
|
||||
- lambda: |-
|
||||
id(saeco_series_6000_component)->send_packets_to_mainboard(
|
||||
std::vector<std::string>{
|
||||
"AA AA AA FE 00 00 C8 87 1B 40 55"
|
||||
}, 50);
|
||||
- platform: template
|
||||
name: "Приготовить напиток"
|
||||
icon: mdi:coffee
|
||||
on_press:
|
||||
- lambda: |-
|
||||
{
|
||||
uint8_t type = id(coffee_type).index_of(id(coffee_type).state).value_or(0); // 0..6
|
||||
uint8_t bean = id(coffee_strength).index_of(id(coffee_strength).state).value_or(0); // 0..3
|
||||
uint8_t cups = id(coffee_cups).index_of(id(coffee_cups).state).value_or(0) + 1; // 1..4
|
||||
uint16_t vol = (uint16_t) id(coffee_volume).state;
|
||||
uint16_t milk = (uint16_t) id(milk_volume).state;
|
||||
id(saeco_series_6000_component)->coffee_build(type, bean, cups, vol, milk);
|
||||
}
|
||||
|
||||
|
||||
#[20:45:34][I][saeco_series_6000:079]: Packet from Display: AA AA AA 93 0A 01 01 57 15 3A ED 55
|
||||
#[20:45:34][I][saeco_series_6000:079]: Packet from Display: AA AA AA 90 0B 0A 05 03 00 02 00 00 64 00 00 00 39 BF 5B 74 55
|
||||
|
||||
Reference in New Issue
Block a user