-
Notifications
You must be signed in to change notification settings - Fork 2
PiKVM module #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
llogen
wants to merge
1
commit into
main
Choose a base branch
from
feat/addPiKVModule
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
PiKVM module #247
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # PiKVM | ||
|
|
||
| This module provides comprehensive control of a DUT via a PiKVM device. It offers power management through ATX control, keyboard input simulation, and virtual media mounting capabilities. | ||
|
|
||
| PiKVM documentation: https://docs.pikvm.org/ | ||
|
|
||
| Compatibility: This module uses PiKVM's HTTP API endpoints (e.g. `/api/atx/*`, `/api/hid/*`, `/api/msd/*`, `/api/streamer/snapshot`). It is intended for PiKVM (kvmd/PiKVM OS) systems, and should work with other devices only if they expose a compatible API. | ||
|
|
||
| ## Features | ||
|
|
||
| ### Power Management | ||
| Control the DUT's power state via ATX power and reset buttons: | ||
|
|
||
| - Power commands use PiKVM's ATX control API: | ||
| - `on` is idempotent (does nothing if already powered on) | ||
| - `off` performs a graceful shutdown via power button press | ||
| - `force-off` performs a hard power off via long press (5+ seconds) | ||
| - `reset` triggers an ATX reset button press | ||
| - `force-reset` triggers a hardware hot reset | ||
|
|
||
| ``` | ||
| COMMANDS: | ||
| on Power on (does nothing if already on) | ||
| off Graceful shutdown (soft power-off) | ||
| force-off Force power off (hard shutdown, 5+ second press) | ||
| reset Reset via ATX reset button | ||
| force-reset Force reset (hardware hot reset) | ||
| status Query current power state | ||
| ``` | ||
|
|
||
| ### Keyboard Control | ||
| Send keyboard input to the DUT: | ||
|
|
||
| See [pikvm-key-strings.md](./pikvm-key-strings.md) for the full list of supported key strings. | ||
|
|
||
| ``` | ||
| COMMANDS: | ||
| type <text> Type a text string | ||
| key <keyname> Send a single key (e.g., Enter, Escape, F12) | ||
| key-combo <keys> Send key combination (e.g., Ctrl+Alt+Delete) | ||
|
llogen marked this conversation as resolved.
|
||
|
|
||
| FLAGS (must come before the action): | ||
| --delay <duration> Delay between key events for key-combo (default: 500ms) | ||
| ``` | ||
|
|
||
| ### Virtual Media | ||
| Mount ISO images or disk images as virtual USB devices: | ||
|
|
||
| - `mount` uploads images to PiKVM's storage (with automatic space management) | ||
| - `mount-url` instructs PiKVM to download the image directly from the URL | ||
| - Old images are automatically deleted when storage space is needed | ||
| - SHA256 hashing prevents duplicate uploads | ||
|
|
||
| ``` | ||
| COMMANDS: | ||
| mount <path> Mount an image file from the agent's filesystem | ||
| mount-url <url> Mount an image from a URL | ||
| unmount Unmount current virtual media | ||
| media-status Show mounted media information | ||
| ``` | ||
|
|
||
| ### Screenshot | ||
| Capture the current display output from PiKVM's video stream. | ||
|
|
||
| ## Configuration Options | ||
|
|
||
| | Option | Type | Default | Description | | ||
| | -------- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | host | string | - | Address of the PiKVM device (e.g., "192.168.1.100") Defaults to HTTPS if no scheme is specified, HTTP can be used by explicitly specifying `http://` | | ||
| | user | string | admin | Username for authentication | | ||
| | password | string | - | Password for authentication | | ||
| | timeout | string | 10s | Timeout for HTTP requests (e.g., "10s", "30s") | | ||
| | mode | string | - | **Required**: Mode ("power", "keyboard", "media", "screenshot") | | ||
|
|
||
| ⚠️ **Security Warning**: Passwords are stored in plaintext in the configuration file. This should only be used in trusted environments. | ||
|
|
||
| ## Usage Examples | ||
|
|
||
| See [pikvm-example-cfg.yml](./pikvm-example-cfg.yml) for comprehensive configuration examples. | ||
|
|
||
| ### Basic Power Control | ||
| See [pikvm-example-power.yml](./pikvm-example-power.yml). | ||
|
|
||
| ### Boot Menu Access | ||
| See [pikvm-example-keyboard.yml](./pikvm-example-keyboard.yml). | ||
|
|
||
| ### ISO Mounting | ||
| See [pikvm-example-media.yml](./pikvm-example-media.yml). | ||
|
|
||
| ### Screenshot Capture | ||
| See [pikvm-example-screenshot.yml](./pikvm-example-screenshot.yml). | ||
|
|
||
| ## Requirements | ||
|
|
||
| - PiKVM device with API access enabled | ||
| - Network connectivity between dutagent and PiKVM | ||
| - Valid authentication credentials | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.