HP iLO, DL380 G7, cant get it to work

Hey.

Im trying to get the HP iLO sensor to work to no avail.
Anyone knows how to fix it?

Getting this error message:

2017-06-06 22:06:29 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hp_ilo
2017-06-06 22:06:30 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform hp_ilo
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 160, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/hp_ilo.py", line 89, in setup_platform
    unit_of_measurement=monitored_variable[CONF_UNIT_OF_MEASUREMENT])
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/hp_ilo.py", line 114, in __init__
    self.update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/hp_ilo.py", line 144, in update
    ilo_data = getattr(self.hp_ilo_data.data, self._ilo_function)()
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 989, in get_embedded_health
    process=process)
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 726, in _info_tag
    header, message = self._request(root)
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 256, in _request
    self._detect_protocol()
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 296, in _detect_protocol
    header, data = self._communicate(b('<RIBCL VERSION="2.0"></RIBCL>'), ILO_HTTP, save=False)
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 429, in _communicate
    sock = self._get_socket()
  File "/home/homeassistant/.homeassistant/deps/hpilo.py", line 418, in _get_socket
    return ssl.wrap_socket(sock, ssl_version=self.ssl_version)
  File "/usr/lib/python3.5/ssl.py", line 1077, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python3.5/ssl.py", line 760, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:720)

This is my configuration:

sensor:
  - platform: hp_ilo
    host: <iLO IP>
    username: <user>
    password: <passwd>
    monitored_variables:
      - name: CPU fanspeed
        sensor_type: server_health
        unit_of_measurement: '%'
        value_template: ''
      - name: Inlet temperature
        sensor_type: server_health
        unit_of_measurement: '°C'
        value_template: ''
      - name: Server Health
        sensor_type: server_health

Judging by this error message that you are receiving, the SSL setup that you are using on the server iLO is somehow not being accepted / trusted by the Python ssl library :frowning:

I kinda figured the same.

Anyone knows how to solve it?

The ILO cert is probably self-signed? My guess is that you’ll have to create your own Certificate Authority, add the CA to linux’s cert store, sign a certificate, upload this to ILO.
That, or find a way to make HA tell python to ignore invalid certificates.

I’d love to hear back if you succeed, as I have two 380G7 myself. Haven’t tried adding them yet, as I struggle with basic lightning controls so far :stuck_out_tongue:

Yeah, its the default cert that follows iLO 3 default installation :slight_smile:

That might be, for the moment i use a script that pulls the iLO3 information an publishes it to my MQTT server, works fine and all but it would be nice to have native functionality.

Im just moving to a DL380e Gen8 with iLO4, might work better. or not… we will see :slight_smile:

Hi, Have you been able to get this to work? I get the same error. SSLv3 handshake error.

Can you share the script you are using to publish ilo data to mqtt?

No i have not been able to get it to work yet, my script does the job for now.

Sure, it uses PHP and Linux CLI software ipmitool (i guess apt-get install ipmitool if you use Ubuntu), and this MQTT class for PHP: https://github.com/bluerhinos/phpMQTT

And heres the PHP code:
https://pastebin.com/6afpH08U

Not sure if anyone is still needing this, but my ML110 was giving a similar error.
In the end I edited

/usr/src/homeassistant/homeassistant/components/hp_ilo/manifest.json

Changing the python-hpilo requirement to 4.3

I then enabled Enforce AES/3DES Encryption on ILO3.

2 Likes

I can’t find this file in HA-OS:2021.7.4?

my error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 666, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in _async_write_ha_state
    self.hass.states.async_set(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1218, in async_set
    state = State(
  File "/usr/src/homeassistant/homeassistant/core.py", line 906, in __init__
    raise InvalidStateError(
homeassistant.exceptions.InvalidStateError: Invalid state encountered for entity ID: sensor.hp_ilo_server_health. State max length is 255 characters.

Latest iLO integration already have set python-hpilo requirement to 4.3.

Still can’t get ilo integration to work?

Error:
hpilo.IloCommunicationError: Cannot establish ssl session with 192.168.199.199:443: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)

I have same issue SSLV3_ALERT_HANDSHAKE_FAILURE because I have od iLO 2.32 and I can use only ssl.PROTOCOL_TLSv1

Edit: I found some did that but I have no idea how :smiley: