diff options
| author | manuel <manuel@mausz.at> | 2021-11-10 10:07:19 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2021-11-10 10:07:43 +0100 |
| commit | 9cab8bf69271735243e593c318c3b288860fd4d6 (patch) | |
| tree | 252f00a26d3d3f733004eeb3d69ac6cbf8397b33 /esphome | |
| parent | 812c9a230aabb45cb7cf6f8a2402c758ade079c3 (diff) | |
| download | arduino-9cab8bf69271735243e593c318c3b288860fd4d6.tar.gz arduino-9cab8bf69271735243e593c318c3b288860fd4d6.tar.bz2 arduino-9cab8bf69271735243e593c318c3b288860fd4d6.zip | |
add esphome stuff
Diffstat (limited to 'esphome')
| -rw-r--r-- | esphome/config/.gitignore | 10 | ||||
| -rw-r--r-- | esphome/config/couchlight.yaml | 76 | ||||
| -rw-r--r-- | esphome/config/hoblight.yaml | 85 | ||||
| -rw-r--r-- | esphome/config/tvlight.yaml | 61 |
4 files changed, 232 insertions, 0 deletions
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 @@ | |||
| 1 | # Gitignore settings for ESPHome | ||
| 2 | # This is an example and may include too much for your use-case. | ||
| 3 | # You can modify this file to suit your needs. | ||
| 4 | /.esphome/ | ||
| 5 | **/.pioenvs/ | ||
| 6 | **/.piolibdeps/ | ||
| 7 | **/lib/ | ||
| 8 | **/src/ | ||
| 9 | **/platformio.ini | ||
| 10 | /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 @@ | |||
| 1 | esphome: | ||
| 2 | name: couchlight | ||
| 3 | platform: ESP8266 | ||
| 4 | board: d1_mini | ||
| 5 | |||
| 6 | # Enable logging | ||
| 7 | logger: | ||
| 8 | |||
| 9 | # Enable Home Assistant API | ||
| 10 | api: | ||
| 11 | password: !secret api_password | ||
| 12 | |||
| 13 | # OTA | ||
| 14 | ota: | ||
| 15 | password: !secret ota_password | ||
| 16 | |||
| 17 | # WiFi Credentials | ||
| 18 | wifi: | ||
| 19 | ssid: !secret wifi_ssid | ||
| 20 | password: !secret wifi_password | ||
| 21 | |||
| 22 | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
| 23 | ap: | ||
| 24 | ssid: "Couchlight Fallback Hotspot" | ||
| 25 | password: !secret wifi_ap_password | ||
| 26 | |||
| 27 | captive_portal: | ||
| 28 | |||
| 29 | light: | ||
| 30 | - id: light1 | ||
| 31 | platform: binary | ||
| 32 | name: "Couch 1" | ||
| 33 | output: relay_light1 | ||
| 34 | |||
| 35 | - id: light2 | ||
| 36 | platform: binary | ||
| 37 | name: "Couch 2" | ||
| 38 | output: relay_light2 | ||
| 39 | |||
| 40 | output: | ||
| 41 | - id: relay_light1 | ||
| 42 | platform: gpio | ||
| 43 | pin: D1 | ||
| 44 | |||
| 45 | - id: relay_light2 | ||
| 46 | platform: gpio | ||
| 47 | pin: D2 | ||
| 48 | |||
| 49 | binary_sensor: | ||
| 50 | - id: button_light1 | ||
| 51 | name: "Couch 1 PushButton" | ||
| 52 | platform: gpio | ||
| 53 | pin: | ||
| 54 | number: D5 | ||
| 55 | mode: INPUT_PULLUP | ||
| 56 | filters: | ||
| 57 | - invert | ||
| 58 | - delayed_on: 50ms | ||
| 59 | on_press: | ||
| 60 | then: | ||
| 61 | - light.toggle: light1 | ||
| 62 | internal: true # hide from UI | ||
| 63 | |||
| 64 | - id: button_light2 | ||
| 65 | name: "Couch 2 PushButton" | ||
| 66 | platform: gpio | ||
| 67 | pin: | ||
| 68 | number: D6 | ||
| 69 | mode: INPUT_PULLUP | ||
| 70 | filters: | ||
| 71 | - invert | ||
| 72 | - delayed_on: 50ms | ||
| 73 | on_press: | ||
| 74 | then: | ||
| 75 | - light.toggle: light2 | ||
| 76 | 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 @@ | |||
| 1 | esphome: | ||
| 2 | name: hoblight | ||
| 3 | platform: ESP8266 | ||
| 4 | board: esp01_1m | ||
| 5 | |||
| 6 | # Enable logging | ||
| 7 | logger: | ||
| 8 | # make RXD / TXD available | ||
| 9 | baud_rate: 0 | ||
| 10 | |||
| 11 | # Enable Home Assistant API | ||
| 12 | api: | ||
| 13 | password: !secret api_password | ||
| 14 | |||
| 15 | # OTA | ||
| 16 | ota: | ||
| 17 | password: !secret ota_password | ||
| 18 | |||
| 19 | # WiFi Credentials | ||
| 20 | wifi: | ||
| 21 | ssid: !secret wifi_ssid | ||
| 22 | password: !secret wifi_password | ||
| 23 | |||
| 24 | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
| 25 | ap: | ||
| 26 | ssid: "Hoblight Fallback Hotspot" | ||
| 27 | password: !secret wifi_ap_password | ||
| 28 | |||
| 29 | captive_portal: | ||
| 30 | |||
| 31 | light: | ||
| 32 | - platform: cwww | ||
| 33 | id: dining_table | ||
| 34 | name: "Dining Table" | ||
| 35 | cold_white: pwm_w | ||
| 36 | warm_white: pwm_b | ||
| 37 | cold_white_color_temperature: 6536 K | ||
| 38 | warm_white_color_temperature: 2000 K | ||
| 39 | - platform: color_temperature | ||
| 40 | name: "Hob" | ||
| 41 | color_temperature: pwm_rxd | ||
| 42 | brightness: pwm_gpio0 | ||
| 43 | cold_white_color_temperature: 6536 K | ||
| 44 | warm_white_color_temperature: 2000 K | ||
| 45 | |||
| 46 | output: | ||
| 47 | #- platform: esp8266_pwm | ||
| 48 | # pin: GPIO12 | ||
| 49 | # frequency: 1000 Hz | ||
| 50 | # id: pwm_r | ||
| 51 | |||
| 52 | #- platform: esp8266_pwm | ||
| 53 | # pin: GPIO15 | ||
| 54 | # frequency: 1000 Hz | ||
| 55 | # id: pwm_g | ||
| 56 | |||
| 57 | - platform: esp8266_pwm | ||
| 58 | pin: GPIO14 | ||
| 59 | frequency: 1000 Hz | ||
| 60 | id: pwm_b | ||
| 61 | |||
| 62 | - platform: esp8266_pwm | ||
| 63 | pin: GPIO4 | ||
| 64 | frequency: 1000 Hz | ||
| 65 | id: pwm_w | ||
| 66 | |||
| 67 | - platform: esp8266_pwm | ||
| 68 | pin: GPIO0 | ||
| 69 | frequency: 2000 Hz | ||
| 70 | id: pwm_gpio0 | ||
| 71 | |||
| 72 | #- platform: esp8266_pwm | ||
| 73 | # pin: GPIO1 | ||
| 74 | # frequency: 2000 Hz | ||
| 75 | # id: pwm_txd | ||
| 76 | |||
| 77 | - platform: esp8266_pwm | ||
| 78 | pin: GPIO3 | ||
| 79 | frequency: 2000 Hz | ||
| 80 | id: pwm_rxd | ||
| 81 | |||
| 82 | binary_sensor: | ||
| 83 | - platform: gpio | ||
| 84 | pin: GPIO5 | ||
| 85 | 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 @@ | |||
| 1 | esphome: | ||
| 2 | name: tvlight | ||
| 3 | platform: ESP8266 | ||
| 4 | board: d1_mini | ||
| 5 | |||
| 6 | # Enable logging | ||
| 7 | logger: | ||
| 8 | |||
| 9 | # Enable Home Assistant API | ||
| 10 | api: | ||
| 11 | password: !secret api_password | ||
| 12 | |||
| 13 | # OTA | ||
| 14 | ota: | ||
| 15 | password: !secret ota_password | ||
| 16 | |||
| 17 | # WiFi Credentials | ||
| 18 | wifi: | ||
| 19 | ssid: !secret wifi_ssid | ||
| 20 | password: !secret wifi_password | ||
| 21 | |||
| 22 | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
| 23 | ap: | ||
| 24 | ssid: "Tvlight Fallback Hotspot" | ||
| 25 | password: !secret wifi_ap_password | ||
| 26 | |||
| 27 | captive_portal: | ||
| 28 | |||
| 29 | light: | ||
| 30 | - id: tvlight | ||
| 31 | platform: monochromatic | ||
| 32 | name: "TV" | ||
| 33 | output: dimmer_tvlight | ||
| 34 | default_transition_length: 1.5s | ||
| 35 | gamma_correct: 0 | ||
| 36 | |||
| 37 | - id: wled | ||
| 38 | platform: binary | ||
| 39 | name: "WLED" | ||
| 40 | output: relay_wled | ||
| 41 | |||
| 42 | output: | ||
| 43 | - id: dimmer_tvlight | ||
| 44 | platform: esp8266_pwm | ||
| 45 | pin: D5 | ||
| 46 | frequency: 1000 Hz | ||
| 47 | inverted: true | ||
| 48 | # lower 22% are not useable. use max_power because of inverted | ||
| 49 | max_power: 0.78 | ||
| 50 | power_supply: relay_tvlight | ||
| 51 | |||
| 52 | - id: relay_wled | ||
| 53 | platform: gpio | ||
| 54 | pin: D1 | ||
| 55 | |||
| 56 | power_supply: | ||
| 57 | - id: relay_tvlight | ||
| 58 | pin: D2 | ||
| 59 | #enable_time: 3s | ||
| 60 | keep_on_time: 20ms | ||
| 61 | |||
