Compare commits

..

No commits in common. "9ebe7e5a82f640d9a56c71c26f664c5471ee6f86" and "7a689718409947a05bbf65a599b8efaf6bb39157" have entirely different histories.

4 changed files with 130 additions and 1 deletions

View File

@ -64,6 +64,7 @@ light:
- addressable_fireworks
- addressable_flicker
- platform: neopixelbus
name: "Headboard Lights"
id: headboardlights
@ -79,6 +80,7 @@ light:
- addressable_fireworks
- addressable_flicker
- platform: neopixelbus
name: "Tree Lights"
id: treelights
@ -92,4 +94,4 @@ light:
- addressable_twinkle
- addressable_random_twinkle
- addressable_fireworks
- addressable_flicker
- addressable_flicker

BIN
diagrams/Laundry.fzz Normal file

Binary file not shown.

BIN
diagrams/Laundry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

127
laundry.yaml Normal file
View File

@ -0,0 +1,127 @@
esphome:
name: laundry
platform: ESP8266
board: nodemcuv2
logger:
level: INFO
ota:
password: "03af999284928f8525c82a13771a4a4f"
wifi:
ssid: !secret ssid
password: !secret pass
fast_connect: true
mqtt:
broker: henry.int.jnf.me
username: esphome
password: esphome
topic_prefix: esphome/laundry
i2c:
sda: D6
scl: D5
scan: True
id: bus_a
sensor:
- platform: mpu6050
address: 0x68
update_interval: 1s
gyro_x:
name: "Dryer Gyro X"
id: dryer_gyro_x
internal: true
gyro_y:
name: "Dryer Gyro Y"
id: dryer_gyro_y
internal: true
gyro_z:
name: "Dryer Gyro Z"
id: dryer_gyro_z
internal: true
temperature:
name: "Dryer Temperature"
filters:
- throttle: 30s
- platform: mpu6050
address: 0x69
update_interval: 1s
gyro_x:
name: "Washer Gyro X"
id: washer_gyro_x
internal: true
gyro_y:
name: "Washer Gyro Y"
id: washer_gyro_y
internal: true
gyro_z:
name: "Washer Gyro Z"
id: washer_gyro_z
internal: true
temperature:
name: "Washer Temperature"
filters:
- throttle: 30s
- platform: template
name: "Dryer Gyro All"
id: dryer_gyro_all
unit_of_measurement: °/s²
lambda: |-
return fabs(id(dryer_gyro_x).state) + fabs(id(dryer_gyro_y).state) + fabs(id(dryer_gyro_z).state);
update_interval: 1s
filters:
- lambda: |-
static float last_dryer_value = 0;
static float dryer_change = 0;
dryer_change = x - last_dryer_value;
last_dryer_value = x;
return fabs(dryer_change);
- sliding_window_moving_average:
window_size: 120
send_every: 10
- platform: template
name: "Washer Gyro All"
id: washer_gyro_all
unit_of_measurement: °/s²
lambda: |-
return fabs(id(washer_gyro_x).state) + fabs(id(washer_gyro_y).state) + fabs(id(washer_gyro_z).state);
update_interval: 1s
filters:
- lambda: |-
static float last_washer_value = 0;
static float washer_change = 0;
washer_change = x - last_washer_value;
last_washer_value = x;
return fabs(washer_change);
- sliding_window_moving_average:
window_size: 120
send_every: 10
binary_sensor:
- platform: template
name: "Dryer"
id: dryer
lambda: |-
if (id(dryer_gyro_all).state >= 2.0) {
return true;
} else {
return false;
}
filters:
- delayed_on: 30s
- delayed_off: 60s
- platform: template
name: "Washer"
id: washer
lambda: |-
if (id(washer_gyro_all).state >= 1.0) {
return true;
} else {
return false;
}
filters:
- delayed_on: 30s
- delayed_off: 120s