commit ed85fcbd59c12f35c7b06d0512856a17128dd13a Author: Jason Williams Date: Thu Apr 11 15:42:05 2024 -0600 Re-initializing repository diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0bbf89c --- /dev/null +++ b/.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/basement.yaml b/basement.yaml new file mode 100644 index 0000000..0a9bd3e --- /dev/null +++ b/basement.yaml @@ -0,0 +1,55 @@ +esphome: + name: basement + platform: ESP8266 + board: nodemcuv2 + +logger: + level: INFO + +ota: + password: "872a00fc1540e5da2bde65034519d736" + +wifi: + ssid: !secret ssid + password: !secret pass + fast_connect: true + +mqtt: + broker: mqtt.srv.jnf.me + username: esphome + password: esphome + topic_prefix: esphome/basement + +dallas: + - pin: D1 + +sensor: + - platform: dallas + address: 0xB20114310AB9F728 + name: "Furnace Room" + +binary_sensor: + - platform: gpio + pin: D6 + name: "Doorbell" + device_class: sound + filters: + - delayed_off: 5s + - platform: gpio + pin: D7 + name: "Hot Water Tank" + device_class: moisture + filters: + - invert + - delayed_off: 5s + - platform: gpio + pin: D3 + name: "Basement Drain" + device_class: moisture + filters: + - invert + - delayed_off: 5s + +button: + - platform: restart + name: "Restart" \ No newline at end of file diff --git a/bedroom-lightstrips.yaml b/bedroom-lightstrips.yaml new file mode 100644 index 0000000..5545321 --- /dev/null +++ b/bedroom-lightstrips.yaml @@ -0,0 +1,142 @@ +esphome: + name: bedroom-lightstrips + +esp8266: + board: nodemcuv2 + +logger: + level: INFO + baud_rate: 0 + +ota: + password: "69ad39126b95f706a401f48614a8404d" + +wifi: + ssid: !secret ssid + password: !secret pass + fast_connect: true + +mqtt: + broker: mqtt.srv.jnf.me + username: esphome + password: esphome + topic_prefix: esphome/bedroom-lightstrips + +light: + - platform: neopixelbus + name: "Under Bed Lights" + id: underbedlights + internal: true + variant: WS2812X + pin: GPIO3 + num_leds: 104 + + - platform: partition + name: "Jason's Under Bed Lights" + id: jasonsunderbedlights + segments: + - id: underbedlights + from: 0 + to: 51 + effects: + - addressable_rainbow + - addressable_color_wipe + - addressable_scan + - addressable_twinkle: + name: Twinkle Light + twinkle_probability: 5% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Medium + twinkle_probability: 15% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Heavy + twinkle_probability: 85% + progress_interval: 10ms + - addressable_random_twinkle + - addressable_fireworks + - addressable_flicker + + - platform: partition + name: "Flo's Under Bed Lights" + id: flosunderbedlights + segments: + - id: underbedlights + from: 52 + to: 103 + reversed: true + effects: + - addressable_rainbow + - addressable_color_wipe + - addressable_scan + - addressable_twinkle: + name: Twinkle Light + twinkle_probability: 5% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Medium + twinkle_probability: 15% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Heavy + twinkle_probability: 85% + progress_interval: 10ms + - addressable_random_twinkle + - addressable_fireworks + - addressable_flicker + + - platform: neopixelbus + name: "Headboard Lights" + id: headboardlights + variant: WS2812X + pin: GPIO1 + num_leds: 46 + effects: + - addressable_rainbow + - addressable_color_wipe + - addressable_scan + - addressable_twinkle: + name: Twinkle Light + twinkle_probability: 5% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Medium + twinkle_probability: 15% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Heavy + twinkle_probability: 85% + progress_interval: 10ms + - addressable_fireworks + - addressable_flicker + + - platform: neopixelbus + name: "Tree Lights" + id: treelights + variant: WS2812X + pin: GPIO2 + num_leds: 50 + effects: + - addressable_rainbow + - addressable_color_wipe + - addressable_scan + - addressable_twinkle: + name: Twinkle Light + twinkle_probability: 5% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Medium + twinkle_probability: 15% + progress_interval: 10ms + - addressable_twinkle: + name: Twinkle Heavy + twinkle_probability: 85% + progress_interval: 10ms + - addressable_random_twinkle + - addressable_fireworks + - addressable_flicker + +button: + - platform: restart + name: "Restart" \ No newline at end of file diff --git a/diagrams/Basement.fzz b/diagrams/Basement.fzz new file mode 100644 index 0000000..fe6325d Binary files /dev/null and b/diagrams/Basement.fzz differ diff --git a/diagrams/Basement.png b/diagrams/Basement.png new file mode 100644 index 0000000..13c7cdd Binary files /dev/null and b/diagrams/Basement.png differ diff --git a/diagrams/Bedroom.fzz b/diagrams/Bedroom.fzz new file mode 100644 index 0000000..609867f Binary files /dev/null and b/diagrams/Bedroom.fzz differ diff --git a/diagrams/Bedroom.png b/diagrams/Bedroom.png new file mode 100644 index 0000000..108e0b8 Binary files /dev/null and b/diagrams/Bedroom.png differ diff --git a/diagrams/Garage.fzz b/diagrams/Garage.fzz new file mode 100644 index 0000000..93a658c Binary files /dev/null and b/diagrams/Garage.fzz differ diff --git a/diagrams/Garage.png b/diagrams/Garage.png new file mode 100644 index 0000000..15fac79 Binary files /dev/null and b/diagrams/Garage.png differ diff --git a/garage.yaml b/garage.yaml new file mode 100644 index 0000000..2386114 --- /dev/null +++ b/garage.yaml @@ -0,0 +1,168 @@ +esphome: + name: garage + platform: ESP8266 + board: nodemcuv2 + +logger: + level: INFO + +ota: + password: "143fd33979958ada2bb06df1622d5a4d" + +wifi: + ssid: !secret ssid + password: !secret pass + fast_connect: true + +mqtt: + broker: mqtt.srv.jnf.me + username: esphome + password: esphome + topic_prefix: esphome/garage + +dallas: + - pin: D7 + +sensor: + - platform: dallas + address: 0x7701143100966C28 + name: "Freezer" + id: garage_freezer + - platform: dallas + address: 0x200114310A086F28 + name: "Garage" + id: garage_temp + - platform: ultrasonic + trigger_pin: D5 + echo_pin: D8 + id: garage_spot_1 + internal: true + - platform: ultrasonic + trigger_pin: D3 + echo_pin: D4 + id: garage_spot_2 + internal: true + +text_sensor: + - platform: template + name: "Garage Door State" + id: garage_door_state + lambda: !lambda |- + if (id(garage_door_open).state && id(garage_door_closed).state) { + return {"Error"}; + } else if (id(garage_door_open).state) { + return {"Open"}; + } else if (id(garage_door_closed).state) { + return {"Closed"}; + } else return {"Moving"}; + +binary_sensor: + - platform: gpio + pin: D0 + name: "Garage Door" + device_class: door + id: garage_door_open + filters: + - invert + # on_press: + # then: + # - lambda: |- + # //id(garage_door).current_operation = COVER_OPERATION_IDLE; + # //id(garage_door).position = COVER_OPEN; + # //id(garage_door_state).publish_state("Open"); + # on_release: + # then: + # - lambda: |- + # //id(garage_door).current_operation = COVER_OPERATION_CLOSING; + # //id(garage_door).publish_state(); + # //id(garage_door_state).publish_state("Moving"); + + - platform: gpio + pin: D1 + id: garage_door_closed + filters: + - invert + internal: true + # on_press: + # then: + # - lambda: |- + # //id(garage_door).current_operation = COVER_OPERATION_IDLE; + # //id(garage_door).position = COVER_CLOSED; + # //id(garage_door_state).publish_state("Closed"); + # on_release: + # then: + # - lambda: |- + # //id(garage_door).current_operation = COVER_OPERATION_OPENING; + # //id(garage_door).publish_state(); + # //id(garage_door_state).publish_state("Moving"); + + - platform: gpio + pin: D2 + name: "Side Door" + device_class: door + filters: + - invert + - delayed_off: 5s + + - platform: template + name: "Left Parking Spot" + device_class: occupancy + lambda: |- + if (id(garage_spot_1).state < 2) { + return true; + } else { + return false; + } + - platform: template + name: "Right Parking Spot" + device_class: occupancy + lambda: |- + if (id(garage_spot_2).state < 2) { + return true; + } else { + return false; + } + + +switch: + - platform: gpio + pin: + number: D6 + inverted: true + id: garage_door_switch + on_turn_on: + - delay: 500ms + - switch.turn_off: garage_door_switch + internal: true + +cover: + - platform: template + name: "Garage Door" + id: garage_door + device_class: garage + lambda: !lambda |- + if (id(garage_door_open).state) { + return COVER_OPEN; + } else if (id(garage_door_closed).state) { + return COVER_CLOSED; + } else return {}; + open_action: + - switch.turn_on: garage_door_switch + - delay: 3s + - if: + condition: + binary_sensor.is_on: garage_door_closed + then: + - switch.turn_on: garage_door_switch + close_action: + - switch.turn_on: garage_door_switch + - delay: 3s + - if: + condition: + binary_sensor.is_on: garage_door_open + then: + - switch.turn_on: garage_door_switch + +button: + - platform: restart + name: "Restart" \ No newline at end of file diff --git a/houseplant.yaml b/houseplant.yaml new file mode 100644 index 0000000..87cb77c --- /dev/null +++ b/houseplant.yaml @@ -0,0 +1,44 @@ +esphome: + name: houseplant + platform: ESP8266 + board: nodemcuv2 + +logger: + level: INFO + +ota: + password: "71987bd671fe226031259af06d0ccbea" + +wifi: + ssid: !secret ssid + password: !secret pass + fast_connect: true + +mqtt: + broker: mqtt.srv.jnf.me + username: esphome + password: esphome + topic_prefix: esphome/houseplant + +http_request: + +sensor: + - platform: adc + pin: A0 + name: "Moisture Level" + id: moisture_level + unit_of_measurement: "u" + update_interval: 1h + filters: + - multiply: 1024 + on_value: + - http_request.get: + verify_ssl: false + url: !lambda |- + return (std::string) "https://jasonsplant.jaywll.co/newreading?v=" + to_string(int(id(moisture_level).state)); + headers: + auth-key: !secret houseplant_key + +button: + - platform: restart + name: "Restart" \ No newline at end of file