Hello, it’s likely the new OTA configuration of ESPHome is causing the problem, see this link.
That is, the OTA section should look like this:
ota:
- platform: esphome
I’ll send the working nice_yaml file from home later, because I made some changes compared to the original. In fact, if I see correctly, the current nice yaml already includes this change, and its content has been completely renewed as well.
Well, this is the YAML I’m using in the current control setup:
# Vezérlő csomagokat küld UART-on keresztül a Nice BUS T4-nek
# Teszt áramkör: ESP-12E
#
# 1. teszt: 2024.03.13 - apró javítások
# 2. teszt: 2024.03.19 - hibátlan!
substitutions:
device_name: "nice-bust4-uart"
esphome:
name: ${device_name}
platform: ESP8266
board: esp12e
external_components:
- source:
type: git
url: https://github.com/pruwait/Nice_BusT4
# Engedélyezzük a hibakeresést, hogy megtaláljuk az újraindítás okát a naplóban
debug:
# Naplózás engedélyezése
logger:
level: DEBUG
# level: VERBOSE
baud_rate: 0
# Home Assistant API engedélyezése
api:
reboot_timeout: 0s # Egyébként újraindul, ha leválasztják a hassio-ról
services:
# Hexadecimális parancsok küldése
- service: raw_command
variables:
raw_cmd: string
then:
lambda: |-
my_nice_cover -> NiceBusT4::send_raw_cmd(raw_cmd);
- service: send_inf_command
variables:
to_addr: string
whose: string
command: string
type_command: string
next_data: string
data_on: bool
data_command: string
then:
lambda: |-
my_nice_cover -> NiceBusT4::send_inf_cmd(to_addr, whose, command, type_command, next_data, data_on, data_command);
# Kapuhossz felismerés
- service: gate_length_recognition
then:
lambda: |-
my_nice_cover -> NiceBusT4::set_mcu("0b","01");
# BlueBus eszköz felismerés
- service: devices_recognition
then:
lambda: |-
my_nice_cover -> NiceBusT4::set_mcu("0a","01");
# std::vector < uint8_t > v_to_addr = my_nice_cover -> NiceBusT4::raw_cmd_prepare (to_addr);
# std::vector < uint8_t > v_whose = my_nice_cover -> NiceBusT4::raw_cmd_prepare (whose);
# std::vector < uint8_t > v_command = my_nice_cover -> NiceBusT4::raw_cmd_prepare (command);
# std::vector < uint8_t > v_type_command = my_nice_cover -> NiceBusT4::raw_cmd_prepare (type_command);
# std::vector < uint8_t > v_data_command = my_nice_cover -> NiceBusT4::raw_cmd_prepare (data_command);
# if (data_on) {
# my_nice_cover -> NiceBusT4::tx_buffer_.push(my_nice_cover -> NiceBusT4::gen_inf_cmd(v_to_addr[0], v_to_addr[1], v_whose[0], v_command[0], v_type_command[0], v_data_command, v_data_command.size()));
# } else {
# my_nice_cover -> NiceBusT4::tx_buffer_.push(my_nice_cover -> NiceBusT4::gen_inf_cmd(v_to_addr[0], v_to_addr[1], v_whose[0], v_command[0], v_type_command[0]));
# }
ota:
- platform: esphome
# Beállítja az ESP-12E állapotjelző LED-jét
status_led:
pin:
number: GPIO5
inverted: true
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: HIGH
fast_connect: true # Rejtett SSID miatt
# Engedélyezzük a tartalék hotspotot (captive portal) arra az esetre, ha a wifi kapcsolattal probléma lenne
ap:
ssid: "${device_name} Hotspot"
password: !secret appw
captive_portal:
# Webszerver engedélyezése (letiltható)
web_server:
port: 80
# Parancsok küldésére szolgáló gombok a HA-ban
button:
- platform: template
name: Lépésről lépésre
id: sbs
on_press:
lambda: |-
my_nice_cover -> NiceBusT4::send_cmd(bus_t4::SBS);
# my_nice_cover -> NiceBusT4::send_raw_cmd("55 0c 00 ff 00 66 01 05 9D 01 82 01 64 E6 0c"); # Közvetlen parancs
- platform: template
name: Részleges nyitás 1
id: p_opn1
on_press:
lambda: |-
my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN1);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::STOP);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::OPEN);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::CLOSE);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN2);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN3);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN4);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN5);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::P_OPN6);
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::UNLK_OPN); # Разблокировать и открыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::CLS_LOCK); # Закрыть и блокировать
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::UNLCK_CLS); # Разблокировать и Закрыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::LOCK); # Блокировать
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::UNLOCK); # Разблокировать
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::HOST_SBS); # Ведущий SBS
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::HOST_OPN); # Ведущий открыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::HOST_CLS); # Ведущий закрыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::SLAVE_SBS); # Ведомый SBS
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::SLAVE_OPN); # Ведомый открыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::SLAVE_CLS); # Ведомый закрыть
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::AUTO_ON); # Автооткрывание активно
# my_nice_cover -> NiceBusT4::send_cmd(bus_t4::AUTO_OFF); # Автооткрывание неактивно
cover:
- platform: bus_t4
name: "Nice FILO400"
id: my_nice_cover
device_class: gate
I apologize for the mixed language, but the main point is clear:
The changes can essentially be seen in two places: around the middle in the OTA section and at the very end in the last COVER section.
In the attached image, everything appears inactive, but it shows up on the interface like this and it works.
