Edit esp-reterminal-e1001.yaml
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-reterminal-e1001.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# V0.8.0 2026-07-30 Removed the Appliances page and page-selection state; both white
|
||||
# buttons now show and check the single seven-job Jobs page.
|
||||
# V0.7.0 2026-07-30 4+3 job layout with plant watering jobs; smaller 190 px tiles
|
||||
# V0.6.2 2026-07-25 Standardized MQTT payloads: "ON"/"OFF" → "On"/"Off"
|
||||
# V0.6.1 2026-07-20 Allowed GPIO4/GPIO5 to be shared by the EXT1 deep-sleep
|
||||
@@ -44,18 +46,14 @@
|
||||
# - Display busy: GPIO13, inverted
|
||||
#:########################################################################################:#
|
||||
# OPERATION:
|
||||
# - The device sleeps for five minutes, then wakes and checks the currently displayed page.
|
||||
# - The device sleeps for five minutes, then wakes and checks the Jobs page.
|
||||
# - Either white button can wake the ESP32-S3 through EXT1 ANY_LOW.
|
||||
# - A left-button wake selects View Road Jobs; a right-button wake selects Appliances.
|
||||
# - The wake button is identified from the retained ESP32 EXT1 wake-status bitmask, so one
|
||||
# press both wakes the device and selects the intended page.
|
||||
# - Timer wakeups retain the page that was displayed before sleep.
|
||||
# - Per-page display hashes survive deep sleep. The e-paper panel refreshes only when the
|
||||
# selected page content, selected page, or visible awake/sleep indicator changes.
|
||||
# - Either white button shows and checks View Road Jobs and resets the activity timeout.
|
||||
# - The Jobs display hash survives deep sleep. The e-paper panel refreshes only when the
|
||||
# Jobs content or visible awake/sleep indicator changes.
|
||||
# - Two open eyes indicate an interactive/kept-awake panel. Two closed eyes are written to
|
||||
# the e-paper panel before entering deep sleep.
|
||||
# - After a button interaction, the device remains awake briefly so another page can be
|
||||
# selected without waiting through another complete wake-and-connect cycle.
|
||||
# - After a button interaction, the device remains awake briefly for further interaction.
|
||||
# - Home Assistant entity data is imported through the encrypted ESPHome native API.
|
||||
# - MQTT is used only for retained deep-sleep control and retained awake/sleep status.
|
||||
#
|
||||
@@ -83,12 +81,12 @@ substitutions:
|
||||
# Device Naming
|
||||
device_name: "esp-reterminal-e1001"
|
||||
friendly_name: "reTerminal E1001 Dashboard"
|
||||
description_comment: "Seeed Studio reTerminal E1001 two-page Home Assistant jobs and appliance status dashboard with five-minute deep sleep, button wake and panel-state eyes. (Layout V2.0)"
|
||||
description_comment: "Seeed Studio reTerminal E1001 Home Assistant Jobs dashboard with five-minute deep sleep, button wake and panel-state eyes. (Layout V2.0)"
|
||||
device_area: "Lounge"
|
||||
|
||||
# Project Naming
|
||||
project_name: "SeeedStudio.reTerminal-E1001"
|
||||
project_version: "v0.7.0"
|
||||
project_version: "v0.8.0"
|
||||
|
||||
# Passwords and Secrets
|
||||
api_key: !secret esp-api_key
|
||||
@@ -104,7 +102,6 @@ substitutions:
|
||||
# Device Settings
|
||||
log_level: "INFO"
|
||||
display_check_interval: "30s"
|
||||
finished_highlight_seconds: "3600"
|
||||
job_hours_display_limit: "48"
|
||||
|
||||
# Deep Sleep Settings
|
||||
@@ -187,28 +184,11 @@ esphome:
|
||||
// is explicitly kept awake through MQTT.
|
||||
id(panel_awake_indicator) = id(woke_by_button);
|
||||
|
||||
const int previous_page = id(current_page);
|
||||
|
||||
if (id(woke_by_button)) {
|
||||
// GPIO5 is the left white button: Jobs.
|
||||
if ((id(wakeup_pin_mask) & (1ULL << 5)) != 0) {
|
||||
id(current_page) = 0;
|
||||
}
|
||||
// GPIO4 is the right white button: Appliances.
|
||||
else if ((id(wakeup_pin_mask) & (1ULL << 4)) != 0) {
|
||||
id(current_page) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
id(page_changed_on_wake) = id(current_page) != previous_page;
|
||||
|
||||
ESP_LOGI(
|
||||
"wakeup",
|
||||
"Wake cause=%d EXT1 mask=0x%llX page=%d changed=%s",
|
||||
"Wake cause=%d EXT1 mask=0x%llX",
|
||||
id(wakeup_cause),
|
||||
static_cast<unsigned long long>(id(wakeup_pin_mask)),
|
||||
id(current_page) + 1,
|
||||
id(page_changed_on_wake) ? "yes" : "no"
|
||||
static_cast<unsigned long long>(id(wakeup_pin_mask))
|
||||
);
|
||||
|
||||
#:####################################################################################:#
|
||||
@@ -257,7 +237,6 @@ esphome:
|
||||
lambda: |-
|
||||
if (!id(homeassistant_time).now().is_valid()) return false;
|
||||
|
||||
if (id(current_page) == 0) {
|
||||
return
|
||||
id(job_dog_feeding_morning_state).has_state() &&
|
||||
id(job_dog_feeding_evening_state).has_state() &&
|
||||
@@ -273,44 +252,15 @@ esphome:
|
||||
id(job_rubbish_removed_due_ts).has_state() &&
|
||||
id(job_water_tv_pot_plant_due_ts).has_state() &&
|
||||
id(job_water_table_pot_plant_due_ts).has_state();
|
||||
}
|
||||
|
||||
return
|
||||
id(appliance_washing_state).has_state() &&
|
||||
id(appliance_dryer_state).has_state() &&
|
||||
id(appliance_main_dishwasher_state).has_state() &&
|
||||
id(appliance_downstairs_dishwasher_state).has_state() &&
|
||||
id(appliance_evcharger_32a_state).has_state() &&
|
||||
id(appliance_evcharger_16a_state).has_state() &&
|
||||
id(appliance_ryobi_left_state).has_state() &&
|
||||
id(appliance_ryobi_right_state).has_state() &&
|
||||
id(appliance_pool_pump_state).has_state() &&
|
||||
id(appliance_3d_printer_state).has_state();
|
||||
timeout: "${ha_data_timeout}"
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return id(current_page) == 0;
|
||||
then:
|
||||
- display.page.show: page_jobs
|
||||
else:
|
||||
- display.page.show: page_appliances
|
||||
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return id(homeassistant_time).now().is_valid();
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: |-
|
||||
return id(page_changed_on_wake);
|
||||
then:
|
||||
- script.execute:
|
||||
id: refresh_display_if_changed
|
||||
force: true
|
||||
else:
|
||||
- script.execute:
|
||||
id: refresh_display_if_changed
|
||||
force: false
|
||||
@@ -383,7 +333,7 @@ spi:
|
||||
|
||||
#:########################################################################################:#
|
||||
# HOME ASSISTANT TIME:
|
||||
# Used for the date header, job countdowns and appliance completion age.
|
||||
# Used for the date header and job countdowns.
|
||||
# https://esphome.io/components/time/homeassistant.html
|
||||
#:########################################################################################:#
|
||||
time:
|
||||
@@ -397,28 +347,17 @@ time:
|
||||
|
||||
#:########################################################################################:#
|
||||
# GLOBALS:
|
||||
# Page, persistent display hashes, wake information and sleep-control state
|
||||
# Persistent display hash, wake information and sleep-control state
|
||||
# https://esphome.io/components/globals.html
|
||||
#:########################################################################################:#
|
||||
globals:
|
||||
# The currently visible page survives deep sleep so timer wakes retain it.
|
||||
- id: current_page
|
||||
type: int
|
||||
restore_value: yes
|
||||
initial_value: "0"
|
||||
|
||||
# A separate persistent hash is kept for each page. These are updated only when the
|
||||
# visible content really changes, avoiding a flash write on every five-minute wake.
|
||||
# The persistent Jobs hash is updated only when the visible content really changes,
|
||||
# avoiding a flash write on every five-minute wake.
|
||||
- id: last_jobs_signature_hash
|
||||
type: uint32_t
|
||||
restore_value: yes
|
||||
initial_value: "0"
|
||||
|
||||
- id: last_appliances_signature_hash
|
||||
type: uint32_t
|
||||
restore_value: yes
|
||||
initial_value: "0"
|
||||
|
||||
- id: display_update_required
|
||||
type: bool
|
||||
restore_value: no
|
||||
@@ -439,13 +378,8 @@ globals:
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
|
||||
- id: page_changed_on_wake
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: "false"
|
||||
|
||||
# Desired icon currently rendered in the display header. This is included in the
|
||||
# per-page signature, so changing eye state refreshes only when required.
|
||||
# Jobs signature, so changing eye state refreshes only when required.
|
||||
- id: panel_awake_indicator
|
||||
type: bool
|
||||
restore_value: no
|
||||
@@ -505,20 +439,6 @@ font:
|
||||
id: font_job_status
|
||||
size: 23
|
||||
|
||||
- file:
|
||||
type: gfonts
|
||||
family: Inter
|
||||
weight: 700
|
||||
id: font_appliance_title
|
||||
size: 16
|
||||
|
||||
- file:
|
||||
type: gfonts
|
||||
family: Inter
|
||||
weight: 700
|
||||
id: font_appliance_status
|
||||
size: 17
|
||||
|
||||
#:########################################################################################:#
|
||||
# JOB AND STATUS ICONS:
|
||||
# Material Design Icons are downloaded and embedded at compile time.
|
||||
@@ -605,7 +525,7 @@ image:
|
||||
|
||||
#:########################################################################################:#
|
||||
# DISPLAY:
|
||||
# Two pages with rounded status tiles.
|
||||
# Single Jobs page with rounded status tiles.
|
||||
# The display itself never runs on a blind polling interval. All refreshes pass through
|
||||
# refresh_display_if_changed before the physical e-paper update occurs.
|
||||
# https://esphome.io/components/display/waveshare_epaper.html
|
||||
|
||||
Reference in New Issue
Block a user