Public Access
fix: light and streamline usb_hid config across files
Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
3 files changed
+61
-18
No files matched your search
@@ -0,0 +1,35 @@
|
|||||||
|
substitutions:
|
||||||
|
name: s3-boot-test
|
||||||
|
friendly_name: s3 boot test
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: ${name}
|
||||||
|
friendly_name: ${friendly_name}
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-s3-devkitc-1
|
||||||
|
flash_size: 16MB
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
level: DEBUG
|
||||||
|
baud_rate: 115200
|
||||||
|
hardware_uart: UART0
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: !secret ota_password
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "${friendly_name} Fallback"
|
||||||
|
password: !secret ap_password
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
web_server:
|
||||||
+13
-8
@@ -19,6 +19,8 @@ logger:
|
|||||||
level: VERBOSE
|
level: VERBOSE
|
||||||
logs:
|
logs:
|
||||||
ups_hid: DEBUG
|
ups_hid: DEBUG
|
||||||
|
baud_rate: 115200
|
||||||
|
hardware_uart: UART0
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
api:
|
api:
|
||||||
@@ -54,10 +56,10 @@ time:
|
|||||||
# RGB LED for UPS status indication (GPIO38 on ESP32-S3-DevKitC-1)
|
# RGB LED for UPS status indication (GPIO38 on ESP32-S3-DevKitC-1)
|
||||||
light:
|
light:
|
||||||
- platform: esp32_rmt_led_strip
|
- platform: esp32_rmt_led_strip
|
||||||
rgb_order: GRB
|
chipset: WS2812
|
||||||
pin: GPIO38
|
pin: GPIO48
|
||||||
num_leds: 1
|
num_leds: 1
|
||||||
chipset: ws2812
|
rgb_order: GRB
|
||||||
name: "UPS Status LED"
|
name: "UPS Status LED"
|
||||||
id: ups_status_led
|
id: ups_status_led
|
||||||
restore_mode: ALWAYS_OFF
|
restore_mode: ALWAYS_OFF
|
||||||
@@ -76,7 +78,7 @@ light:
|
|||||||
- pulse:
|
- pulse:
|
||||||
name: "Battery Pulse"
|
name: "Battery Pulse"
|
||||||
transition_length: 1s
|
transition_length: 1s
|
||||||
update_interval: 1s
|
update_interval: 2s
|
||||||
min_brightness: 20%
|
min_brightness: 20%
|
||||||
max_brightness: 80%
|
max_brightness: 80%
|
||||||
- pulse:
|
- pulse:
|
||||||
@@ -104,15 +106,18 @@ ups_hid:
|
|||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
|
|
||||||
# Hardware Configuration
|
# Hardware Configuration
|
||||||
usb_vendor_id: 0x051d # APC vendor ID (0x051d), CyberPower (0x0764)
|
#usb_vendor_id: 0x051d # APC vendor ID (0x051d)
|
||||||
usb_product_id: 0x0002 # APC Back-UPS ES series
|
#usb_product_id: 0x0002 # APC Back-UPS ES series
|
||||||
|
|
||||||
|
# usb_vendor_id: 0x0764 # CyberPower (0x0764)
|
||||||
|
# usb_product_id: 0x0501 # CP1500 AVR UPS
|
||||||
|
|
||||||
# Protocol Configuration
|
# Protocol Configuration
|
||||||
auto_detect_protocol: true
|
auto_detect_protocol: true
|
||||||
protocol_timeout: 15s
|
protocol_timeout: 15s
|
||||||
|
|
||||||
# Development/Testing Configuration
|
# Development/Testing Configuration
|
||||||
simulation_mode: true # Set to false for production with real hardware
|
simulation_mode: false # Set to false for production with real hardware
|
||||||
|
|
||||||
# Numeric Sensors
|
# Numeric Sensors
|
||||||
sensor:
|
sensor:
|
||||||
@@ -352,7 +357,7 @@ text_sensor:
|
|||||||
|
|
||||||
# Advanced LED Status Control with Priorities
|
# Advanced LED Status Control with Priorities
|
||||||
interval:
|
interval:
|
||||||
- interval: 2s
|
- interval: 3s
|
||||||
then:
|
then:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
// Advanced UPS status LED control with priorities
|
// Advanced UPS status LED control with priorities
|
||||||
|
|||||||
+13
-10
@@ -5,13 +5,12 @@ esphome:
|
|||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
board: esp32-s3-devkitc-1
|
board: esp32-s3-devkitc-1
|
||||||
framework:
|
|
||||||
type: arduino
|
|
||||||
version: recommended
|
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
level: DEBUG
|
level: DEBUG
|
||||||
|
baud_rate: 115200
|
||||||
|
hardware_uart: UART0
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
api:
|
api:
|
||||||
@@ -35,11 +34,10 @@ web_server:
|
|||||||
# RGB LED for status indication
|
# RGB LED for status indication
|
||||||
light:
|
light:
|
||||||
- platform: esp32_rmt_led_strip
|
- platform: esp32_rmt_led_strip
|
||||||
rgb_order: GRB
|
chipset: WS2812
|
||||||
pin: GPIO38
|
pin: GPIO48
|
||||||
num_leds: 1
|
num_leds: 1
|
||||||
# rmt_channel: 0 @INFO: esp32_rmt_led_strip does manage the rmt channel
|
rgb_order: GRB
|
||||||
chipset: ws2812
|
|
||||||
name: "UPS Status LED"
|
name: "UPS Status LED"
|
||||||
id: status_led
|
id: status_led
|
||||||
effects:
|
effects:
|
||||||
@@ -54,7 +52,6 @@ light:
|
|||||||
duration: 250ms
|
duration: 250ms
|
||||||
- state: false
|
- state: false
|
||||||
duration: 250ms
|
duration: 250ms
|
||||||
|
|
||||||
# External components
|
# External components
|
||||||
external_components:
|
external_components:
|
||||||
- source:
|
- source:
|
||||||
@@ -66,8 +63,14 @@ ups_hid:
|
|||||||
id: ups_monitor
|
id: ups_monitor
|
||||||
simulation_mode: true # Set to false for production
|
simulation_mode: true # Set to false for production
|
||||||
update_interval: 5s
|
update_interval: 5s
|
||||||
usb_vendor_id: 0x051d # APC vendor ID
|
|
||||||
usb_product_id: 0x0002 # Back-UPS ES series
|
# Hardware Configuration
|
||||||
|
usb_vendor_id: 0x051d # APC vendor ID (0x051d)
|
||||||
|
usb_product_id: 0x0002 # APC Back-UPS ES series
|
||||||
|
|
||||||
|
# usb_vendor_id: 0x0764 # CyberPower (0x0764)
|
||||||
|
# usb_product_id: 0x0501 # CP1500 AVR UPS
|
||||||
|
|
||||||
protocol_timeout: 10s
|
protocol_timeout: 10s
|
||||||
auto_detect_protocol: true
|
auto_detect_protocol: true
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user