Skip to content

Commit 7ee6bca

Browse files
committed
docs: Add opendisplay.md
1 parent 072a25d commit 7ee6bca

1 file changed

Lines changed: 115 additions & 0 deletions

File tree

docs/opendisplay.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Setting Up OpenDisplay for Image Push
2+
3+
How to get fresh images onto a battery-powered OpenDisplay device, even
4+
though it spends most of its time asleep.
5+
6+
## Why this is needed
7+
8+
To save battery, an OpenDisplay device spends most of its life in deep
9+
sleep with its Bluetooth radio off. It only wakes up briefly, on a timer
10+
or when you press its wake button, and is reachable over Bluetooth for a
11+
short window before going back to sleep. If nothing connects and pushes an
12+
image during that window, the display goes back to sleep with whatever was
13+
on screen before.
14+
15+
So the setup has two parts:
16+
17+
1. Configure the device to wake up regularly (e.g. every 5 minutes).
18+
2. Have Home Assistant notice the moment it wakes up and push a new image
19+
20+
**You'll need an ESPHome Bluetooth proxy nearby.** This guide uses one to
21+
detect the device's wake-up advertisement and as the Bluetooth bridge Home
22+
Assistant connects through to push the image. If you don't already have one
23+
running near the display, set that up first — see [ESPHome's Home
24+
Assistant getting started guide](https://esphome.io/guides/getting_started_hassio/).
25+
A small ESP32 board such as the M5Stack ATOM Lite (SKU: C008) works well
26+
and is cheap enough to dedicate one per display if needed.
27+
28+
## Step 1 — Configure the display's sleep timer
29+
30+
In the device's settings, set:
31+
32+
- **Deep sleep between updates**: how often it wakes up, e.g. every 5
33+
minutes. Shorter means fresher images but more battery use.
34+
- **Awake timeout**: how long it stays reachable after waking before going
35+
back to sleep if nothing connects. 40 seconds is a typical default and is
36+
usually enough.
37+
38+
## Step 2 — Find the display's Bluetooth address
39+
40+
You'll need this to tell Home Assistant which device just woke up. Find it
41+
once using any of:
42+
43+
- Home Assistant's Bluetooth integration device list.
44+
- The device's serial log, if you have a cable handy.
45+
46+
## Step 3 — Detect the wake-up with an ESPHome Bluetooth proxy
47+
48+
A nearby ESPHome Bluetooth proxy can watch for the display's Bluetooth
49+
advertisement and tell Home Assistant the instant it wakes up. This requires
50+
the proxy to be a managed ESPHome device (not the stock "quick install"
51+
Bluetooth Proxy firmware — see [ESPHome's Home Assistant getting started
52+
guide](https://esphome.io/guides/getting_started_hassio/) if you need to
53+
set one up) so you can add this configuration:
54+
55+
```yaml
56+
esp32_ble_tracker:
57+
on_ble_advertise:
58+
- mac_address:
59+
- AA:BB:CC:DD:EE:01 # kitchen display (OD1A2B3C)
60+
- AA:BB:CC:DD:EE:02 # hallway display (OD4F5E6D)
61+
then:
62+
- homeassistant.event:
63+
event: esphome.opendisplay_awake
64+
data:
65+
mac: !lambda 'return x.address_str();'
66+
```
67+
68+
List every display's MAC address here. One block covers all of them — Home
69+
Assistant can tell which one fired the event by checking `mac` in the
70+
automation below.
71+
72+
## Step 4 — Push the image when the display wakes up
73+
74+
Create an automation per device:
75+
76+
```yaml
77+
alias: Push image to OpenDisplay - Kitchen
78+
triggers:
79+
- trigger: event
80+
event_type: esphome.opendisplay_awake
81+
event_data:
82+
mac: AA:BB:CC:DD:EE:01
83+
conditions:
84+
- condition: state
85+
entity_id: binary_sensor.kitchen_e_ink_display_connectivity
86+
state: "on"
87+
actions:
88+
- action: opendisplay.upload_image
89+
data:
90+
refresh_mode: full
91+
device_id: 0123456789abcdef0123456789abcdef
92+
image:
93+
media_content_id: media-source://eink_dashboard/example-image-id
94+
media_content_type: image/png
95+
- delay: "00:01:00"
96+
mode: single
97+
max_exceeded: silent
98+
```
99+
100+
The trailing `delay` keeps the automation "busy" for a minute after the push
101+
completes. The display re-advertises many times a second while it's awake,
102+
which would otherwise re-trigger this automation and push the same image
103+
repeatedly; `mode: single` plus the delay ensures only one push happens per
104+
wake-up, and `max_exceeded: silent` hides the harmless warnings that come
105+
from the extra triggers being ignored while the delay runs.
106+
107+
## Troubleshooting
108+
109+
- **Pushes sometimes miss the window**: increase the display's awake
110+
timeout — the round trip (proxy sees it, forwards the event, Home
111+
Assistant connects and pushes) needs to fit inside it, not just a bare
112+
connection.
113+
- **Automation doesn't fire at all**: double check the ESPHome proxy is in
114+
Bluetooth range of the display, and that the MAC address is listed
115+
correctly under `mac_address`.

0 commit comments

Comments
 (0)