v2.13.1
Your phone and your browser can reach the gateway again while its Mac
sits idle. A machine that falls asleep takes its network with it, so the
gateway simply stops answering — a failure that looks exactly like a
flaky gateway from every surface that talks to it, and sends people
reading gateway code instead of pmset -g log. opendray now holds the
host awake while it serves, and lets you choose how far to take that.
Added
-
Host power is now a setting you can see, on web and mobile. The
choice between "stay reachable" and "let the machine sleep" was only
reachable by hand-editingconfig.toml, which meant nobody found it.
Server settings gain a Host power section listing all four modes
with what each one costs — web renders them as annotated cards, mobile
as a labelled picker — plus a note that a deliberate sleep is never
blocked and that non-macOS hosts ignore the setting. Translated across
English, 中文 and Español. -
Wake-on-demand: the host may sleep, and phone/web traffic wakes it.
[host] prevent_idle_sleep = "on_demand"lets the gateway's Mac sleep
whenever things are quiet instead of being held awake around the clock.
Incoming traffic dark-wakes the machine (macOS "Wake for network
access"); the gateway then seizes a power assertion the moment a
request, live stream or mid-turn session shows up, extends the wake for
as long as serving actually takes, and lets go after a two-minute
linger so the host can sleep again. Running sessions count as activity,
so a turn started from a phone survives the phone locking. On-demand
warns at startup ifwompis disabled, since without it a sleeping
host can't be woken remotely at all. The existing"ac"(default),
"always"and"off"behaviours are unchanged.
Fixed
-
Saving invalid server settings no longer bricks the next restart.
PUT /admin/settingswrote whatever it was given. Since the loader
validates on every startup, a bad value — an unparseable duration, an
unknown mode — saved cleanly and then stopped the gateway from coming
back up, with nothing naming the offending field. The write path now
validates exactly what is about to hit disk and answers 400 instead,
leaving the stored config untouched. -
The gateway keeps its host awake, so phone and web stay connected.
A Mac left to itself idle-sleeps, and a sleeping host takes its network
with it: the gateway stops answering, a remote Postgres becomes
unreachable, and every phone or web request times out until someone
physically wakes the machine. Incoming traffic does dark-wake the host,
but the window is short and a user-session LaunchAgent isn't reliably
scheduled inside it, so the request has already timed out — which reads
as "opendray is flaky" and sends people reading gateway code instead of
pmset -g log. opendray now holds a power assertion for as long as it
serves. Default is wall-power only, so a laptop on battery still sleeps
normally;[host] prevent_idle_sleeptakes"always"or"off". A
deliberate sleep — lid close, Apple menu → Sleep — is never blocked, and
the assertion is tied to the gateway's pid so even a SIGKILL can't
strand the host awake. macOS only; accepted and ignored elsewhere.
Full history: CHANGELOG.md