mirror of
https://github.com/nuttytree/ESPHome-Devices.git
synced 2024-08-30 18:12:19 +00:00
Add basement bathroom devices
This commit is contained in:
parent
34ee4376ad
commit
1a12dcd805
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
# Gitignore settings for ESPHome
|
||||
/.esphome/
|
||||
/.vscode/
|
||||
**/.pioenvs/
|
||||
**/.piolibdeps/
|
||||
**/lib/
|
||||
|
28
README.md
28
README.md
@ -1,17 +1,24 @@
|
||||
# ESPHome-Devices
|
||||
A collection of my [ESPHome](https://ESPHome.io) configuration files and code for my various ESP8266 devices that integrate with [Home Assistant](https://www.home-assistant.io/).
|
||||
|
||||
## ESPHome
|
||||
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. For more information checkout [ESPHome.io](https://ESPHome.io).
|
||||
## What is ESPHome
|
||||
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. For more information checkout [ESPHome.io](https://ESPHome.io).
|
||||
|
||||
## What is Home Assistant
|
||||
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. For more information check out [Home-Assistant.io](https://www.home-assistant.io/)
|
||||
|
||||
## Basement Bathroom Sensor
|
||||
This is a [WEMOS D1 Mini clone](https://www.amazon.com/gp/product/B076F52NQD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that is connected to a [motion sensor](https://www.amazon.com/gp/product/B07GJDJV63/ref=ppx_yo_dt_b_asin_title_o06_s01?ie=UTF8&psc=1), a [temperature/humidity/pressure sensor](https://www.amazon.com/gp/product/B07KYJNFMD/ref=ppx_yo_dt_b_asin_title_o06_s01?ie=UTF8&psc=1), and a [door sensor](https://www.amazon.com/gp/product/B07YBGZNNW/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1) and is used to control the lights, fan, and heater (heat lamps in the fan) in my basement bathroom.
|
||||
|
||||
## Home Assistant
|
||||
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. For more information check out [Home-Assistant.io](https://www.home-assistant.io/)
|
||||
|
||||
## Coffee Maker
|
||||
This is a [NodeMCU](https://www.amazon.com/gp/product/B010N1SPRK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that I installed in my [Cuisinart Coffee Maker](https://www.amazon.com/gp/product/B01N6T5QNO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1). It has GPIO's connected to the indicator lights for the bold setting and power and has a couple of [relays](https://www.amazon.com/gp/product/B0057OC6D8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) connected to the bold setting button and the power button. Aside from the ability to trigger automations based on the state of the coffee maker and automate turning on the coffee maker I also added a "bloom" feature. Coffee tastes better if you let the carbon dioxide escape (bloom) after getting the coffee grounds wet before continuing the brew cycle.
|
||||
|
||||
## Feit Dimmers
|
||||
I have a couple of [Feit Dimmers](https://www.costco.com/feit-electric-smart-dimmer%2c-3-pack.product.100518151.html) (Kitchen Table and Office) I bought as a 2 pack at Costco. This is a pretty basic config that replaces the original firmware. I re-flashed these using [Tuya-Convert](https://github.com/ct-Open-Source/tuya-convert).
|
||||
## Feit Dimmer Devices
|
||||
I have a couple of [Feit Dimmers](https://www.costco.com/feit-electric-smart-dimmer%2c-3-pack.product.100518151.html) I bought as a 2 pack at Costco. These are a pretty basic config that replaces the original firmware. I re-flashed these using [Tuya-Convert](https://github.com/ct-Open-Source/tuya-convert).
|
||||
|
||||
Kitchen Table Light
|
||||
Office Light
|
||||
|
||||
## Fire Pit and Fountain
|
||||
|
||||
@ -24,4 +31,11 @@ This is a [NodeMCU](https://www.amazon.com/gp/product/B010N1SPRK/ref=ppx_yo_dt_b
|
||||
This is a [NodeMCU](https://www.amazon.com/gp/product/B010N1SPRK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that I have installed under my bed and is connected to a pair of [Force Sensitive Resistors](https://www.kr4.us/force-sensitive-resistor-long.html?gclid=COqn7qrNxdICFVQlgQodeLEMKw) that are placed between the mattress and box spring of my bed, one for my side and one for my wife's side. Because the ESP8266 has only one analog input I had to add some transistors connected to pins D0 and D1 that are used to select which FSR is connected to the A0 analog input. The custom binary sensors in [bed_sensor.h](https://github.com/nuttytree/ESPHome-Devices/blob/master/bed_sensor.h) handles switching between the FSR's and calculating who is in bed. Generally when the bed is empty the reading is the full 1024 (or at least close to this). If someone is on one side of the bed or the other the reading is typically around 100. However if you lay in the middle of the bed I tend to get readings of around 600-700 on both sides. Thus the 3 different binary sensors (Chris is in Bed, Melissa is in Bed, Someone is in Bed). There is also a Master Bed Count that reports the total number of people in bed, I compare this to a sensor in Home Assistant that tracks the number of "masters" (my wife and me) that are home so that I can activate night mode when everyone is in bed.
|
||||
|
||||
## Patio Lights
|
||||
This is a [WEMOS D1 Mini Pro](https://www.amazon.com/gp/product/B07G9HZ5LM/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that is connected to a [relay](https://www.amazon.com/gp/product/B00VRUAHLE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) to control the power to the landscape lights around my patio. I used the WEMOS D1 Mini Pro because it has an external antenna. I initially used a [WEMOS D1 Mini clone](https://www.amazon.com/gp/product/B076F52NQD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) but the power supply for my lights was to far from the house and I kept having connectivity issues.
|
||||
This is a [WEMOS D1 Mini Pro](https://www.amazon.com/gp/product/B07G9HZ5LM/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) that is connected to a [relay](https://www.amazon.com/gp/product/B00VRUAHLE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) to control the power to the landscape lights around my patio. I used the WEMOS D1 Mini Pro because it has an external antenna. I initially used a [WEMOS D1 Mini clone](https://www.amazon.com/gp/product/B076F52NQD/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1) but the power supply for my lights was to far from the house and I kept having connectivity issues.
|
||||
|
||||
## SANA Dual Switches
|
||||
I have a couple of [SANA Switches](https://www.amazon.com/gp/product/B07QC5ZCHP/ref=ppx_yo_dt_b_asin_title_o03_s01?ie=UTF8&th=1) ( and ). These are a pretty basic config that replaces the original firmware. I re-flashed these using [Tuya-Convert](https://github.com/ct-Open-Source/tuya-convert).
|
||||
|
||||
Basement Bathroom Light and Fan
|
||||
Basement Bathroom Shower Light and Heater
|
||||
|
||||
|
81
basement_bathroom_light_fan.yaml
Normal file
81
basement_bathroom_light_fan.yaml
Normal file
@ -0,0 +1,81 @@
|
||||
substitutions:
|
||||
device_id: basement_bathroom_light_fan
|
||||
device_name: Basement Bathroom Light and Fan
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
ip_address: !secret basement_bathroom_light_fan_ip
|
||||
ota_pwd: !secret basement_bathroom_light_fan_ota_pwd
|
||||
api_pwd: !secret basement_bathroom_light_fan_api_pwd
|
||||
ap_wifi_pwd: !secret basement_bathroom_light_fan_ap_wifi_pwd
|
||||
|
||||
esphome:
|
||||
<<: !include common/esphome.yaml
|
||||
|
||||
<<: !include common/common.yaml
|
||||
<<: !include common/logger/logger.yaml
|
||||
|
||||
binary_sensor:
|
||||
- !include common/binary_sensor/status.yaml
|
||||
- platform: gpio
|
||||
id: light_toggle
|
||||
pin:
|
||||
number: 12
|
||||
mode: INPUT_PULLUP
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: light
|
||||
- platform: gpio
|
||||
id: fan_toggle
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
on_press:
|
||||
then:
|
||||
- fan.toggle: fan
|
||||
- platform: homeassistant
|
||||
id: motion
|
||||
name: Motion
|
||||
entity_id: binary_sensor.basement_bathroom_motion
|
||||
- platform: homeassistant
|
||||
id: door
|
||||
name: Door
|
||||
entity_id: binary_sensor.basement_bathroom_door
|
||||
|
||||
fan:
|
||||
- platform: binary
|
||||
id: fan
|
||||
output: fan_output
|
||||
name: "Basement Bathroom Fan"
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
id: fan_output
|
||||
pin: 4
|
||||
|
||||
sensor:
|
||||
- !include common/sensor/uptime.yaml
|
||||
- !include common/sensor/wifi.yaml
|
||||
- platform: homeassistant
|
||||
id: humidity
|
||||
name: Humidity
|
||||
entity_id: sensor.basement_bathroom_humidity
|
||||
- platform: homeassistant
|
||||
id: median_humidity
|
||||
name: Median Humidity
|
||||
entity_id: sensor.basement_bathroom_median_humidity
|
||||
|
||||
status_led:
|
||||
pin: 0
|
||||
|
||||
switch:
|
||||
- !include common/switch/restart.yaml
|
||||
- platform: gpio
|
||||
id: light
|
||||
name: "Basement Bathroom Light"
|
||||
icon: mdi:lightbulb
|
||||
pin: 13
|
||||
inverted: false
|
||||
|
||||
text_sensor:
|
||||
- !include common/text_sensor/version.yaml
|
||||
- !include common/text_sensor/wifi.yaml
|
62
basement_bathroom_sensor.yaml
Normal file
62
basement_bathroom_sensor.yaml
Normal file
@ -0,0 +1,62 @@
|
||||
substitutions:
|
||||
device_id: basement_bathroom_sensor
|
||||
device_name: Basement Bathroom Sensor
|
||||
platform: ESP8266
|
||||
board: d1_mini
|
||||
ip_address: !secret basement_bathroom_sensor_ip
|
||||
ota_pwd: !secret basement_bathroom_sensor_ota_pwd
|
||||
api_pwd: !secret basement_bathroom_sensor_api_pwd
|
||||
ap_wifi_pwd: !secret basement_bathroom_sensor_ap_wifi_pwd
|
||||
|
||||
esphome:
|
||||
<<: !include common/esphome.yaml
|
||||
|
||||
<<: !include common/common.yaml
|
||||
<<: !include common/logger/logger.yaml
|
||||
|
||||
binary_sensor:
|
||||
- !include common/binary_sensor/status.yaml
|
||||
- platform: gpio
|
||||
name: Basement Bathroom Motion
|
||||
device_class: motion
|
||||
pin:
|
||||
number: D
|
||||
mode: INPUT_PULLUP
|
||||
- platform: gpio
|
||||
name: Basement Bathroom Door
|
||||
device_class: door
|
||||
pin:
|
||||
number: D
|
||||
mode: INPUT_PULLUP
|
||||
|
||||
sensor:
|
||||
- !include common/sensor/uptime.yaml
|
||||
- !include common/sensor/wifi.yaml
|
||||
- platform: bme280
|
||||
temperature:
|
||||
id: temperature
|
||||
name: "Basement Bathroom Temperature"
|
||||
pressure:
|
||||
id: pressure
|
||||
name: "Basement Bathroom Pressure"
|
||||
humidity:
|
||||
id: humidity
|
||||
name: "Basement Bathroom Humidity"
|
||||
address: 0x77
|
||||
update_interval: 30s
|
||||
- platform: template
|
||||
name: "Basement Bathroom Median Humidity"
|
||||
lambda: return id(humidity).state
|
||||
update_interval: 60s
|
||||
filters:
|
||||
- median:
|
||||
window_size: 360
|
||||
send_every: 1
|
||||
send_first_at: 1
|
||||
|
||||
switch:
|
||||
- !include common/switch/restart.yaml
|
||||
|
||||
text_sensor:
|
||||
- !include common/text_sensor/version.yaml
|
||||
- !include common/text_sensor/wifi.yaml
|
60
basement_bathroom_shower_light_heater.yaml
Normal file
60
basement_bathroom_shower_light_heater.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
substitutions:
|
||||
device_id: basement_bath_shower_light_heat
|
||||
device_name: Basement Bathroom Shower Light and Heater
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
ip_address: !secret basement_bathroom_shower_light_heater_ip
|
||||
ota_pwd: !secret basement_bathroom_shower_light_heater_ota_pwd
|
||||
api_pwd: !secret basement_bathroom_shower_light_heater_api_pwd
|
||||
ap_wifi_pwd: !secret basement_bathroom_shower_light_heater_ap_wifi_pwd
|
||||
|
||||
esphome:
|
||||
<<: !include common/esphome.yaml
|
||||
|
||||
<<: !include common/common.yaml
|
||||
<<: !include common/logger/logger.yaml
|
||||
|
||||
binary_sensor:
|
||||
- !include common/binary_sensor/status.yaml
|
||||
- platform: gpio
|
||||
id: light_toggle
|
||||
pin:
|
||||
number: 12
|
||||
mode: INPUT_PULLUP
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: light
|
||||
- platform: gpio
|
||||
id: heater_toggle
|
||||
pin:
|
||||
number: 3
|
||||
mode: INPUT_PULLUP
|
||||
on_press:
|
||||
then:
|
||||
- switch.toggle: heater
|
||||
|
||||
sensor:
|
||||
- !include common/sensor/uptime.yaml
|
||||
- !include common/sensor/wifi.yaml
|
||||
|
||||
status_led:
|
||||
pin: 0
|
||||
|
||||
switch:
|
||||
- !include common/switch/restart.yaml
|
||||
- platform: gpio
|
||||
id: light
|
||||
name: "Basement Shower Light"
|
||||
icon: mdi:lightbulb
|
||||
pin: 13
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
id: heater
|
||||
name: "Basement Bathroom Heater"
|
||||
icon: mdi:radiator
|
||||
pin: 4
|
||||
inverted: false
|
||||
|
||||
text_sensor:
|
||||
- !include common/text_sensor/version.yaml
|
||||
- !include common/text_sensor/wifi.yaml
|
@ -1,6 +1,7 @@
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
fast_connect: true
|
||||
manual_ip:
|
||||
static_ip: ${ip_address}
|
||||
subnet: !secret ip_subnet
|
||||
|
Loading…
Reference in New Issue
Block a user