Syntax
Commands
| Command | Description |
|---|---|
lager energy | Integrate energy and charge over a duration |
lager energy stats | Compute mean/min/max/std for current, voltage, and power |
lager energy
Integrate current and power over a configurable duration. Returns energy in joules and watt-hours, and charge in coulombs and amp-hours.
Options
| Option | Description |
|---|---|
--box BOX | Lagerbox name or IP address |
--duration FLOAT | Integration duration in seconds (default: 10.0) |
--help | Show help message and exit |
Arguments
| Argument | Description |
|---|---|
NET_NAME | Name of the energy-analyzer net (optional if default is set) |
Output
Examples
lager energy stats
Compute mean, minimum, maximum, and standard deviation for current, voltage, and power over a configurable duration.
Options
| Option | Description |
|---|---|
--box BOX | Lagerbox name or IP address |
--duration FLOAT | Measurement duration in seconds (default: 1.0) |
--help | Show help message and exit |
Arguments
| Argument | Description |
|---|---|
NET_NAME | Name of the energy-analyzer net (optional if default is set) |
Output
Examples
Default Net
To avoid specifying the net name each time:Supported Hardware
| Manufacturer | Model | Net Type | USB VID:PID |
|---|---|---|---|
| Joulescope | JS220 | energy-analyzer | 16d0:10ba |
energy-analyzer net type is exclusive to the Joulescope JS220. For instantaneous power readings only, see Watt Meter.
Scripting Examples
Energy Budget Verification
Sleep Current Verification
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Timeout (120s) | Device disconnected or measurement too long | Check USB connection; reduce --duration |
| Connection refused | Box service not running | Check box: lager hello --box <box> |
| Device not found | Joulescope JS220 not detected | Verify device is connected: lager instruments --box <box> |
| Net not found | Net not configured as energy-analyzer | Check net type: lager nets --box <box> |
Notes
- The default command timeout is 120 seconds to accommodate long integrations
- Joulescope JS220 samples continuously; accuracy improves with longer durations
- Use
lager instruments --box <box>to verify the JS220 is detected (VID16d0PID10ba) - Net names refer to names assigned when configuring your testbed
- Use
lager netsto see available energy-analyzer nets

