Shelly Cloud v2 API, authorized by a per-account auth key (Shelly app → Settings → User Settings → Access And Permissions → "Get key" — the key and the server URI are shown together).
A conn is a plain map with:
:server— e.g."https://shelly-74-eu.shelly.cloud":auth_key— the account's authorization cloud key
Rate limit: ~1 request/second/account (paced via Shelly.RateGate
when running). Status supports up to 10 devices per call.
Note: the v2 API takes the auth key as a query parameter (Shelly's design) — be aware that intermediary proxies may log query strings.
Summary
Functions
Bulk status for up to 10 device ids. Returns
{:ok, %{device_id => element}} (lowercase ids); each element has
"status", "code" (model), "gen", "online" — parse with
Shelly.Status.parse/4
Control a cover: position is "open" | "close" | "stop" | 0..100.
Control a light: opts may include :on, :brightness, :temperature, :toggle_after.
Switch a relay on or off. toggle_after (seconds) asks Shelly's own
cloud to revert the command later — a watchdog that survives your
app going down.
Types
Functions
Bulk status for up to 10 device ids. Returns
{:ok, %{device_id => element}} (lowercase ids); each element has
"status", "code" (model), "gen", "online" — parse with
Shelly.Status.parse/4:
Shelly.Status.parse(el["status"], channel, el["online"] in [1, true],
%{model: el["code"], gen: Shelly.Status.gen_to_int(el["gen"])})
Control a cover: position is "open" | "close" | "stop" | 0..100.
Control a light: opts may include :on, :brightness, :temperature, :toggle_after.
Switch a relay on or off. toggle_after (seconds) asks Shelly's own
cloud to revert the command later — a watchdog that survives your
app going down.