diff --git a/bedroom_lilygo_t7v15.yaml b/bedroom_lilygo_t7v15.yaml new file mode 100644 index 0000000..71cce19 --- /dev/null +++ b/bedroom_lilygo_t7v15.yaml @@ -0,0 +1,97 @@ +substitutions: + device_name: bedroom_tkm_lily1 + device_ip: 192.168.87.44 + +esphome: + name: ${device_name} + platform: ESP32 + board: esp32dev + on_boot: + - priority: 900 #900 tried down to 500 + then: + - lambda: |- + id(wake_up_reason) = log(esp_sleep_get_ext1_wakeup_status())/log(2); + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + manual_ip: + static_ip: ${device_ip} + gateway: 192.168.86.1 + subnet: 255.255.254.0 + fast_connect: True + +# captive_portal: + +# Enable logging +logger: + level: INFO + +# Enable Home Assistant API +api: + +ota: +<<: !include standard_mqtt.yaml +# mqtt: +# broker: !secret mqtt_broker +# discovery: True +# username: !secret mqtt_username +# password: !secret mqtt_password +# # keepalive: 2s +# birth_message: +# topic: ${device_name}/status +# payload: coming_online_birth +# will_message: +# topic: ${device_name}/status +# payload: going_offline_will +# on_message: +# topic: ${device_name}/ota_mode +# payload: 'ON' +# then: +# - deep_sleep.prevent: deep_sleep_1 + +deep_sleep: + run_duration: 20s + sleep_duration: 40s #24h + esp32_ext1_wakeup: + pins: + - 33 #yellow + - 34 #orange + - 35 #green + mode: ANY_HIGH + id: deep_sleep_1 + +globals: + - id: wake_up_reason + 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); + +binary_sensor: + - platform: gpio + pin: + number: GPIO33 + 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 33 (yellow)" + id: tkm_test_33 + - platform: gpio + pin: + number: GPIO34 + mode: INPUT_PULLUP + name: "TKM Test 34 (orange)" + id: tkm_test_34 + - platform: gpio + pin: + number: GPIO35 + mode: INPUT_PULLUP + name: "TKM Test 35 (green)" + id: tkm_test35 diff --git a/bedroom_tkm1_off/partitions.csv b/bedroom_tkm_lily1/partitions.csv similarity index 100% rename from bedroom_tkm1_off/partitions.csv rename to bedroom_tkm_lily1/partitions.csv diff --git a/esp32_chip_list.txt b/chip_list_esp32.txt similarity index 60% rename from esp32_chip_list.txt rename to chip_list_esp32.txt index ebded4e..7e78a67 100644 --- a/esp32_chip_list.txt +++ b/chip_list_esp32.txt @@ -1,4 +1,6 @@ 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 \ No newline at end of file +esp32_cam1 192.168.87.17 ESP32/esp32cam ESP32-CAM, 2xAmazon 2020-12-17 +bedroom_tkm_lily1 192.168.87.44 ESP32 LilyGo T7 V1.5, with USB and battery +sonoffmini_1 192.168.87.41 ESP8266/esp01_1m Sonoff Mini \ No newline at end of file diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..8a7896e --- /dev/null +++ b/notes.txt @@ -0,0 +1,2 @@ +How do I update to the latest version?ΒΆ +pip install -U esphome diff --git a/standard_mqtt.yaml b/standard_mqtt.yaml new file mode 100644 index 0000000..b40e9f5 --- /dev/null +++ b/standard_mqtt.yaml @@ -0,0 +1,17 @@ +mqtt: + broker: !secret mqtt_broker + discovery: True + username: !secret mqtt_username + password: !secret mqtt_password + # keepalive: 2s + birth_message: + topic: ${device_name}/status + payload: coming_online_birth + will_message: + topic: ${device_name}/status + payload: going_offline_will + on_message: + topic: ${device_name}/ota_mode + payload: 'ON' + then: + - deep_sleep.prevent: deep_sleep_1 \ No newline at end of file