Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@

# local secrets file, not to be committed to version control
secrets.yaml
interface-panel*.yaml
interface-panel*.yaml

# the esphome venv
venv
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,37 @@ endif

flash-main:
@echo "Flashing the MAIN firmware..."
esphome run $(OPTIONS) $(CONFIG_FILE)
source venv/bin/activate && \
esphome run $(OPTIONS) $(CONFIG_FILE)

upload-main:
@echo "Uploading the MAIN firmware..."
esphome upload $(OPTIONS) $(CONFIG_FILE)
source venv/bin/activate && \
esphome upload $(OPTIONS) $(CONFIG_FILE)

validate-main:
@echo "Validating the MAIN firmware..."
esphome config $(CONFIG_FILE) >$(CONFIG_FILE).validated
source venv/bin/activate && \
esphome config $(CONFIG_FILE) >$(CONFIG_FILE).validated


# test with SDL emulator in local

test-local:
@echo "Running local tests (without flashing)..."
esphome run --no-logs dev-sdl.yaml
source venv/bin/activate && \
esphome run --no-logs dev-sdl.yaml

test-validate:
@echo "Validating the configuration files..."
#esphome config main.yaml
esphome config dev-sdl.yaml >dev-sdl.yaml.validated
source venv/bin/activate && \
esphome config dev-sdl.yaml >dev-sdl.yaml.validated


# initial test, just for historical records:

flash-self-contained:
@echo "Flashing the self-contained ESPHome device..."
esphome run $(OPTIONS) self-contained.yaml
source venv/bin/activate && \
esphome run $(OPTIONS) self-contained.yaml
88 changes: 88 additions & 0 deletions dev-sdl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,90 @@ substitutions:
wifi_password: "your_wifi_password_here"
wifi_ap_password: "your_wifi_ap_password_here"



# --------------------------------------------------------------------------
# Features
# --------------------------------------------------------------------------

tab_rooms_enabled: "1"
tab_heating_set_temp_enabled: "1"
tab_heating_details_enabled: "1"
tab_cover_enabled: "0"
tab_scenes_enabled: "0"
tab_info_enabled: "0"

# --------------------------------------------------------------------------
# Room configuration
# Each room needs an internal ID (used as widget ID prefix), a display name,
# and Home Assistant entity IDs for its sensors/actuators.
# --------------------------------------------------------------------------

num_rooms: '4'

# Room 1
room1_id: "room1"
room1_name: "Room 1"
room1_ha_temperature_sensor: "sensor.room1_temperature"
room1_ha_humidity_sensor: "sensor.room1_humidity"
room1_ha_window_contact_sensor: "binary_sensor.room1_window_contact"
room1_ha_floor_heating_switch: "switch.room1_floor_heating"
room1_ha_cover: "cover.room1_cover"

# Room 2
room2_id: "room2"
room2_name: "Room 2"
room2_ha_temperature_sensor: "sensor.room2_temperature"
room2_ha_humidity_sensor: "sensor.room2_humidity"
room2_ha_window_contact_sensor: "binary_sensor.room2_window_contact"
room2_ha_floor_heating_switch: "switch.room2_floor_heating"
room2_ha_cover: "cover.room2_cover"

# Room 3
room3_id: "room3"
room3_name: "Room 3"
room3_ha_temperature_sensor: "sensor.room3_temperature"
room3_ha_humidity_sensor: "sensor.room3_humidity"
room3_ha_window_contact_sensor: "binary_sensor.room3_window_contact"
room3_ha_floor_heating_switch: "switch.room3_floor_heating"
room3_ha_cover: "cover.room3_cover"

# Room 4
room4_id: "room4"
room4_name: "Room 4"
room4_ha_temperature_sensor: "sensor.room4_temperature"
room4_ha_humidity_sensor: "sensor.room4_humidity"
room4_ha_window_contact_sensor: "binary_sensor.room4_window_contact"
room4_ha_floor_heating_switch: "switch.room4_floor_heating"
room4_ha_cover: "cover.room4_cover"


# --------------------------------------------------------------------------
# Temperature setting helpers (e.g. daytime / nighttime setpoints)
# --------------------------------------------------------------------------

# Temperature setting 1
temp_setting_daytime_id: "temp_setting_daytime"
temp_setting_daytime_label: "Setting 1"
temp_setting_daytime_ha_sensor: "input_number.temp_setting_daytime"

# Temperature setting 2
temp_setting_nighttime_id: "temp_setting_nighttime"
temp_setting_nighttime_label: "Setting 2"
temp_setting_nighttime_ha_sensor: "input_number.temp_setting_nighttime"

# Current target temperature sensor
ha_temperature_target_sensor: "sensor.temperature_target"

# --------------------------------------------------------------------------
# Scene configuration
# --------------------------------------------------------------------------

scene1_entity_id: "scene.scene1"
scene1_name: "Scene 1"
scene2_entity_id: "scene.scene2"
scene2_name: "Scene 2"

# --------------------------------------------------------------------------
# Everything below this line is not really meant to be overridden by the user, but you can if you want to
# --------------------------------------------------------------------------
Expand Down Expand Up @@ -74,6 +158,10 @@ esphome:
name: sdl-480px-test
friendly_name: SDL 480px-test
comment: "ESPHome HomeAssistant General Purpose Interface Panel"
on_boot:
then:
- script.execute: hide_unwanted_rooms
- script.execute: hide_unwanted_tabs

# Webserver is exposed under regular use
#web_server:
Expand Down
56 changes: 56 additions & 0 deletions example-instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,61 @@ packages:
wifi_password: "supersecretpassword"
wifi_ap_password: "deadbeefdead"
ota_password: "deadbeefdeadbeefdeadbeefdeadbeef"

# Room 1
room1_id: "bagno_p1"
room1_name: "Bagno"
room1_ha_temperature_sensor: "sensor.lumi_sensore_ambientale_bagno_p1_temperature"
room1_ha_humidity_sensor: "sensor.lumi_sensore_ambientale_bagno_p1_humidity"
room1_ha_window_contact_sensor: "binary_sensor.lumi_contatto_finestra_bagno_p1_contact"
room1_ha_floor_heating_switch: "switch.floorheating_p1_relay_bagno"
room1_ha_cover: "cover.tapparella_bagno_piano_primo"

# Room 2
room2_id: "cameretta_verde"
room2_name: "Cam. Verde"
room2_ha_temperature_sensor: "sensor.lumi_sensore_ambientale_cameretta_verde_temperature"
room2_ha_humidity_sensor: "sensor.lumi_sensore_ambientale_cameretta_verde_humidity"
room2_ha_window_contact_sensor: "binary_sensor.lumi_contatto_portafinestra_cam_verde_contact"
room2_ha_floor_heating_switch: "switch.floorheating_p1_relay_camera_verde"
room2_ha_cover: "cover.tapparella_cameretta_verde"

# Room 3
room3_id: "cameretta_gialla"
room3_name: "Cam. Gialla"
room3_ha_temperature_sensor: "sensor.tasmota_sht4x_temperature"
room3_ha_humidity_sensor: "sensor.tasmota_sht4x_humidity"
room3_ha_window_contact_sensor: "binary_sensor.lumi_contatto_cameretta_gialla_contact"
room3_ha_floor_heating_switch: "switch.floorheating_p1_relay_camera_gialla"
room3_ha_cover: "cover.tapparella_cameretta_gialla"

# Room 4
room4_id: "cameretta_arancione"
room4_name: "Cam. Arancio"
room4_ha_temperature_sensor: "sensor.broadlink_smart_ir_remote_p1_cameretta_arancione_temperatura"
room4_ha_humidity_sensor: "sensor.broadlink_smart_ir_remote_p1_cameretta_arancione_umidita"
room4_ha_window_contact_sensor: "binary_sensor.lumi_contatto_cameretta_arancione_contact"
room4_ha_floor_heating_switch: "switch.floorheating_p1_relay_camera_arancione"
room4_ha_cover: "cover.tapparella_cameretta_arancione_2"

# Temperature setting 1 (daytime)
temp_setting_daytime_id: "diurno_p1"
temp_setting_daytime_label: "Giorno"
temp_setting_daytime_ha_sensor: "input_number.temperatura_riscaldamento_diurno_stanze_p1"

# Temperature setting 2 (nighttime)
temp_setting_nighttime_id: "notturno_p1"
temp_setting_nighttime_label: "Notte"
temp_setting_nighttime_ha_sensor: "input_number.temperatura_riscaldamento_notturno_stanze_p1"

# Current target temperature sensor
ha_temperature_target_sensor: "sensor.temperatura_target_attuale_p1"

# Scenes
scene1_entity_id: "scene.tapparelle_aperte_max"
scene1_name: "Tapparelle Aperte Max"
scene2_entity_id: "scene.riposino"
scene2_name: "Riposino"

ref: main # optional
refresh: 1d # optional
1 change: 1 addition & 0 deletions include/lvgl_box_cover_control.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# - ha_cover_id

obj:
id: cover_box_container_${room_id}
bg_color: $bg_color
border_width: 2
border_color: $border_color
Expand Down
2 changes: 1 addition & 1 deletion include/lvgl_box_room_heating_status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ obj:
# the height of this OBJ is declared in the parent container!
# I couldn't get layout to render correctly if I put the height here
# (not sure why)

id: "box_room_heating_status_${room_id}"
bg_color: $bg_color
border_width: 2
border_color: $border_color
Expand Down
1 change: 1 addition & 0 deletions include/lvgl_box_room_status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# - room_name

obj:
id: "box_room_status_${room_id}"
bg_color: $bg_color
border_width: 2
border_color: $border_color
Expand Down
17 changes: 16 additions & 1 deletion include/lvgl_page_main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File: lvgl_ui_design.yaml
# File: lvgl_page_main.yaml
# Purpose: Declares the main LVGL page layout, tabs, and included UI
# components for the panel.
#
Expand Down Expand Up @@ -53,27 +53,42 @@ lvgl:
# each of this tab has
# FULL WIDTH AVAILABLE: 480px
# HEIGHT AVAILABLE: 240px
#
# IMPORTANT: if you change the tab order, please also
# update the hide_unwanted_tabs script

# index:0
- name: "${mdi_thermometer_water}"
id: tab_rooms
scrollable: false
widgets: !include lvgl_tab_rooms.yaml

# index:1
- name: "${mdi_thermometer_chevron_up}"
id: tab_heating_set_temp
scrollable: false
widgets: !include lvgl_tab_heating_set_temp.yaml

# index:2
- name: "${mdi_radiator}"
id: tab_heating_details
scrollable: false
widgets: !include lvgl_tab_heating_details.yaml

# index:3
- name: "${mdi_window_shutter}"
id: tab_covers
scrollable: false
widgets: !include lvgl_tab_covers.yaml

# index:4
- name: "${mdi_cog}"
id: tab_scenes
scrollable: false
widgets: !include lvgl_tab_scenes.yaml

# index:5
- name: "${mdi_information}"
id: tab_info
scrollable: false
widgets: !include lvgl_tab_info.yaml
4 changes: 2 additions & 2 deletions include/lvgl_row_current_temperature.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File: lvgl_current_temperature_row.yaml
# Purpose: A row of widegets showing current TARGET temp
# File: lvgl_row_current_temperature.yaml
# Purpose: A row of widgets showing the current TARGET temperature
#
# List of subtitutions:
# - id
Expand Down
4 changes: 2 additions & 2 deletions include/lvgl_row_set_temperature.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# File: lvgl_set_temperature_row.yaml
# File: lvgl_row_set_temperature.yaml
# Purpose: Defines a reusable temperature-control row with icon, label,
# spinbox, and +/- buttons, to control one single temperature.
#
# List of subtitutions:
# List of substitutions:
# - id
# - icon
# - time_schedule
Expand Down
33 changes: 21 additions & 12 deletions include/lvgl_tab_covers.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# File: lvgl_tab_covers.yaml
# Purpose: Defines a reusable tab for controlling covers (blinds, shutters, etc.)
#
# List of substitutions:
# - room1_id, room1_name, room1_ha_cover
# - room2_id, room2_name, room2_ha_cover
# - room3_id, room3_name, room3_ha_cover
# - room4_id, room4_name, room4_ha_cover
#

- obj:
scrollable: false
Expand All @@ -13,32 +22,32 @@
- !include {
file: lvgl_box_cover_control.yaml,
vars: {
room_id: "bagno_p1",
room_name: "Bagno",
ha_cover_id: "cover.tapparella_bagno_piano_primo"
room_id: "${room1_id}",
room_name: "${room1_name}",
ha_cover_id: "${room1_ha_cover}"
}
}
- !include {
file: lvgl_box_cover_control.yaml,
vars: {
room_id: "cameretta_gialla",
room_name: "Cam. Gialla",
ha_cover_id: "cover.tapparella_cameretta_gialla"
room_id: "${room2_id}",
room_name: "${room2_name}",
ha_cover_id: "${room2_ha_cover}"
}
}
- !include {
file: lvgl_box_cover_control.yaml,
vars: {
room_id: "cameretta_arancione",
room_name: "Cam. Arancio",
ha_cover_id: "cover.tapparella_cameretta_arancione_2"
room_id: "${room3_id}",
room_name: "${room3_name}",
ha_cover_id: "${room3_ha_cover}"
}
}
- !include {
file: lvgl_box_cover_control.yaml,
vars: {
room_id: "cameretta_verde",
room_name: "Cam. Verde",
ha_cover_id: "cover.tapparella_cameretta_verde"
room_id: "${room4_id}",
room_name: "${room4_name}",
ha_cover_id: "${room4_ha_cover}"
}
}
Loading