A Python script to control the TESmart HKS801-E23-EUBK KVM switch over LAN, enabling operations such as switching input sources, setting LED timeouts, and managing the buzzer.
- Switch between input sources (PC1 to PC8).
- Set LED timeout durations.
- Mute or unmute the buzzer.
- Enable or disable auto input detection.
- Retrieve the current active input port.
- Python 3.x
- Network access to the KVM switch.
-
Clone the repository:
git clone https://github.com/psaavedra/tesmartctl.git
-
Navigate to the project directory:
cd tesmartctl -
Install the project:
pip install -e .
The script utilizes argparse for command-line argument parsing. You can specify the KVM's IP address and port, and execute various commands.
python tesmartctl.py --ip 192.168.1.10 --port 5000 <command> [options]Replace <command> with one of the following:
switch_input: Switch to a specific input port.set_led_timeout: Set the LED timeout duration.mute_buzzer: Mute the buzzer.unmute_buzzer: Unmute the buzzer.set_auto_input_detection: Enable or disable auto input detection.get_active_input: Retrieve the current active input port.
-
Switch to PC2:
python tesmartctl.py --ip 192.168.1.10 --port 5000 switch_input 2
-
Set LED timeout to 30 seconds:
python tesmartctl.py --ip 192.168.1.10 --port 5000 set_led_timeout 30s
-
Mute the buzzer:
python tesmartctl.py --ip 192.168.1.10 --port 5000 mute_buzzer
-
Enable auto input detection:
python tesmartctl.py --ip 192.168.1.10 --port 5000 set_auto_input_detection enable -
Get the current active input port:
python tesmartctl.py --ip 192.168.1.10 --port 5000 get_active_input
This project is licensed under the MIT License. See the LICENSE file for details.