From 60391c4fb817a825e71d49a15b5a24b158c5d4d5 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 21 Oct 2025 11:24:54 +0200 Subject: add friendly_name everywhere. diable unused GPIO to save power --- esphome/config/3dprinter-led.yaml | 62 ++++++++++++++++++++++-- esphome/config/bedlight.yaml | 81 ++++++++++++++++++++++++------- esphome/config/couchlight.yaml | 90 +++++++++++++++++++++++++---------- esphome/config/hoblight.yaml | 86 ++++++++++++++++++++++++--------- esphome/config/office-pc-control.yaml | 43 +++++++++++++---- esphome/config/tvlight.yaml | 71 ++++++++++++++++++++++----- 6 files changed, 346 insertions(+), 87 deletions(-) diff --git a/esphome/config/3dprinter-led.yaml b/esphome/config/3dprinter-led.yaml index c85f222..16cc43d 100644 --- a/esphome/config/3dprinter-led.yaml +++ b/esphome/config/3dprinter-led.yaml @@ -1,6 +1,10 @@ -esphome: - name: 3dprinter-led +substitutions: + device_name: 3dprinter-led friendly_name: "3D Printer LED" + +esphome: + name: ${device_name} + friendly_name: ${friendly_name} area: Office on_boot: priority: -100 @@ -41,7 +45,7 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Couchlight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: @@ -59,3 +63,55 @@ light: type: esp8266_uart bus: 1 default_transition_length: 300ms + +output: + - platform: gpio + id: unused_gpio0 + pin: + number: D3 # GPIO0 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio1 + pin: + number: TX # GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: RX # GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio4 + pin: + number: D2 # GPIO4 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio5 + pin: + number: D1 # GPIO5 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio12 + pin: + number: D6 # GPIO12 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: D7 # GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio14 + pin: + number: D5 # GPIO14 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: D8 # GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: D0 # GPIO16 + mode: INPUT_PULLDOWN diff --git a/esphome/config/bedlight.yaml b/esphome/config/bedlight.yaml index 2913e99..ac83f5d 100644 --- a/esphome/config/bedlight.yaml +++ b/esphome/config/bedlight.yaml @@ -1,5 +1,11 @@ +substitutions: + device_name: bedlight + friendly_name: "Bed Light" + esphome: - name: bedlight + name: ${device_name} + friendly_name: ${friendly_name} + area: Bed Room # light default values on_boot: @@ -46,7 +52,7 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Bedlight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: @@ -63,13 +69,13 @@ light: restore_mode: RESTORE_DEFAULT_OFF output: - - id: gpio_r - platform: gpio - pin: GPIO12 + #- id: gpio_r + # platform: gpio + # pin: GPIO12 - - id: gpio_g - platform: gpio - pin: GPIO15 + #- id: gpio_g + # platform: gpio + # pin: GPIO15 - id: pwm_b platform: esp8266_pwm @@ -107,17 +113,58 @@ output: return 0.0002; return state; - - id: gpio0 - platform: gpio - pin: GPIO0 + #- id: gpio0 + # platform: gpio + # pin: GPIO0 - - id: gpio_txd - platform: gpio - pin: GPIO1 + #- id: gpio_txd + # platform: gpio + # pin: GPIO1 - - id: gpio_rxd - platform: gpio - pin: GPIO3 + #- id: gpio_rxd + # platform: gpio + # pin: GPIO3 + + - platform: gpio + id: unused_gpio0 + pin: + number: GPIO0 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio1 + pin: + number: GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio12 + pin: + number: GPIO12 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: GPIO16 + mode: INPUT_PULLDOWN globals: - id: g_dim_level diff --git a/esphome/config/couchlight.yaml b/esphome/config/couchlight.yaml index cfc2f00..4579dc9 100644 --- a/esphome/config/couchlight.yaml +++ b/esphome/config/couchlight.yaml @@ -1,5 +1,10 @@ +substitutions: + device_name: couchlight + friendly_name: "Couch Light" + esphome: - name: couchlight + name: ${device_name} + friendly_name: ${friendly_name} on_boot: then: - lock.template.publish: @@ -32,30 +37,67 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Couchlight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - - id: light1 - platform: binary - name: "Couch 1" + - platform: binary + id: light1 + name: "Spot 1" output: relay_light1 - - id: light2 - platform: binary - name: "Couch 2" + - platform: binary + id: light2 + name: "Spot 2" output: relay_light2 output: - - id: relay_light1 - platform: gpio - pin: D1 + - platform: gpio + id: relay_light1 + pin: D1 # GPIO5 + + - platform: gpio + id: relay_light2 + pin: D2 # GPIO4 - - id: relay_light2 - platform: gpio - pin: D2 + # UNUSED GPIO + - platform: gpio + id: unused_gpio0 + pin: + number: D3 # GPIO0 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio1 + pin: + number: TX # GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: D4 # GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: RX # GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio14 + pin: + number: D5 # GPIO14 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: D8 # GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: D0 # GPIO16 + mode: INPUT_PULLDOWN script: - id: reset_child_lock @@ -67,11 +109,11 @@ script: state: UNLOCKED binary_sensor: - - id: button_light1 - name: "Couch 1 PushButton" - platform: gpio + - platform: gpio + id: button_light1 + name: "Spot 1 PushButton" pin: - number: D7 + number: D7 # GPIO13 mode: INPUT_PULLUP filters: - invert @@ -85,11 +127,11 @@ binary_sensor: - light.toggle: light1 internal: true # hide from UI - - id: button_light2 - name: "Couch 2 PushButton" - platform: gpio + - platform: gpio + id: button_light2 + name: "Spot 2 PushButton" pin: - number: D6 + number: D6 # GPIO12 mode: INPUT_PULLUP filters: - invert @@ -104,8 +146,8 @@ binary_sensor: internal: true # hide from UI lock: - - id: child_lock - platform: template + - platform: template + id: child_lock name: "Child Lock" optimistic: true on_lock: diff --git a/esphome/config/hoblight.yaml b/esphome/config/hoblight.yaml index e36bf31..cf2d7e5 100644 --- a/esphome/config/hoblight.yaml +++ b/esphome/config/hoblight.yaml @@ -1,5 +1,16 @@ +substitutions: + device_name: hoblight + friendly_name: "Hob Light" + esphome: - name: hoblight + name: ${device_name} + friendly_name: ${friendly_name} + + devices: + - id: hob_dimmer + name: "Hob Dimmer" + - id: dining_table + name: "Dining Table" esp8266: board: esp01_1m @@ -33,24 +44,24 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Hoblight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - - id: dining_table - platform: cwww - name: "Dining Table" + - platform: cwww + device_id: dining_table + name: None cold_white: pwm_w warm_white: pwm_b cold_white_color_temperature: 6536 K warm_white_color_temperature: 2000 K restore_mode: RESTORE_DEFAULT_OFF - - id: hob_dimmer - platform: color_temperature - name: "Hob Dimmer" + - platform: color_temperature + device_id: hob_dimmer + name: None color_temperature: pwm_rxd brightness: pwm_gpio0 cold_white_color_temperature: 6536 K @@ -58,28 +69,28 @@ light: restore_mode: RESTORE_DEFAULT_OFF output: - #- id: pwm_r - # platform: esp8266_pwm + #- platform: esp8266_pwm + # id: pwm_r # pin: GPIO12 # frequency: 1000 Hz - #- id: pwm_g - # platform: esp8266_pwm + #- platform: esp8266_pwm + # id: pwm_g # pin: GPIO15 # frequency: 1000 Hz - - id: pwm_b - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_b pin: GPIO14 frequency: 1000 Hz - - id: pwm_w - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_w pin: GPIO4 frequency: 1000 Hz - - id: pwm_gpio0 - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_gpio0 pin: GPIO0 frequency: 2000 Hz min_power: 0.05 @@ -89,12 +100,43 @@ output: # pin: GPIO1 # frequency: 2000 Hz - - id: pwm_rxd - platform: esp8266_pwm + - platform: esp8266_pwm + id: pwm_rxd pin: GPIO3 frequency: 2000 Hz + - platform: gpio + id: unused_gpio1 + pin: + number: GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio12 + pin: + number: GPIO12 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: GPIO16 + mode: INPUT_PULLDOWN + binary_sensor: - - id: user_button - platform: gpio + - platform: gpio + id: user_button pin: GPIO5 diff --git a/esphome/config/office-pc-control.yaml b/esphome/config/office-pc-control.yaml index 92d78d6..30033bb 100644 --- a/esphome/config/office-pc-control.yaml +++ b/esphome/config/office-pc-control.yaml @@ -1,5 +1,11 @@ +substitutions: + device_name: office-pc-control + friendly_name: "Office PC Control" + + esphome: - name: office-pc-control + name: ${device_name} + friendly_name: ${friendly_name} area: Office on_boot: priority: -100 @@ -40,7 +46,7 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Couchlight Fallback Hotspot" + ssid: "${device_name} Hotspot" password: !secret wifi_ap_password captive_portal: @@ -49,15 +55,36 @@ output: - platform: gpio id: pc_reset pin: - number: D2 + number: D2 # GPIO4 inverted: true # pc power/reset pins are GND activated - platform: gpio id: pc_power_onoff pin: - number: D3 + number: D3 # GPIO0 inverted: true # pc power/reset pins are GND activated + - platform: gpio + id: unused_gpio1 + pin: + number: TX # GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: RX # GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: D7 # GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: D0 # GPIO16 + mode: INPUT_PULLDOWN + button: - platform: output name: "Reset" @@ -103,7 +130,7 @@ binary_sensor: name: "Touch button" id: touch_button pin: - number: D8 + number: D8 # GPIO15 mode: INPUT internal: true filters: @@ -116,7 +143,7 @@ binary_sensor: name: "Power button" id: power_button pin: - number: D5 + number: D5 # GPIO14 mode: INPUT_PULLUP inverted: true internal: true @@ -142,7 +169,7 @@ binary_sensor: name: "Reset button" id: reset_button pin: - number: D6 + number: D6 # GPIO12 mode: INPUT_PULLUP inverted: true internal: true @@ -174,7 +201,7 @@ binary_sensor: name: "Powered" icon: "mdi:desktop-tower" pin: - number: D1 + number: D1 # GPIO5 mode: INPUT_PULLUP filters: - delayed_on: 100ms diff --git a/esphome/config/tvlight.yaml b/esphome/config/tvlight.yaml index 9fa59f1..19e8c1c 100644 --- a/esphome/config/tvlight.yaml +++ b/esphome/config/tvlight.yaml @@ -1,5 +1,10 @@ +substitutions: + device_name: tvlight + friendly_name: "TV Light" + esphome: - name: tvlight + name: ${device_name} + friendly_name: ${friendly_name} esp8266: board: d1_mini @@ -27,42 +32,82 @@ wifi: # Enable fallback hotspot (captive portal) in case wifi connection fails ap: - ssid: "Tvlight Fallback Hotspot" + ssid: "${device_name} Fallback Hotspot" password: !secret wifi_ap_password captive_portal: light: - - id: tvlight - platform: monochromatic + - platform: monochromatic name: "TV" output: dimmer_tvlight default_transition_length: 1.5s gamma_correct: 0 restore_mode: RESTORE_AND_OFF - - id: wled - platform: binary + - platform: binary name: "WLED" + icon: "mdi:led-strip-variant" output: relay_wled restore_mode: ALWAYS_OFF output: - - id: dimmer_tvlight - platform: esp8266_pwm - pin: D5 + - platform: esp8266_pwm + id: dimmer_tvlight + pin: D5 # GPIO14 frequency: 1000 Hz inverted: true # lower 22% are not useable. use max_power because of inverted max_power: 0.78 power_supply: relay_tvlight - - id: relay_wled - platform: gpio - pin: D1 + - platform: gpio + id: relay_wled + pin: D1 # GPIO5 + + - platform: gpio + id: unused_gpio0 + pin: + number: D3 # GPIO0 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio1 + pin: + number: TX # GPIO1 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio2 + pin: + number: D4 # GPIO2 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio3 + pin: + number: RX # GPIO3 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio12 + pin: + number: D6 # GPIO12 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio13 + pin: + number: D7 # GPIO13 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio15 + pin: + number: D8 # GPIO15 + mode: INPUT_PULLUP + - platform: gpio + id: unused_gpio16 + pin: + number: D0 # GPIO16 + mode: INPUT_PULLDOWN power_supply: - id: relay_tvlight - pin: D2 + pin: D2 # GPIO4 #enable_time: 3s keep_on_time: 20ms -- cgit v1.2.3