Skip to content

Commit aa07aaa

Browse files
committed
0.8.1
1 parent 0bb37b2 commit aa07aaa

21 files changed

+940
-67
lines changed

README.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# ESPHome Designer
22

3-
**A visual drag-and-drop editor for ESPHome displays (E-Ink, OLED, LCD, Touch), running right inside Home Assistant.**
3+
**A visual drag-and-drop editor for ESPHome displays (E-Ink, OLED, LCD, Touch), running as a Home Assistant integration or a standalone web app.**
4+
5+
<div align="center">
6+
<a href="https://github.com/sponsors/koosoli">
7+
<img src="https://img.shields.io/badge/Sponsor-❤️-ff69b4?style=for-the-badge&logo=github-sponsors" alt="Sponsor Project">
8+
</a>
9+
<br>
10+
<strong>If you find this project useful, consider <a href="https://github.com/sponsors/koosoli">supporting its development!</a></strong>
11+
</div>
412

513
<div align="center">
614
<a href="https://youtu.be/3AVGze6F_5o">
@@ -10,8 +18,11 @@
1018
<a href="https://youtu.be/3AVGze6F_5o">
1119
<img src="https://img.shields.io/badge/YouTube-Watch%20v0.8.0%20Overview-red?style=for-the-badge&logo=youtube&logoColor=white" alt="Watch Video">
1220
</a>
21+
<a href="https://koosoli.github.io/ESPHomeDesigner/">
22+
<img src="https://img.shields.io/badge/Live%20Demo-Try%20it%20now-blue?style=for-the-badge&logo=google-chrome&logoColor=white" alt="Live Demo">
23+
</a>
1324
<br>
14-
<strong>▶️ Click to watch the latest feature walkthrough</strong>
25+
<strong>▶️ Click to watch the latest feature walkthrough or try the demo!</strong>
1526
</div>
1627

1728
**No more hand-coding ESPHome display lambdas! 🎉**
@@ -24,7 +35,7 @@
2435

2536
Building a custom smart display for Home Assistant? Frustrated with manually writing C++ lambdas and guessing coordinates?
2637

27-
Design ESPHome displays right inside Home Assistant. This HACS integration offers a drag-and-drop editor with direct access to your sensor library via an intuitive entity picker.
38+
Design ESPHome displays right inside Home Assistant or via a standalone web browser. While available as a HACS integration, you can also use the [GitHub-hosted version](https://koosoli.github.io/ESPHomeDesigner/) with a Long-Lived Access Token to access your entities.
2839

2940
It enables you to build premium, touch-interactive dashboards for various ESP32-based devices (like the Seeed reTerminal, TRMNL, standard touch screens, and more) without writing a single line of display code.
3041

@@ -42,7 +53,16 @@ It enables you to build premium, touch-interactive dashboards for various ESP32-
4253

4354
## Quick Start
4455

45-
### 1. Install via HACS (Recommended)
56+
### 1. Try the Live Web Version (Easiest)
57+
58+
You can use the designer without installing anything!
59+
60+
1. Go to [koosoli.github.io/ESPHomeDesigner/](https://koosoli.github.io/ESPHomeDesigner/)
61+
2. Open **Editor Settings** (gear icon)
62+
3. Enter your Home Assistant URL and a **Long-Lived Access Token** (created in your HA profile)
63+
4. Add the designer URL to your HA `cors_allowed_origins` (see below)
64+
65+
### 2. Install via HACS (Recommended for Local Access)
4666

4767
1. Add `https://github.com/koosoli/ESPHomeDesigner` to HACS as a custom repository
4868
2. Search for "ESPHome Designer" and install
@@ -97,6 +117,17 @@ Once flashed, your device will come online.
97117
2. Your device should be discovered (or you can add it via the ESPHome integration).
98118
3. **Configure it** to ensure Home Assistant connects to its API.
99119

120+
### 🌐 Standalone / GitHub Hosting & CORS
121+
If you are using the GitHub-hosted version or any URL that is not your local Home Assistant IP, you **must** allow cross-origin requests.
122+
123+
Add this to your Home Assistant `configuration.yaml` and **restart**:
124+
125+
```yaml
126+
http:
127+
cors_allowed_origins:
128+
- https://koosoli.github.io
129+
```
130+
100131
### Philosophy: Design here, Automate there.
101132
102133
Think of this tool as the **Frontend Designer** for your physical display.
@@ -165,7 +196,7 @@ For stable results, stick to **Native Mode** (standard widgets without LVGL pref
165196
- **Power & Battery Management** - Monitoring, deep sleep support, and configurable refresh intervals
166197
- **Modern Canvas Interaction** - Zoom with the mouse wheel and pan with the middle mouse button
167198
- **Drag & Drop Workflow** - Drag widgets directly from the sidebar onto the canvas
168-
- **Modular Hardware Profiles** - Support for loading hardware profiles from external YAML packages
199+
- **Modular Hardware Profiles** - Support for loading hardware profiles from external YAML packages ([Learn how to write your own](hardware_recipes_guide.md))
169200
- **Experimental LVGL Support** - (Beta) Support for interactive LVGL widgets on capable devices
170201
- **Mobile Support** - Responsive UI designed to work on smaller screens and touch devices
171202
@@ -212,6 +243,7 @@ All exposed as Home Assistant entities for use in automations.
212243
- `frontend/editor.html` - Visual drag-and-drop editor UI
213244
- `esphome/reterminal_e1001_lambda.yaml` - Hardware template with step-by-step instructions
214245
- `font_ttf/font_ttf/materialdesignicons-webfont.ttf` - Icon font for widgets
246+
- `hardware_recipes_guide.md` - Guide for creating custom hardware profiles
215247
- `screenshots/` - Editor screenshots
216248

217249
## Troubleshooting

custom_components/reterminal_dashboard/frontend/editor.html

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
rel="stylesheet">
1515

1616
<link rel="stylesheet" href="editor.css">
17+
<link rel="icon" href="data:,">
1718
</head>
1819

1920
<body>
2021
<header class="main-header">
2122
<div class="main-header-title">
2223
<h2><span class="logo-dot"></span> ESPHome Designer</h2>
23-
<span>Visual YAML Editor <small style="opacity: 0.5; margin-left: 8px;">v0.8</small> <span
24+
<span>Visual YAML Editor <small style="opacity: 0.5; margin-left: 8px;">v0.8.1</small> <span
2425
id="currentLayoutDevice" style="margin-left:8px; color:var(--accent);"></span></span>
2526
</div>
2627
<div class="main-header-actions desktop-only">
@@ -484,7 +485,11 @@ <h2><span class="logo-dot"></span> ESPHome Designer</h2>
484485
</div>
485486
<strong id="currentLayoutName">Loading...</strong>
486487
</div>
487-
<button id="saveLayoutBtn" class="btn btn-secondary btn-full">Save Project</button>
488+
<div style="display: flex; gap: 4px;">
489+
<button id="saveLayoutBtn" class="btn btn-secondary" style="flex: 1;">Save Project</button>
490+
<button id="importProjectBtn" class="btn btn-secondary" style="flex: 1;">Import Project</button>
491+
</div>
492+
<input type="file" id="loadLayoutBtn" accept=".json" style="display:none;" />
488493
<button id="manageLayoutsBtn" class="btn btn-secondary btn-full" style="margin-top: 4px;">📁 Layout
489494
Manager</button>
490495
</div>
@@ -617,6 +622,18 @@ <h2><span class="logo-dot"></span> ESPHome Designer</h2>
617622
<option value="dark">Always Dark</option>
618623
</select>
619624
</div>
625+
<div class="field">
626+
<div class="prop-label">Layout Mode (LVGL)</div>
627+
<select id="pageSettingsLayoutMode" class="prop-input">
628+
<option value="absolute">Absolute Positioning</option>
629+
<option value="grid">Grid Layout</option>
630+
</select>
631+
<div id="field-grid-size" style="display:none; margin-top:8px;">
632+
<div class="prop-label">Grid Size (RxC)</div>
633+
<input id="pageSettingsGridSize" class="prop-input" type="text" placeholder="4x4" pattern="[0-9]+x[0-9]+" />
634+
<div style="font-size:10px; color:var(--muted); margin-top:4px;">Format: rows×columns, e.g. 2x3, 4x4</div>
635+
</div>
636+
</div>
620637
</div>
621638
<div class="modal-actions">
622639
<button id="pageSettingsSave" class="btn btn-secondary">Save Changes</button>
@@ -910,33 +927,60 @@ <h2><span class="logo-dot"></span> ESPHome Designer</h2>
910927
<span id="editorEntityCount" style="font-size:var(--fs-xs); opacity:0.6; margin-left:8px;"></span>
911928
</div>
912929
<div class="field" style="border-top:1px solid var(--border-subtle); padding-top:12px; margin-top:12px;">
913-
<div class="prop-label">Keyboard Shortcuts</div>
914-
<div style="font-size: var(--fs-xs); color: var(--muted); line-height: 2;">
915-
<div><kbd
916-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+Z</kbd>
917-
Undo</div>
918-
<div><kbd
919-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+Y</kbd>
920-
Redo</div>
921-
<div><kbd
922-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+C</kbd>
923-
Copy widget</div>
924-
<div><kbd
925-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+V</kbd>
926-
Paste widget</div>
927-
<div><kbd
928-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Delete</kbd>
929-
Remove selected widget</div>
930-
<div><kbd
931-
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Alt
932-
+ Drag</kbd> Disable snap guides</div>
930+
<span>Home Assistant Connection</span>
931+
</div>
932+
<div style="font-size:10px; opacity:0.6; margin-bottom:8px;">Configure this if you are using the GitHub-hosted
933+
version or an external URL.</div>
934+
<div class="field" style="display:flex; flex-direction:column; gap:8px;">
935+
<div id="haCorsTip"
936+
style="background: rgba(82, 199, 234, 0.1); border-left: 3px solid var(--accent); padding: 10px; border-radius: 4px; font-size: 10px; line-height: 1.4;">
937+
<strong>💡 Connection Tip:</strong><br>
938+
If requests are blocked, you may need to add <code id="haOriginPlaceholder">http://localhost:8000</code> to
939+
<code>cors_allowed_origins</code> in your Home Assistant <code>configuration.yaml</code> and
940+
<strong>restart HA</strong>.
941+
</div>
942+
<div>
943+
<div class="prop-label" style="font-size: 10px;">Base URL</div>
944+
<input type="text" id="haManualUrl" class="prop-input" placeholder="https://your-ha.duckdns.org:8123" />
945+
</div>
946+
<div>
947+
<div class="prop-label" style="font-size: 10px;">Long-Lived Access Token</div>
948+
<input type="password" id="haLlatToken" class="prop-input" placeholder="Paste your token here..." />
949+
</div>
950+
<div style="display:flex; gap:8px; align-items:center;">
951+
<button id="editorTestHaBtn" class="btn btn-secondary btn-xs" style="flex:1;">Test Connection</button>
952+
<div id="haTestResult" style="font-size:10px; line-height: 1.2;"></div>
933953
</div>
934954
</div>
935955
</div>
936-
<div class="modal-actions">
937-
<button id="editorSettingsDone" class="btn btn-secondary">Done</button>
956+
<div class="field" style="border-top:1px solid var(--border-subtle); padding-top:12px; margin-top:12px;">
957+
<div class="prop-label">Keyboard Shortcuts</div>
958+
<div style="font-size: var(--fs-xs); color: var(--muted); line-height: 2;">
959+
<div><kbd
960+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+Z</kbd>
961+
Undo</div>
962+
<div><kbd
963+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+Y</kbd>
964+
Redo</div>
965+
<div><kbd
966+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+C</kbd>
967+
Copy widget</div>
968+
<div><kbd
969+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Ctrl+V</kbd>
970+
Paste widget</div>
971+
<div><kbd
972+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Delete</kbd>
973+
Remove selected widget</div>
974+
<div><kbd
975+
style="background:var(--bg-input); padding:2px 6px; border-radius:3px; border:1px solid var(--border-subtle);">Alt
976+
+ Drag</kbd> Disable snap guides</div>
977+
</div>
938978
</div>
939979
</div>
980+
<div class="modal-actions">
981+
<button id="editorSettingsDone" class="btn btn-secondary">Done</button>
982+
</div>
983+
</div>
940984
</div>
941985

942986
<!-- Scripts -->

0 commit comments

Comments
 (0)