Many changes.

This commit is contained in:
root
2021-11-27 17:39:51 -08:00
parent 790d1b9c32
commit b68b1de9b6
10 changed files with 505 additions and 176 deletions

View File

@@ -1,55 +0,0 @@
esphome:
name: attic_2_fan
platform: ESP8266
board: esp01_1m
wifi:
ssid: kungle-ot
password: ThingsWelcomeToKungle
manual_ip:
static_ip: 192.168.37.70
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: True
name: "Attic 2 Fan button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "Attic 2 Fan relay"
pin: GPIO14
id: relay
status_led:
pin:
number: GPIO12
inverted: yes
sensor:
- platform: wifi_signal
name: "Attic 2 Fan WiFi signal"
update_interval: 60s
- platform: uptime
name: "Attic 2 Fan uptime"
text_sensor:
- platform: version
name: "Attic 2 Fan ESPHome version"

51
downlight_1.yaml Normal file
View File

@@ -0,0 +1,51 @@
esphome:
name: downlight01
platform: ESP8266
board: esp01_1m
wifi:
ssid: "kungle-oss"
password: "hcfU8@gG&8Hm"
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
my9231:
data_pin: GPIO13
clock_pin: GPIO15
num_channels: 4
num_chips: 1
output:
- platform: esp8266_pwm
pin: 14
id: output_blue
- platform: esp8266_pwm
pin: 12
id: output_green
- platform: esp8266_pwm
pin: 4
id: output_red
- platform: esp8266_pwm
pin: 5
id: output_coldwhite
- platform: esp8266_pwm
pin: 13
id: output_warmwhite
light:
- platform: rgbww
name: '${device_name} Light'
default_transition_length: 0s
red: output_red
green: output_green
blue: output_blue
cold_white: output_coldwhite
warm_white: output_warmwhite
cold_white_color_temperature: 6500 K
warm_white_color_temperature: 2700 K

83
pj_3_duct_fan_pwr.yaml Normal file
View File

@@ -0,0 +1,83 @@
substitutions:
device_name: "pj_3_duct_fan_pwr"
friendly_name: "Prj 3 Duct Fan Pwr"
esphome:
name: pj_3_duct_fan_pwr
platform: ESP8266
board: esp01_1m
wifi:
ssid: "kungle-oss"
password: "hcfU8@gG&8Hm"
fast_connect: true
manual_ip:
static_ip: 192.168.35.240
gateway: 192.168.35.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pj 3 Duct Fan Pwr"
password: "ImgAxoEGSc90"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: True
name: "${friendly_name} Button"
id: "${device_name}_button"
on_press:
- switch.toggle: "${device_name}_relay"
- platform: status
name: "${friendly_name} Status"
id: "${device_name}_status"
switch:
- platform: gpio
name: "${friendly_name} Relay"
id: "${device_name}_relay"
pin: GPIO14
on_turn_on:
- output.turn_on: led
on_turn_off:
- output.turn_off: led
status_led:
pin:
number: GPIO12
inverted: yes
output:
- platform: gpio
pin: GPIO13
inverted: true
id: led
sensor:
- platform: wifi_signal
name: "${friendly_name} WiFi signal"
id: "${device_name}_wifi_signal"
update_interval: 60s
- platform: uptime
name: "${friendly_name} Uptime"
id: "${device_name}_uptime"
update_interval: 60s
text_sensor:
- platform: version
name: "${friendly_name} ESPHome Version"
id: "${device_name}_esphome_version"

106
projector_3.yaml Normal file
View File

@@ -0,0 +1,106 @@
substitutions:
duct_fan_pin: GPIO14
duct_fan_id: duct_fan_id
duct_fan_pwmfreq: 5000Hz
duct_fan_spd_id: duct_fan_spd_id
duct_fan_spd_name: pj_3_duct_fan_spd
# heat_pin: GPIO19
# heat_name: "Denon Pwr"
dallas_pin: GPIO32
dallas_1_addr: "0x1F3C01D0756F0928"
dallas_1_name: pj_3_temp_cold
dallas_2_addr: "0x873C01D0756D4B28"
dallas_2_name: pj_3_temp_prj_exh
dallas_3_addr: "0xA901143295610E28"
dallas_3_name: pj_3_temp_box_exh
esphome:
name: pj_3
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "kungle-oss"
password: "hcfU8@gG&8Hm"
fast_connect: true
manual_ip:
static_ip: 192.168.35.192
gateway: 192.168.35.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Projector 3 Fallback Hotspot"
password: "xfPfYSP3N0C3"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
output:
- platform: ledc
pin: ${duct_fan_pin}
id: ${duct_fan_id}
frequency: ${duct_fan_pwmfreq}
fan:
- platform: speed
id: ${duct_fan_spd_id}
output: ${duct_fan_id}
name: ${duct_fan_spd_name}
# speed:
# low: 0.2
# medium: 0.6
# high: 1.0
dallas:
- pin:
number: ${dallas_pin}
mode: INPUT_PULLUP
update_interval: 10s
sensor:
- platform: dallas
address: ${dallas_1_addr}
name: ${dallas_1_name}
- platform: dallas
address: ${dallas_2_addr}
name: ${dallas_2_name}
- platform: dallas
address: ${dallas_3_addr}
name: ${dallas_3_name}
# # Sense when receiver is turned on
# binary_sensor:
# - platform: gpio
# pin: ${heat_pin}
# name: ${heat_name}
# device_class: power
# # on_press:
# # then:
# # - if:
# # condition:
# # lambda: 'return id(${duct_fan_spd_id}).state == "OFF";'
# # then:
# # - logger.log: "${duct_fan_spd_name} was off. Turning on as ${heat_name} turned on."
# # - fan.turn_on:
# # id: ${duct_fan_spd_id}
# # speed: LOW
# # else:
# # - logger.log: "${heat_name} turned on, but not turning on ${duct_fan_spd_name} as already on."
# # on_release:
# # then:
# # - fan.turn_on:
# # id: ${duct_fan_spd_id}
# # speed: LOW
# # - lambda: |-
# # if (id(${duct_fan_spd_id}).is_off) {

View File

@@ -1,3 +1,23 @@
substitutions:
duct_fan_pin: GPIO13
duct_fan_id: duct_fan_id
duct_fan_name: Rack 2 Duct Fan Speed
# duct_fan_channel: "0"
duct_fan_pwmfreq: 5000Hz
wall_fan_pwr_pin: GPIO21
wall_fan_pwr_name: Rack 2 Wall Fan Power
wall_fan_spd_pin: GPIO22
wall_fan_spd_id: wall_fan_spd_id
# wall_fan_spd_channel: "2"
wall_fan_spd_pwmfreq: 25000Hz
wall_fan_spd_name: Rack 2 Wall Fan Speed
wall_fan_tach_pin: GPIO23
wall_fan_tach_id: wall_fan_tach_id
wall_fan_tach_name: Rack 2 Wall Fan Tach
dallas_pin: GPIO32
dallas_name_1: Rack 2 Temp Hot
dallas_name_2: Rack 2 Temp Cold
esphome:
name: rack_2
platform: ESP32
@@ -19,50 +39,59 @@ wifi:
captive_portal:
switch:
- platform: gpio
pin: ${wall_fan_pwr_pin}
name: ${wall_fan_pwr_name}
output:
- platform: ledc
pin: GPIO13
id: gpio_13
pin: ${duct_fan_pin}
id: ${duct_fan_id}
channel: 0
frequency: ${duct_fan_pwmfreq}
- platform: ledc
pin: GPIO22
id: gpio_22
pin: ${wall_fan_spd_pin}
id: ${wall_fan_spd_id}
channel: 2
frequency: ${wall_fan_spd_pwmfreq}
fan:
- platform: speed
output: gpio_13
name: "rack_2_duct_fan"
speed:
low: 0.3
medium: 0.5
high: 1.0
output: ${duct_fan_id}
name: ${duct_fan_name}
# speed:
# low: 0.2
# medium: 0.6
# high: 1.0
- platform: speed
output: gpio_22
name: "rack_2_wall_fan"
speed:
low: 0.3
medium: 0.5
high: 1.0
output: ${wall_fan_spd_id}
name: ${wall_fan_spd_name}
# speed:
# low: 0.0
# medium: 0.8
# high: 1.0
sensor:
- platform: pulse_counter
pin:
number: GPIO23
number: ${wall_fan_tach_pin}
mode: INPUT_PULLUP
unit_of_measurement: 'RPM'
name: "rack_2_wall_fan_speed"
name: ${wall_fan_tach_name}
update_interval: 10s
filters:
- multiply: 0.5
- platform: dallas
address: 0xB801143296ED7B28
name: "rack_2_cold_temp"
- platform: dallas
address: 0x1D01143296570128
name: "rack_2_hot_temp"
name: ${dallas_name_1}
- platform: dallas
address: 0x1D02131D6063AA28
name: ${dallas_name_2}
dallas:
- pin:
number: GPIO32
number: ${dallas_pin}
mode: INPUT_PULLUP
update_interval: 10s

55
rack_2_duct_fan_pwr.yaml Normal file
View File

@@ -0,0 +1,55 @@
esphome:
name: rack_2_duct_fan_pwr
platform: ESP8266
board: esp01_1m
wifi:
ssid: kungle-ot
password: ThingsWelcomeToKungle
manual_ip:
static_ip: 192.168.37.70
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# binary_sensor:
# - platform: gpio
# pin:
# number: GPIO4
# mode: INPUT_PULLUP
# inverted: True
# name: "Rack 2 Duct Fan Power Button"
# on_press:
# - switch.toggle: relay
switch:
- platform: gpio
name: "Rack 2 Duct Fan Power Relay"
pin: GPIO14
id: relay
status_led:
pin:
number: GPIO12
inverted: yes
# sensor:
# - platform: wifi_signal
# name: "Rack 2 Duct Fan Power WiFi Signal"
# update_interval: 60s
# - platform: uptime
# name: "Rack 2 Duct Fan Power uptime"
# text_sensor:
# - platform: version
# name: "Rack 2 Duct Fan Power ESPHome Version"

102
rack_3.yaml Normal file
View File

@@ -0,0 +1,102 @@
substitutions:
duct_fan_pin: GPIO13
duct_fan_id: duct_fan_id
duct_fan_pwmfreq: 5000Hz
duct_fan_spd_id: duct_fan_spd_id
duct_fan_spd_name: rack_3_duct_fan_spd
heat_pin: GPIO19
heat_name: "Denon Pwr"
dallas_pin: GPIO32
dallas_1_addr: "0x7F0114328974D728"
dallas_1_name: rack_3_temp_cold
dallas_2_addr: "0xB801143296ED7B28"
dallas_2_name: rack_3_temp_hot
esphome:
name: rack_3
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "kungle-ot"
password: "ThingsWelcomeToKungle"
manual_ip:
static_ip: 192.168.37.74
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Rack 3 Fallback Hotspot"
password: "jj0CXEgu3Lzo"
captive_portal:
output:
- platform: ledc
pin: ${duct_fan_pin}
id: ${duct_fan_id}
frequency: ${duct_fan_pwmfreq}
fan:
- platform: speed
id: ${duct_fan_spd_id}
output: ${duct_fan_id}
name: ${duct_fan_spd_name}
# speed:
# low: 0.2
# medium: 0.6
# high: 1.0
dallas:
- pin:
number: ${dallas_pin}
mode: INPUT_PULLUP
update_interval: 10s
sensor:
- platform: dallas
address: ${dallas_1_addr}
name: ${dallas_1_name}
- platform: dallas
address: ${dallas_2_addr}
name: ${dallas_2_name}
# Sense when receiver is turned on
binary_sensor:
- platform: gpio
pin: ${heat_pin}
name: ${heat_name}
device_class: power
# on_press:
# then:
# - if:
# condition:
# lambda: 'return id(${duct_fan_spd_id}).state == "OFF";'
# then:
# - logger.log: "${duct_fan_spd_name} was off. Turning on as ${heat_name} turned on."
# - fan.turn_on:
# id: ${duct_fan_spd_id}
# speed: LOW
# else:
# - logger.log: "${heat_name} turned on, but not turning on ${duct_fan_spd_name} as already on."
# on_release:
# then:
# - fan.turn_on:
# id: ${duct_fan_spd_id}
# speed: LOW
# - lambda: |-
# if (id(${duct_fan_spd_id}).is_off) {
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:

View File

@@ -1,42 +0,0 @@
esphome:
name: rack_3_duct_fan
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "kungle-ot"
password: "ThingsWelcomeToKungle"
manual_ip:
static_ip: 192.168.37.74
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Rack 3 Duct Fan Fallback Hotspot"
password: "Ze13rpDX4Qm6"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
output:
- platform: ledc
pin: GPIO19
id: gpio_19
fan:
- platform: speed
output: gpio_19
name: "rack_3_duct_fan"
speed:
low: 0.3
medium: 0.5
high: 1.0

55
rack_3_duct_fan_pwr.yaml Normal file
View File

@@ -0,0 +1,55 @@
esphome:
name: rack_3_duct_fan_pwr
platform: ESP8266
board: esp01_1m
wifi:
ssid: kungle-ot
password: ThingsWelcomeToKungle
manual_ip:
static_ip: 192.168.37.68
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
# binary_sensor:
# - platform: gpio
# pin:
# number: GPIO4
# mode: INPUT_PULLUP
# inverted: True
# name: "Rack 3 Duct Fan Power Button"
# on_press:
# - switch.toggle: relay
switch:
- platform: gpio
name: "Rack 3 Duct Fan Power Relay"
pin: GPIO14
id: relay
status_led:
pin:
number: GPIO12
inverted: yes
# sensor:
# - platform: wifi_signal
# name: "Rack 3 Duct Fan Power WiFi Signal"
# update_interval: 60s
# - platform: uptime
# name: "Rack 3 Duct Fan Power uptime"
# text_sensor:
# - platform: version
# name: "Rack 3 Duct Fan Power ESPHome Version"

View File

@@ -1,55 +0,0 @@
esphome:
name: server_2_wall_fan
platform: ESP8266
board: esp01_1m
wifi:
ssid: kungle-ot
password: ThingsWelcomeToKungle
manual_ip:
static_ip: 192.168.37.68
gateway: 192.168.37.1
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: True
name: "Server 2 Wall Fan button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "Server 2 Wall Fan relay"
pin: GPIO14
id: relay
status_led:
pin:
number: GPIO12
inverted: yes
sensor:
- platform: wifi_signal
name: "Server 2 Wall Fan WiFi signal"
update_interval: 60s
- platform: uptime
name: "Server 2 Wall Fan uptime"
text_sensor:
- platform: version
name: "Server 2 Wall Fan ESPHome version"