Skip to content

Commit 8dec84a

Browse files
committed
Update docs to explain push vs pull architecture
1 parent 6efab72 commit 8dec84a

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

trmnl-ha/DOCS.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The add-on persists schedules and configuration in the `/data` directory (mounte
1818

1919
This add-on can capture screenshots from **any website**, not just Home Assistant. Use it to convert any web content to e-ink optimized images.
2020

21+
> **Pull vs Push:** Pull (displays request images on-demand) and Push (scheduled webhooks POST images to displays). See [Pull vs Push Architecture](#pull-vs-push-architecture) for details.
22+
2123
### Quick Start (Docker)
2224

2325
```bash
@@ -207,6 +209,32 @@ The add-on supports two screenshot modes:
207209

208210
**Generic Mode**: Uses the `url` parameter to capture any public website. No authentication is injected, so it works with any publicly accessible URL.
209211

212+
#### Pull vs Push Architecture
213+
214+
Both modes support pull and push architectures:
215+
216+
| Architecture | How it works | Example |
217+
|--------------|--------------|---------|
218+
| **Pull** | Display requests image on-demand via HTTP GET | `curl "http://localhost:10000/lovelace/0?viewport=800x480"` |
219+
| **Push** | Add-on captures on schedule and POSTs to webhook | Cron schedule with webhook URL configured |
220+
221+
#### Example: Pull Architecture
222+
223+
Capture an HA dashboard on-demand:
224+
```bash
225+
curl "http://localhost:10000/lovelace/0?viewport=800x480&dithering" --output dashboard.png
226+
```
227+
228+
Capture an external image and convert to e-ink format:
229+
```bash
230+
curl "http://localhost:10000/?url=https://images.unsplash.com/photo-example&viewport=800x480&dithering&dither_method=floyd-steinberg&palette=bw" --output dithered.png
231+
```
232+
233+
Pull is useful for:
234+
- Displays that poll for images (ESPHome, custom e-ink setups)
235+
- One-off image conversions
236+
- Testing dithering settings
237+
210238
## Device Presets
211239

212240
The Web UI includes presets for 24+ common e-ink displays, including:

0 commit comments

Comments
 (0)