Metadata-Version: 2.4
Name: jumpstarter-driver-energenie
Version: 0.8.2.dev207+g24473f342
Summary: Energenie is an advanced surge protector with power management features
Project-URL: Homepage, https://jumpstarter.dev
Project-URL: source_archive, https://github.com/jumpstarter-dev/repo/archive/24473f342f3744f0559275b3979d7754a37325a2.zip
Author-email: Enric Balletbo i Serra <eballetbo@redhat.com>
License: Apache-2.0
Requires-Python: >=3.11
Requires-Dist: anyio>=4.10.0
Requires-Dist: jumpstarter
Requires-Dist: jumpstarter-driver-power
Description-Content-Type: text/markdown

# Energenie PDU Driver

Drivers for EnerGenie products.

This driver provides a client for the EnerGenie Programmable power switch. The driver was tested on EG-PMS2-LAN device only but should be easy to support other devices.

## Installation

```{code-block} console
:substitutions:
$ pip3 install --extra-index-url {{index_url}} jumpstarter-driver-energenie
```

## Configuration

Example configuration:

```yaml
export:
  power:
    type: jumpstarter_driver_energenie.driver.EnerGenie
    config:
      host: "192.168.0.1"
      password: "password"
      slot: 1
```

| Parameter | Description | Type | Required | Default |
|-----------|-------------|------|----------|---------|
| host | The IP address of the EnerGenie system | `str` | yes | |
| password | The password of the EnerGenie system | `str` | no | `"1"` |
| slot | The slot number to be managed (1, 2, 3, or 4) | `int` | no | `1` |

## API Reference

```{eval-rst}
.. autoclass:: jumpstarter_driver_energenie.driver.EnerGenie()
    :members:
```

### Examples

Powering on and off a device

```{testcode}
:skipif: True
client.power.on()
time.sleep(1)
client.power.off()
```

### CLI

```bash
$ sudo uv run jmp exporter shell -c ./packages/jumpstarter-driver-energenie/examples/exporter.yaml

$$ j
Usage: j [OPTIONS] COMMAND [ARGS]...

  Generic composite device

Options:
  --help  Show this message and exit.

Commands:
  power   Generic power

$$ j power on


$$ exit
```
