This is a custom integration for Home Assistant to monitor and control PiKVM devices.
- Monitor CPU temperature
- Monitor fan speed
- Check device throttling status
- Monitor MSD status and storage
- Track additional PiKVM services (IPMI, Janus, VNC, Webterm)
Use the Home Assitant My link to add this repository to HACS.
- Ensure that HACS is installed and configured in your Home Assistant setup. If not, follow the instructions here.
- Go to the HACS panel in Home Assistant.
- Click on the "Integrations" tab.
- Click on the three dots in the top right corner and select "Custom repositories".
- Add this repository URL:
https://github.com/adamoutler/pikvm-homeassistant-integration
and select "Integration" as the category. - Find "PiKVM Integration" in the list and click "Install".
- Restart Home Assistant.
- Download the
custom_components
folder from this repository. - Copy the
pikvm
folder into your Home Assistantcustom_components
directory. - Restart Home Assistant.
- Go to the Home Assistant UI.
- Navigate to Configuration -> Devices & Services.
- Click the Add Integration button.
- Search for "PiKVM".
- Follow the setup wizard to configure your PiKVM device.
- URL: The URL or IP address of your PiKVM device.
- Username: The username to authenticate with your PiKVM device (default:
admin
). - Password: The password to authenticate with your PiKVM device (default:
admin
).
Once the PiKVM integration is added and configured, you will have several sensors available in Home Assistant to monitor the status and health of your PiKVM device. These sensors will include CPU temperature, fan speed, MSD status, and more.
- Clone the Repository: For development purposes, git clone this repository to your
/config
folder.git clone https://github.com/yourusername/pikvm-homeassistant /config/pikvm-homeassistant
- Open with VSCode: Open the repository with VSCode.
- Make Your Changes: Make your changes in the repository.
- Restart Home Assistant: Restart Home Assistant with F1 -> Tasks: Restart HA.
- View Logs: View logs with F1 -> Tasks: logs.
- Enable Debug Logging: For higher detail in logs, enable debug logging in the Home Assistant integration.
A script is included to automatically link the repository to the correct directory for development. This script will run when you open the workspace.
Script: .vscode/scripts/link-repository.sh
#!/bin/sh
# Check if /config/custom_components directory exists
if [ ! -d /config/custom_components ]; then
echo "cannot find custom components directory"
exit 1
fi
# Check if /config/custom_components/pikvm folder already exists
if [ -d /config/custom_components/pikvm ]; then
echo "/config/custom_components/pikvm folder already exists"
exit 1
fi
# Unlink /config/custom_components/pikvm if it's a symbolic link
if [ -L /config/custom_components/pikvm ]; then
unlink /config/custom_components/pikvm
fi
# Check if custom_components directory exists in the current workspace
if [ ! -d custom_components ]; then
echo "this must be run from the root of the pikvm workspace"
exit 1
fi
# Create symbolic link
ln -s "$(pwd)/custom_components/pikvm" /config/custom_components/pikvm
echo "Linking Successful"
- Ensure your PiKVM device is accessible from your Home Assistant instance.
- Make sure you have provided the correct URL, username, and password.
- Check the Home Assistant logs for any error messages related to the PiKVM integration.
Contributions are welcome! Please fork this repository and open a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.