Power Driver

jumpstarter-driver-power provides functionality for interacting with power control devices.

Installation

$ pip3 install --extra-index-url https://pkg.jumpstarter.dev/simple jumpstarter-driver-power

Configuration

Example configuration:

export:
  power:
    type: jumpstarter_driver_power.driver.MockPower
    config:
      # Add required config parameters here

API Reference

class jumpstarter_driver_power.client.PowerClient
cycle(wait: int = 2)

Power cycle the device.

off() → None

Power off the device.

on() → None

Power on the device.

read() → Generator[PowerReading, None, None]

Read power data from the device.

status() → str | None

Return the power state reported by the driver, e.g. “on”, “off” or “unknown”.

Optional for power drivers: returns None when the driver cannot report its state, so callers can tell “no status” apart from a real state.

status is optional for power drivers. It returns the state the driver reports (for example on, off, or unknown), or None when the driver cannot report its state. j power status exits with an error in that case.