Public Access
110 lines
4.0 KiB
YAML
110 lines
4.0 KiB
YAML
# Example: CyberPower CP1500EPFCLCD Configuration
|
|
# Complete production configuration for CyberPower UPS with European defaults
|
|
# Copy and customize this file for your CyberPower device
|
|
|
|
substitutions:
|
|
name: "rack-ups-monitor"
|
|
friendly_name: "Rack CyberPower UPS"
|
|
simulation_mode: "false" # Set to "true" for testing without hardware
|
|
|
|
# Override timezone if needed (defaults to Europe/Warsaw from regional template)
|
|
timezone: "Europe/Vienna" # Austrian timezone
|
|
|
|
# My QNAP NAS acts as a slave and forces these settings
|
|
nut_password: "" # disable nutpassword
|
|
nut_ups_name: "qnapups" # Custom name for NUT protocol (different from component ID)
|
|
|
|
esphome:
|
|
name: "${name}"
|
|
friendly_name: "${friendly_name}"
|
|
comment: "CyberPower CP1500EPFCLCD Monitor with European defaults"
|
|
|
|
# Use modular configuration packages
|
|
packages:
|
|
# Regional defaults (European voltage/frequency standards)
|
|
regional_defaults: !include ../regional/european_base.yaml
|
|
|
|
# OPTIONAL: Entity grouping (improves web interface organization)
|
|
# Uncomment to enable organized entity groups in ESPHome web interface
|
|
entity_groups: !include ../entity_groups.yaml
|
|
|
|
# Core functionality with LED status indication
|
|
base_with_led: !include ../base_ups_with_led.yaml
|
|
|
|
# Choose EITHER grouped OR standard sensor packages (not both):
|
|
# Standard packages (current default):
|
|
essential: !include ../essential_sensors.yaml
|
|
extended: !include ../extended_sensors.yaml
|
|
timers: !include ../timer_sensors.yaml
|
|
controls: !include ../ups_controls.yaml
|
|
|
|
# OR grouped packages (better organization):
|
|
# essential_grouped: !include ../essential_sensors_grouped.yaml
|
|
# extended_grouped: !include ../extended_sensors_grouped.yaml
|
|
# timers_grouped: !include ../timer_sensors_grouped.yaml
|
|
# controls_grouped: !include ../ups_controls_grouped.yaml
|
|
|
|
# Delay configuration (Shutdown/Start/Reboot timers)
|
|
delay_config: !include ../delay_config.yaml
|
|
|
|
# CyberPower-specific optimizations
|
|
cyberpower_device: !include ../device_types/cyberpower_cp1500.yaml
|
|
|
|
# NUT Server (Network UPS Tools) - uncomment to enable TCP server
|
|
# Exposes UPS data via standard NUT protocol for monitoring tools
|
|
# Standard package:
|
|
nut_server: !include ../nut_server.yaml
|
|
# OR grouped package (with NUT Server group in web interface):
|
|
# nut_server_grouped: !include ../nut_server_grouped.yaml
|
|
|
|
# Optional: Home Assistant API (uncomment to enable)
|
|
# api:
|
|
# encryption:
|
|
# key: "your_32_character_encryption_key_here=="
|
|
|
|
# CyberPower-specific automation examples
|
|
script:
|
|
- id: battery_threshold_alert
|
|
then:
|
|
- logger.log:
|
|
format: "BATTERY THRESHOLD ALERT - Current: %.1f%%, Low Threshold: %.1f%%, Runtime Low: %.1f min"
|
|
args:
|
|
- "id(battery_level).state"
|
|
- "id(battery_charge_low).state"
|
|
- "id(battery_runtime_low).state"
|
|
level: WARN
|
|
|
|
- id: advanced_power_analysis
|
|
then:
|
|
- logger.log:
|
|
format: "POWER ANALYSIS - Load: %.1f%% (%.0fW/%.0fW), Input: %.1fV (%.0fV nominal), Battery: %.1fV/%.0fV"
|
|
args:
|
|
- "id(load_percentage).state"
|
|
- "id(ups_load_power).state"
|
|
- "id(ups_realpower_nominal).state"
|
|
- "id(input_voltage).state"
|
|
- "id(input_voltage_nominal).state"
|
|
- "id(battery_voltage).state"
|
|
- "id(battery_voltage_nominal).state"
|
|
level: INFO
|
|
|
|
# Enhanced monitoring with CyberPower's rich data
|
|
interval:
|
|
- interval: 300s # Every 5 minutes
|
|
then:
|
|
- script.execute: advanced_power_analysis
|
|
|
|
# Smart threshold monitoring
|
|
binary_sensor:
|
|
- platform: template
|
|
name: "Battery Below Custom Threshold"
|
|
id: battery_custom_threshold
|
|
lambda: |-
|
|
// Trigger alert when battery drops below configured low threshold
|
|
if (!std::isnan(id(battery_level).state) && !std::isnan(id(battery_charge_low).state)) {
|
|
return id(battery_level).state <= id(battery_charge_low).state;
|
|
}
|
|
return false;
|
|
on_press:
|
|
then:
|
|
- script.execute: battery_threshold_alert |