http_request runs on the loop task, which has a 4s budget before the 5s task WDT panics. A dropped connect() blocks for 4.5s (the ESPHome default timeout) and a filtered port 53 blocks for a fixed 7s, which timeout does not cover. - timeout 3s and watchdog_timeout 60s cover the two blocking paths - a failure counter stops the service after 3 network-level failures, instead of freezing the loop 14s every 6h forever - the POST is now skipped when the GET failed Reproduced and measured on OPNsense. See Design_decisions.md.
74 lines
2.6 KiB
YAML
74 lines
2.6 KiB
YAML
# Updated : 2026.08.21
|
|
# Version : 1.1.7
|
|
# GitHub : https://github.com/Sleeper85/esphome-yambms
|
|
|
|
# YamBMS ( Yet another multi-BMS Merging Solution )
|
|
|
|
# This YAML is free software: you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation, either version 3
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
# See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
|
|
|
|
# +---------------------------------------------------------------+
|
|
# | These are example codes that you can copy into your main YAML |
|
|
# +---------------------------------------------------------------+
|
|
|
|
switch:
|
|
# Force Float switch
|
|
- platform: template
|
|
id: yambms${yambms_id}_switch_force_float
|
|
device_id: yambms_yambms${yambms_id}
|
|
name: "Force Float"
|
|
restore_mode: RESTORE_DEFAULT_OFF
|
|
optimistic: true
|
|
entity_category: config
|
|
turn_on_action:
|
|
- globals.set:
|
|
id: yambms${yambms_id}_var_force_float
|
|
value: 'true'
|
|
turn_off_action:
|
|
- globals.set:
|
|
id: yambms${yambms_id}_var_force_float
|
|
value: 'false'
|
|
# Update service switch
|
|
- platform: template
|
|
device_id: yambms_yambms${yambms_id}
|
|
name: "Update service"
|
|
restore_mode: RESTORE_DEFAULT_ON
|
|
optimistic: true
|
|
entity_category: config
|
|
turn_on_action:
|
|
- globals.set:
|
|
id: yambms${yambms_id}_var_service
|
|
value: 'true'
|
|
# Rearm the circuit breaker, so the user can retry after fixing the network
|
|
- globals.set:
|
|
id: yambms${yambms_id}_var_service_failures
|
|
value: '0'
|
|
turn_off_action:
|
|
- globals.set:
|
|
id: yambms${yambms_id}_var_service
|
|
value: 'false'
|
|
|
|
esphome:
|
|
on_boot:
|
|
# Priority 550 : runs right after the YamBMS chemistry block (600)
|
|
- priority: 550.0
|
|
then:
|
|
- lambda: |-
|
|
// Set min/max Float slider
|
|
id(yambms${yambms_id}_float_voltage).traits.set_min_value(${yambms_cell_count} * 3.125);
|
|
id(yambms${yambms_id}_float_voltage).traits.set_max_value(${yambms_cell_count} * 3.375);
|
|
|
|
// Set min/max Charger Offset Voltage slider
|
|
id(yambms${yambms_id}_charger_offset_v).traits.set_min_value(-3.0);
|
|
id(yambms${yambms_id}_charger_offset_v).traits.set_max_value(3.0);
|