Skip to main content
Read what a device is doing now, what it can do, and what Amps last told it to do. The read shape is the same for every device type; only the state fields change.

Read a device

The same route exists for every type: /battery, /ev-charger, /hvac, /solar-inverter, /vehicle. Solar inverters and vehicles are read-only. Their reads carry id, vendor, sync, metadata, and state, and nothing else.

What the device is doing vs what it was told

state.status is what the battery is doing. state.currentMode is the command it’s running. They can differ: a charge whose target is already met reads status: "idle", currentMode: "charge", chargeRate: 0. EV chargers report the same split with isCharging and activeControlMode. Compare state with lastAction to spot changes made outside Amps, such as the homeowner switching mode in the manufacturer’s app.

lastAction

A summary for rendering a device card in one call. For parameters and the full result, follow links.self to GET /actions/{id}.
updatedAt is the last state change. errorCode and errorMessage are null unless state is failed. A just-sent action can take a moment to appear here, so read it by id if you need its state straight after a push.

Freshness

Live reads are cached. metadata.source tells you where a reading came from. For fresher data, add ?expedite=true. It returns a reading no more than a minute old, calling the manufacturer if needed. Use it sparingly.
A completed push doesn’t refresh the cache. To react to a command, use the push.completed webhook, then read with ?expedite=true if you need the new state. In live, settings is included when the reading comes from the device (source: "live") and omitted on cached and fallback readings. A setting the device reports in an unusable form, or outside its declared range, is left out rather than shown. When Amps has temporarily paused reads for a manufacturer, you get the last stored reading with metadata.degraded: true, or 503 CAPABILITY_PAUSED. Retry with backoff. If the device is offline or unknown at the manufacturer, the read returns an error (DEVICE_OFFLINE, DEVICE_NOT_FOUND) instead of stale data. See Error codes.

List devices

List entries carry the last stored reading, commands, conflictStrategies, and lastAction, but not settings. For current state, read the device by id.

Sandbox

Sandbox devices are simulated. Batteries, EV chargers, and thermostats report source: "projection", and their state follows the commands you send: push charge and the next read shows status: "charging" with level rising toward the target. No cache, no waiting.
  • Values in motion change between reads. Compare against the command you sent, not an exact earlier number.
  • A windowed command is active between start and end, then the device goes idle and holds where the window left it.
  • With no commands, devices follow a daily pattern on UTC time, for example batteries charge around midday UTC.
Solar inverters and vehicles follow the UTC daily pattern only, since they take no commands. Their reads report cache or live.

State fields by device type

Battery

EV charger

Only status, isConnected, and isCharging are always present. The rest are omitted when the charger doesn’t report them, never sent as zero.

HVAC

Solar inverter

Vehicle

Next steps

Capabilities

Read commands to build a valid push.

Push

Send commands and track actions.

Webhooks

React to completed actions instead of polling.

Settings

Read and change persistent device configuration.