Skip to content

πŸš₯ Updated HP Integrated Lights Out (iLO) component for Home Assistant

License

Notifications You must be signed in to change notification settings

chkuendig/hass-hp_ilo-beta

Repository files navigation

HP iLO Integration for Home Assistant

hacs_badge

A drop-in replacement for the official HP iLO integration with significant improvements:

  • Config flow β€” Set up via the UI instead of YAML configuration
  • Auto-discovery β€” Automatically discovers iLO devices on your network via SSDP
  • Statistics support β€” Proper device_class and state_class for long-term statistics (PR #65900)
  • Power control switch β€” Turn server on/off via set_host_power() (PR #32209)
  • Power button entities β€” Simulate physical power button press, hold (force off), and server reset
  • Binary sensor for power state β€” Proper ON/OFF binary sensor instead of enum
  • Safe defaults β€” All power control entities disabled by default to prevent accidental shutdowns

Installation

Add this repo as a custom repo to HACS and the integration should show up.

Features

Discovery

For Auto Discovery to work, it has to be enabled in the iLO admin UI: ILO Screenshot

For development & testing it also makes sense to set the interval low enough (default seems to be 10min)

ILO servers are anouncing themselves on a few of SSDP search targets:

These all return slightly different data, but none seems to include all the information necessary (i.e. the correct UUID or the port/protocol of the REST api ).

Basic Device seems to be the one most common and is already supported by Home Assistant, so I picked that.

Platforms

This component will set up the following platforms.

Platform Description
binary_sensor Server power state (ON/OFF).
sensor Temperature sensors, fan speed sensors, power-on time.
switch Server power control (turn on/off).
button Power button press, hold, and server reset.

The existing implementation includes:

  • Automatically generated temperature and fan speed sensors
  • Device entity with system configuration information (model, BIOS, iLO firmware version)
  • Binary sensor for power state
  • Switch for power on/off control
  • Button for power button press (graceful shutdown/power on)
  • Button for power button hold (force power off)
  • Button for server reset (warm reboot)

⚠️ Power Control Entities - Disabled by Default

The following power control entities are disabled by default because they can be destructive (e.g., if Home Assistant is running on the same server, you won't be able to turn it back on):

Entity Description
Power Button Simulates a short press of the physical power button (graceful shutdown when on, power on when off)
Power Button Hold (Force Off) Simulates holding the power button - forces immediate hard power off. ⚠️ Can cause data loss!
Reset Server Performs a warm reboot of the server
Server Power Control (switch) Turn server on/off via set_host_power()

To enable these entities:

  1. Go to Settings β†’ Devices & Services β†’ HP iLO
  2. Click on your device
  3. Find the disabled entities (shown with a "disabled" badge)
  4. Click on the entity and select Enable

Data Updates & Caching

The integration uses Home Assistant's DataUpdateCoordinator pattern for efficient data fetching:

  • All data is fetched in a single update cycle (every 60 seconds)
  • All entities share the same cached data
  • No redundant API calls - temperatures, fans, power status all updated together

Tests

The component includes a comprehensive pytest-based test suite covering configuration flow and integration setup. Mock data is based on real iLO API responses from python-hpilo's test data.

Running Tests

Install test dependencies and run the test suite:

# Install test dependencies
source venv/bin/activate
pip install -r requirements_test.txt

# Run all tests
pytest tests/ -v

# Run specific test file
pytest tests/test_config_flow.py -v

# Run with coverage
pytest tests/ --cov=custom_components.hp_ilo

TODO

  • Configuration improvements

    • Update of IPs and Hostname from discovery in case any of them change
    • Import of existing sensors from configuration.yaml
    • Option to enable/disable what sensors and other entities/platforms are added
  • Strings and Translations β€” Config flow should support i18n

  • Firmware Upgrades β€” Buttons for firmware upgrades using the python-hpilo library

About

πŸš₯ Updated HP Integrated Lights Out (iLO) component for Home Assistant

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages