Progress
This commit is contained in:
6
Desk Clamp Design.txt
Normal file
6
Desk Clamp Design.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Things I could do with a desk clamp:
|
||||
- Strain relief for usb cables (3 or more)
|
||||
- Holster for soldering iron
|
||||
- Holsters for two magnifying glasses
|
||||
|
||||
Consider small one (usb cables) on right, larger one (magnifying glasses and maybe soldering iron) on left
|
||||
@@ -1,12 +1,37 @@
|
||||
esphome:
|
||||
name: bedroom_tkm1
|
||||
platform: ESP32
|
||||
board: esp-wrover-kit
|
||||
board: wemos_d1_mini32 #esp-wrover-kit
|
||||
on_boot:
|
||||
priority: 900
|
||||
- priority: -100 #900 tried down to 500
|
||||
then:
|
||||
- lambda: |-
|
||||
id(wake_up_reason) = log(esp_sleep_get_ext1_wakeup_status())/log(2);
|
||||
id(wake_up_reason1) = esp_sleep_get_ext1_wakeup_status();
|
||||
- priority: 900 #900 tried down to 500
|
||||
then:
|
||||
- lambda: |-
|
||||
id(wake_up_reason) = esp_sleep_get_ext1_wakeup_status();
|
||||
|
||||
|
||||
#esp_default_wake_deep_sleep();
|
||||
#id(wake_up_reason) = log(esp_sleep_get_ext1_wakeup_status())/log(2);
|
||||
|
||||
# - priority: 300.0 # after sensor setup, before WIFI initialization
|
||||
# then:
|
||||
# - light.turn_on:
|
||||
# id: emergency_light
|
||||
# brightness: 100%
|
||||
# red: 100%
|
||||
# green: 0%
|
||||
# blue: 0%
|
||||
# - priority: 225.0 # after WIFI initialization
|
||||
# then:
|
||||
# - light.turn_on:
|
||||
# id: emergency_light
|
||||
# brightness: 100%
|
||||
# red: 0%
|
||||
# green: 0%
|
||||
# blue: 100%
|
||||
|
||||
wifi:
|
||||
ssid: "Meneely"
|
||||
@@ -41,7 +66,7 @@ mqtt:
|
||||
discovery: True
|
||||
username: ha
|
||||
password: lorrie
|
||||
keepalive: 2s
|
||||
# keepalive: 2s
|
||||
birth_message:
|
||||
topic: bedroom_tkm1/status
|
||||
payload: coming_online_birth
|
||||
@@ -56,12 +81,12 @@ mqtt:
|
||||
|
||||
deep_sleep:
|
||||
run_duration: 20s
|
||||
sleep_duration: 1min #24h
|
||||
sleep_duration: 40s #24h
|
||||
esp32_ext1_wakeup:
|
||||
pins: #[12] #, 14, 27]
|
||||
- GPIO12
|
||||
- GPIO14
|
||||
- GPIO27
|
||||
pins:
|
||||
- 4 #yellow
|
||||
- 12 #orange
|
||||
- 32 #green
|
||||
mode: ANY_HIGH
|
||||
id: deep_sleep_1
|
||||
|
||||
@@ -70,42 +95,50 @@ globals:
|
||||
type: int
|
||||
restore_value: no
|
||||
initial_value: '0'
|
||||
|
||||
- id: wake_up_reason1
|
||||
type: int
|
||||
restore_value: no
|
||||
initial_value: '0'
|
||||
sensor:
|
||||
- platform: template
|
||||
name: "Remote Control Wake Reason"
|
||||
accuracy_decimals: 0
|
||||
lambda: |-
|
||||
return id(wake_up_reason);
|
||||
on_value:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(wake_up_reason) == 12;'
|
||||
then:
|
||||
- logger.log: "12, Green wire touched"
|
||||
else:
|
||||
- logger.log: "Non-green wire touched"
|
||||
- platform: template
|
||||
name: "Remote Control Wake Reason1"
|
||||
accuracy_decimals: 0
|
||||
lambda: |-
|
||||
return id(wake_up_reason1);
|
||||
# on_value:
|
||||
# then:
|
||||
# - if:
|
||||
# condition:
|
||||
# lambda: 'return id(wake_up_reason) == 4;'
|
||||
# then:
|
||||
# - logger.log: "4, yellow wire touched"
|
||||
# else:
|
||||
# - logger.log: "Non-yellow wire touched"
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO4
|
||||
mode: INPUT_PULLUP
|
||||
# filters:
|
||||
# - delayed_on: 10ms ### <---- debounce time, was 100ms
|
||||
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
||||
name: "TKM Test 4 (yellow)"
|
||||
id: tkm_test_4
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO12
|
||||
mode: INPUT_PULLUP
|
||||
filters:
|
||||
- delayed_on: 10ms ### <---- debounce time, was 100ms
|
||||
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
||||
name: "TKM Test 12 (Green)"
|
||||
name: "TKM Test 12 (orange)"
|
||||
id: tkm_test_12
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO14
|
||||
number: GPIO32
|
||||
mode: INPUT_PULLUP
|
||||
name: "TKM Test 14 (Yellow)"
|
||||
id: tkm_test_14
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO27
|
||||
mode: INPUT_PULLUP
|
||||
name: "TKM Test 27 (Orange)"
|
||||
id: tkm_test27
|
||||
name: "TKM Test 32 (green)"
|
||||
id: tkm_test32
|
||||
|
||||
6
bedroom_tkm1_off/partitions.csv
Normal file
6
bedroom_tkm1_off/partitions.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
nvs, data, nvs, 0x009000, 0x005000,
|
||||
otadata, data, ota, 0x00e000, 0x002000,
|
||||
app0, app, ota_0, 0x010000, 0x1C0000,
|
||||
app1, app, ota_1, 0x1D0000, 0x1C0000,
|
||||
eeprom, data, 0x99, 0x390000, 0x001000,
|
||||
spiffs, data, spiffs, 0x391000, 0x00F000
|
||||
|
4
esp32_chip_list.txt
Normal file
4
esp32_chip_list.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Name in ESPHome IP assigned Board Chip ID Description
|
||||
bigblue1 192.168.87.31 ESP32/esp-wrover-kit ESP32D0WDQ5 (revision 1) Battery shield, 18650
|
||||
bedroom_tkm1 192.168.87.36 ESP32/wemos_d1_mini32 ESP32D0WDQ6 (revision 1) D1 mini, 4xAmazon 2021-01-20. Doesn't give pin ID used to wake from deep sleep
|
||||
esp32_cam1 192.168.87.17 ESP32/esp32cam ESP32-CAM, 2xAmazon 2020-12-17
|
||||
@@ -1 +1 @@
|
||||
esphome bedroom_tkm1.yaml run --upload-port /dev/ttyS4
|
||||
esphome bedroom_tkm1.yaml run --upload-port /dev/ttyS9
|
||||
|
||||
Reference in New Issue
Block a user