Syntax
COMMAND, lager watt NET_NAME reads power (watts). The current, voltage, and all subcommands read the other quantities (Joulescope JS220 and Nordic PPK2 only).
Commands
Options
These options are available on each read subcommand (power/current/voltage/all). --box is also accepted directly after lager watt NET_NAME for the default power read.
Arguments
Usage
NET_NAME is omitted and no default is set, lager watt lists all available watt meter nets on the box.
Output
Lager prints each reading in its base unit (W, A or V) with up to six significant digits. A small reading appears in scientific notation, so a 52.34 µW load prints as5.234e-05 W
(#837):
all prints all three quantities:
--json, output is a single JSON object (units are base SI — amps, volts, watts):
--duration windows). If no reading arrives within that time, the command exits with an error. The error names the two likely causes: a disconnected device, or a USB fault.
Increasing resolution
Two levers improve a power/current reading:- Display — output keeps six significant digits in the base unit. A sub-milliwatt or sub-milliamp reading appears in scientific notation (e.g.
5.234e-05 W), not as zero. A nonzero reading is never lost to rounding. - Averaging window — pass
--durationto average over a longer capture. A longer window reduces noise on the mean, giving a steadier, higher-effective-resolution value:
Long averaging windows
--duration also works for long windows — e.g. the average current over a minute:
Supported Hardware
Hardware Feature Comparison
The
current, voltage, and all subcommands require a Joulescope JS220 or Nordic PPK2. On a Yocto-Watt (power only) they exit with a clear “not supported” message — use lager watt NET_NAME for power instead. The same readings are also available through the Python API.
Instrument Name Matching
The backend driver is selected based on the instrument name in the net configuration:Default Net
lager defaults add --watt-meter-net saves the key net_watt_meter, but lager watt reads
net_watt. A default set this way is therefore not used yet (#836). Give the net name
in each command:
Examples
Scripting Examples
Power Threshold Check (JSON)
Current Profiling (JSON)
Troubleshooting
Notes
- Readings print in base units (W, A, V) with up to six significant digits; a small value appears in scientific notation instead of
0.--jsonemits the same base units. --durationsets the averaging window; the Joulescope JS220 and Nordic PPK2 honor it, while the Yocto-Watt returns an instantaneous value and ignores it. On the JS220, windows longer than ~10 s are measured gaplessly with the on-device charge accumulator (constant memory, any length).- The Nordic PPK2 operates in source mode (supplies a configurable voltage 0.8–5V and measures current); its
voltagereading is the configured source voltage. - The
current,voltage, andallsubcommands must follow the net name:lager watt NET_NAME current. - Net names refer to names assigned when setting up your testbed.
- Use
lager netsto see available watt meter nets, andlager instruments --box <box>to verify the device is detected.

