Compare commits
9 Commits
7a68971840
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
249d981689 | ||
|
|
aff8f85afd | ||
|
|
f62e04aef1 | ||
|
|
f1db356421 | ||
|
|
2789e0e4c3 | ||
|
|
2de799c753 | ||
|
|
c3225ab919 | ||
|
|
9ebe7e5a82 | ||
|
|
b9144437fe |
@@ -15,7 +15,7 @@ wifi:
|
|||||||
fast_connect: true
|
fast_connect: true
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: henry.int.jnf.me
|
broker: mqtt.srv.jnf.me
|
||||||
username: esphome
|
username: esphome
|
||||||
password: esphome
|
password: esphome
|
||||||
topic_prefix: esphome/basement
|
topic_prefix: esphome/basement
|
||||||
@@ -49,3 +49,7 @@ binary_sensor:
|
|||||||
filters:
|
filters:
|
||||||
- invert
|
- invert
|
||||||
- delayed_off: 5s
|
- delayed_off: 5s
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "Restart"
|
||||||
@@ -17,7 +17,7 @@ wifi:
|
|||||||
fast_connect: true
|
fast_connect: true
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: henry.int.jnf.me
|
broker: mqtt.srv.jnf.me
|
||||||
username: esphome
|
username: esphome
|
||||||
password: esphome
|
password: esphome
|
||||||
topic_prefix: esphome/bedroom-lightstrips
|
topic_prefix: esphome/bedroom-lightstrips
|
||||||
@@ -42,7 +42,18 @@ light:
|
|||||||
- addressable_rainbow
|
- addressable_rainbow
|
||||||
- addressable_color_wipe
|
- addressable_color_wipe
|
||||||
- addressable_scan
|
- addressable_scan
|
||||||
- addressable_twinkle
|
- 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_random_twinkle
|
||||||
- addressable_fireworks
|
- addressable_fireworks
|
||||||
- addressable_flicker
|
- addressable_flicker
|
||||||
@@ -59,12 +70,22 @@ light:
|
|||||||
- addressable_rainbow
|
- addressable_rainbow
|
||||||
- addressable_color_wipe
|
- addressable_color_wipe
|
||||||
- addressable_scan
|
- addressable_scan
|
||||||
- addressable_twinkle
|
- 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_random_twinkle
|
||||||
- addressable_fireworks
|
- addressable_fireworks
|
||||||
- addressable_flicker
|
- addressable_flicker
|
||||||
|
|
||||||
|
|
||||||
- platform: neopixelbus
|
- platform: neopixelbus
|
||||||
name: "Headboard Lights"
|
name: "Headboard Lights"
|
||||||
id: headboardlights
|
id: headboardlights
|
||||||
@@ -75,12 +96,21 @@ light:
|
|||||||
- addressable_rainbow
|
- addressable_rainbow
|
||||||
- addressable_color_wipe
|
- addressable_color_wipe
|
||||||
- addressable_scan
|
- addressable_scan
|
||||||
- addressable_twinkle
|
- addressable_twinkle:
|
||||||
- addressable_random_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_fireworks
|
||||||
- addressable_flicker
|
- addressable_flicker
|
||||||
|
|
||||||
|
|
||||||
- platform: neopixelbus
|
- platform: neopixelbus
|
||||||
name: "Tree Lights"
|
name: "Tree Lights"
|
||||||
id: treelights
|
id: treelights
|
||||||
@@ -91,7 +121,22 @@ light:
|
|||||||
- addressable_rainbow
|
- addressable_rainbow
|
||||||
- addressable_color_wipe
|
- addressable_color_wipe
|
||||||
- addressable_scan
|
- addressable_scan
|
||||||
- addressable_twinkle
|
- 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_random_twinkle
|
||||||
- addressable_fireworks
|
- addressable_fireworks
|
||||||
- addressable_flicker
|
- addressable_flicker
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "Restart"
|
||||||
101
bindicator.yaml
Normal file
101
bindicator.yaml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
esphome:
|
||||||
|
name: bindicator
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
logger:
|
||||||
|
level: INfO
|
||||||
|
baud_rate: 0
|
||||||
|
|
||||||
|
ota:
|
||||||
|
password: "bd2c004f2016fde90fbbb01706ad039a"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret ssid
|
||||||
|
password: !secret pass
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
broker: mqtt.srv.jnf.me
|
||||||
|
username: esphome
|
||||||
|
password: esphome
|
||||||
|
topic_prefix: esphome/bindicator
|
||||||
|
|
||||||
|
light:
|
||||||
|
- platform: neopixelbus
|
||||||
|
name: "Bindicator"
|
||||||
|
id: bindicator
|
||||||
|
variant: WS2812X
|
||||||
|
pin: 0
|
||||||
|
num_leds: 2
|
||||||
|
effects:
|
||||||
|
- lambda:
|
||||||
|
name: Pulsing
|
||||||
|
update_interval: 1s
|
||||||
|
lambda: |-
|
||||||
|
static int loopnum = 0;
|
||||||
|
auto call = id(bindicator).turn_on();
|
||||||
|
call.set_brightness(1);
|
||||||
|
call.set_transition_length(1000);
|
||||||
|
|
||||||
|
if (loopnum == 0) {
|
||||||
|
call.set_brightness(0.5);
|
||||||
|
} else if (loopnum == 1) {
|
||||||
|
call.set_brightness(1);
|
||||||
|
}
|
||||||
|
call.perform();
|
||||||
|
loopnum++;
|
||||||
|
if (loopnum == 30) loopnum = 0;
|
||||||
|
- platform: partition
|
||||||
|
name: "Bindicator - Bottom"
|
||||||
|
id: bindicatorbottom
|
||||||
|
segments:
|
||||||
|
- id: bindicator
|
||||||
|
from: 0
|
||||||
|
to: 0
|
||||||
|
effects:
|
||||||
|
- lambda:
|
||||||
|
name: Pulsing
|
||||||
|
update_interval: 1s
|
||||||
|
lambda: |-
|
||||||
|
static int loopnum = 0;
|
||||||
|
auto call = id(bindicatorbottom).turn_on();
|
||||||
|
call.set_brightness(1);
|
||||||
|
call.set_transition_length(1500);
|
||||||
|
|
||||||
|
if (loopnum == 0) {
|
||||||
|
call.set_brightness(0.5);
|
||||||
|
} else if (loopnum == 1) {
|
||||||
|
call.set_brightness(1);
|
||||||
|
}
|
||||||
|
call.perform();
|
||||||
|
loopnum++;
|
||||||
|
if (loopnum == 30) loopnum = 0;
|
||||||
|
|
||||||
|
- platform: partition
|
||||||
|
name: "Bindicator - Top"
|
||||||
|
id: bindicatortop
|
||||||
|
segments:
|
||||||
|
- id: bindicator
|
||||||
|
from: 1
|
||||||
|
to: 1
|
||||||
|
effects:
|
||||||
|
- lambda:
|
||||||
|
name: Pulsing
|
||||||
|
update_interval: 1s
|
||||||
|
lambda: |-
|
||||||
|
static int loopnum = 0;
|
||||||
|
auto call = id(bindicatortop).turn_on();
|
||||||
|
call.set_brightness(1);
|
||||||
|
call.set_transition_length(1500);
|
||||||
|
|
||||||
|
if (loopnum == 0) {
|
||||||
|
call.set_brightness(0.5);
|
||||||
|
} else if (loopnum == 1) {
|
||||||
|
call.set_brightness(1);
|
||||||
|
}
|
||||||
|
call.perform();
|
||||||
|
loopnum++;
|
||||||
|
if (loopnum == 30) loopnum = 0;
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 182 KiB |
56
garage.yaml
56
garage.yaml
@@ -15,7 +15,7 @@ wifi:
|
|||||||
fast_connect: true
|
fast_connect: true
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: henry.int.jnf.me
|
broker: mqtt.srv.jnf.me
|
||||||
username: esphome
|
username: esphome
|
||||||
password: esphome
|
password: esphome
|
||||||
topic_prefix: esphome/garage
|
topic_prefix: esphome/garage
|
||||||
@@ -63,33 +63,39 @@ binary_sensor:
|
|||||||
device_class: door
|
device_class: door
|
||||||
id: garage_door_open
|
id: garage_door_open
|
||||||
filters:
|
filters:
|
||||||
- invert:
|
- invert
|
||||||
on_press:
|
# on_press:
|
||||||
then:
|
# then:
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
id(garage_door_state).publish_state("Open");
|
# //id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||||
on_release:
|
# //id(garage_door).position = COVER_OPEN;
|
||||||
then:
|
# //id(garage_door_state).publish_state("Open");
|
||||||
- lambda: |-
|
# on_release:
|
||||||
id(garage_door).current_operation = COVER_OPERATION_CLOSING;
|
# then:
|
||||||
id(garage_door).publish_state();
|
# - lambda: |-
|
||||||
id(garage_door_state).publish_state("Moving");
|
# //id(garage_door).current_operation = COVER_OPERATION_CLOSING;
|
||||||
|
# //id(garage_door).publish_state();
|
||||||
|
# //id(garage_door_state).publish_state("Moving");
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: D1
|
pin: D1
|
||||||
id: garage_door_closed
|
id: garage_door_closed
|
||||||
filters:
|
filters:
|
||||||
- invert:
|
- invert
|
||||||
internal: true
|
internal: true
|
||||||
on_press:
|
# on_press:
|
||||||
then:
|
# then:
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
id(garage_door_state).publish_state("Closed");
|
# //id(garage_door).current_operation = COVER_OPERATION_IDLE;
|
||||||
on_release:
|
# //id(garage_door).position = COVER_CLOSED;
|
||||||
then:
|
# //id(garage_door_state).publish_state("Closed");
|
||||||
- lambda: |-
|
# on_release:
|
||||||
id(garage_door).current_operation = COVER_OPERATION_OPENING;
|
# then:
|
||||||
id(garage_door).publish_state();
|
# - lambda: |-
|
||||||
id(garage_door_state).publish_state("Moving");
|
# //id(garage_door).current_operation = COVER_OPERATION_OPENING;
|
||||||
|
# //id(garage_door).publish_state();
|
||||||
|
# //id(garage_door_state).publish_state("Moving");
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: D2
|
pin: D2
|
||||||
name: "Side Door"
|
name: "Side Door"
|
||||||
@@ -156,3 +162,7 @@ cover:
|
|||||||
binary_sensor.is_on: garage_door_open
|
binary_sensor.is_on: garage_door_open
|
||||||
then:
|
then:
|
||||||
- switch.turn_on: garage_door_switch
|
- switch.turn_on: garage_door_switch
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "Restart"
|
||||||
@@ -15,7 +15,7 @@ wifi:
|
|||||||
fast_connect: true
|
fast_connect: true
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: henry.int.jnf.me
|
broker: mqtt.srv.jnf.me
|
||||||
username: esphome
|
username: esphome
|
||||||
password: esphome
|
password: esphome
|
||||||
topic_prefix: esphome/houseplant
|
topic_prefix: esphome/houseplant
|
||||||
@@ -38,3 +38,7 @@ sensor:
|
|||||||
return (std::string) "https://jasonsplant.jaywll.co/newreading?v=" + to_string(int(id(moisture_level).state));
|
return (std::string) "https://jasonsplant.jaywll.co/newreading?v=" + to_string(int(id(moisture_level).state));
|
||||||
headers:
|
headers:
|
||||||
auth-key: !secret houseplant_key
|
auth-key: !secret houseplant_key
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "Restart"
|
||||||
127
laundry.yaml
127
laundry.yaml
@@ -1,127 +0,0 @@
|
|||||||
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
|
|
||||||
Reference in New Issue
Block a user