Syntax
Options
| Option | Description |
|---|---|
--box BOX | Lagerbox name or IP address |
--help | Show help message and exit |
Arguments
| Argument | Description |
|---|---|
NET_NAME | Name of the watt meter net to read (optional if default is set) |
Usage
NET_NAME is omitted and no default is set, lists all available watt meter nets on the box.
Output
Returns power in watts with 3 decimal places:Supported Hardware
| Manufacturer | Model | Identification | Features |
|---|---|---|---|
| Yoctopuce | Yocto-Watt | USB VID:PID 24e0:002a | Real-time power measurement |
| Joulescope | JS220 | USB VID:PID 16d0:10ba | High-precision power, voltage, and current measurement |
Hardware Feature Comparison
| Feature | Yocto-Watt | Joulescope JS220 |
|---|---|---|
Power reading (read) | Yes | Yes |
Voltage reading (read_voltage) | No | Yes (Python API) |
Current reading (read_current) | No | Yes (Python API) |
Combined reading (read_all) | No | Yes (Python API) |
| Measurement method | Instantaneous | 0.1s averaged |
| Device selection | Channel-based | Serial number-based |
lager watt command returns power (watts) for both devices. The Joulescope JS220’s additional measurement capabilities (individual voltage and current readings) are available through the Python API.
Instrument Name Matching
The backend driver is selected based on the instrument name in the net configuration:| Pattern | Driver |
|---|---|
Contains joulescope or js220 (case-insensitive) | Joulescope JS220 |
| All other watt meter instruments | Yocto-Watt |
Default Net
To avoid specifying the net name each time:Examples
Scripting Examples
Power Threshold Check
Power Profiling
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Timeout (30s) | Device disconnected or USB issue | Check USB connection; replug device |
| Connection refused | Box service not running | Check box: lager hello --box <box> |
| Device not found | Watt meter not detected | Verify device is connected: lager instruments --box <box> |
Notes
- Power is returned in watts (W) with 3 decimal places
- Joulescope JS220 averages measurements over 0.1 seconds for higher precision
- Net names refer to names assigned when setting up your testbed
- Use
lager netsto see available watt meter nets - Use
lager instruments --box <box>to verify the device is detected

