From 9cab8bf69271735243e593c318c3b288860fd4d6 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 10 Nov 2021 10:07:19 +0100 Subject: add esphome stuff --- esphome/config/.gitignore | 10 +++++ esphome/config/couchlight.yaml | 76 +++++++++++++++++++++++++++++++++++++ esphome/config/hoblight.yaml | 85 ++++++++++++++++++++++++++++++++++++++++++ esphome/config/tvlight.yaml | 61 ++++++++++++++++++++++++++++++ 4 files changed, 232 insertions(+) create mode 100644 esphome/config/.gitignore create mode 100644 esphome/config/couchlight.yaml create mode 100644 esphome/config/hoblight.yaml create mode 100644 esphome/config/tvlight.yaml (limited to 'esphome') diff --git a/esphome/config/.gitignore b/esphome/config/.gitignore new file mode 100644 index 0000000..0bbf89c --- /dev/null +++ b/esphome/config/.gitignore @@ -0,0 +1,10 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +**/.pioenvs/ +**/.piolibdeps/ +**/lib/ +**/src/ +**/platformio.ini +/secrets.yaml diff --git a/esphome/config/couchlight.yaml b/esphome/config/couchlight.yaml new file mode 100644 index 0000000..08affc1 --- /dev/null +++ b/esphome/config/couchlight.yaml @@ -0,0 +1,76 @@ +esphome: + name: couchlight + platform: ESP8266 + board: d1_mini + +# Enable logging +logger: + +# Enable Home Assistant API +api: + password: !secret api_password + +# OTA +ota: + password: !secret ota_password + +# WiFi Credentials +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Couchlight Fallback Hotspot" + password: !secret wifi_ap_password + +captive_portal: + +light: + - id: light1 + platform: binary + name: "Couch 1" + output: relay_light1 + + - id: light2 + platform: binary + name: "Couch 2" + output: relay_light2 + +output: + - id: relay_light1 + platform: gpio + pin: D1 + + - id: relay_light2 + platform: gpio + pin: D2 + +binary_sensor: + - id: button_light1 + name: "Couch 1 PushButton" + platform: gpio + pin: + number: D5 + mode: INPUT_PULLUP + filters: + - invert + - delayed_on: 50ms + on_press: + then: + - light.toggle: light1 + internal: true # hide from UI + + - id: button_light2 + name: "Couch 2 PushButton" + platform: gpio + pin: + number: D6 + mode: INPUT_PULLUP + filters: + - invert + - delayed_on: 50ms + on_press: + then: + - light.toggle: light2 + internal: true # hide from UI diff --git a/esphome/config/hoblight.yaml b/esphome/config/hoblight.yaml new file mode 100644 index 0000000..31c4494 --- /dev/null +++ b/esphome/config/hoblight.yaml @@ -0,0 +1,85 @@ +esphome: + name: hoblight + platform: ESP8266 + board: esp01_1m + +# Enable logging +logger: + # make RXD / TXD available + baud_rate: 0 + +# Enable Home Assistant API +api: + password: !secret api_password + +# OTA +ota: + password: !secret ota_password + +# WiFi Credentials +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Hoblight Fallback Hotspot" + password: !secret wifi_ap_password + +captive_portal: + +light: + - platform: cwww + id: dining_table + name: "Dining Table" + cold_white: pwm_w + warm_white: pwm_b + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + - platform: color_temperature + name: "Hob" + color_temperature: pwm_rxd + brightness: pwm_gpio0 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + +output: + #- platform: esp8266_pwm + # pin: GPIO12 + # frequency: 1000 Hz + # id: pwm_r + + #- platform: esp8266_pwm + # pin: GPIO15 + # frequency: 1000 Hz + # id: pwm_g + + - platform: esp8266_pwm + pin: GPIO14 + frequency: 1000 Hz + id: pwm_b + + - platform: esp8266_pwm + pin: GPIO4 + frequency: 1000 Hz + id: pwm_w + + - platform: esp8266_pwm + pin: GPIO0 + frequency: 2000 Hz + id: pwm_gpio0 + + #- platform: esp8266_pwm + # pin: GPIO1 + # frequency: 2000 Hz + # id: pwm_txd + + - platform: esp8266_pwm + pin: GPIO3 + frequency: 2000 Hz + id: pwm_rxd + +binary_sensor: + - platform: gpio + pin: GPIO5 + id: light_0_touch diff --git a/esphome/config/tvlight.yaml b/esphome/config/tvlight.yaml new file mode 100644 index 0000000..b51f9d3 --- /dev/null +++ b/esphome/config/tvlight.yaml @@ -0,0 +1,61 @@ +esphome: + name: tvlight + platform: ESP8266 + board: d1_mini + +# Enable logging +logger: + +# Enable Home Assistant API +api: + password: !secret api_password + +# OTA +ota: + password: !secret ota_password + +# WiFi Credentials +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Tvlight Fallback Hotspot" + password: !secret wifi_ap_password + +captive_portal: + +light: + - id: tvlight + platform: monochromatic + name: "TV" + output: dimmer_tvlight + default_transition_length: 1.5s + gamma_correct: 0 + + - id: wled + platform: binary + name: "WLED" + output: relay_wled + +output: + - id: dimmer_tvlight + platform: esp8266_pwm + pin: D5 + 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 + +power_supply: + - id: relay_tvlight + pin: D2 + #enable_time: 3s + keep_on_time: 20ms + -- cgit v1.2.3