HPilo [Errno 111] Connection refused

Hi, I am trying to get some sensor information from HP Ilo5 into my Homeassistant.
After adding the example code in the configuration.yaml, change the credentials and the home assistant restart, I get:

hp_ilo: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1291, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hp_ilo/sensor.py", line 167, in update
    ilo_data = getattr(self.hp_ilo_data.data, self._ilo_function)()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 1045, in get_embedded_health
    return self._info_tag('SERVER_INFO', 'GET_EMBEDDED_HEALTH', 'GET_EMBEDDED_HEALTH_DATA',
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 739, in _info_tag
    header, message = self._request(root)
                      ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 238, in _request
    self._detect_protocol()
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 278, in _detect_protocol
    header, data = self._communicate(b'<RIBCL VERSION="2.0"></RIBCL>', ILO_HTTP, save=False)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 410, in _communicate
    sock = self._get_socket()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 392, in _get_socket
    raise err
hpilo.IloCommunicationError: Error connecting to 192.168.10.23 port 443: [Errno 111] Connection refused

When approaching the ILO from a web browser, it is all fine, so I guess there is no firewall blocking anything? I can’t find anything on the web.

I am out of options/knowledge…

Thanks!
Bas

What is that and why can’t you talk to it. That is the error.
If I were to guess you are trying to connect with https and it needs http, or vice versy.

Hi,

I tried your hint and used the port for both port 80 and 443. However no luck.

hp_ilo: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 729, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1291, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hp_ilo/sensor.py", line 167, in update
    ilo_data = getattr(self.hp_ilo_data.data, self._ilo_function)()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 1045, in get_embedded_health
    return self._info_tag('SERVER_INFO', 'GET_EMBEDDED_HEALTH', 'GET_EMBEDDED_HEALTH_DATA',
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 739, in _info_tag
    header, message = self._request(root)
                      ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 238, in _request
    self._detect_protocol()
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 278, in _detect_protocol
    header, data = self._communicate(b'<RIBCL VERSION="2.0"></RIBCL>', ILO_HTTP, save=False)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 410, in _communicate
    sock = self._get_socket()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 392, in _get_socket
    raise err
hpilo.IloCommunicationError: Error connecting to 192.168.10.23 port 443: [Errno 111] Connection refused

Is there a specific setting to be done in the HP ilo?
Is the Homeassistant using a different protocol then when using the web browser?
The HA and ILO are on different subnets though.(but when using a laptop on the HA subnet, I can connect to the ILO on the other subnet)

Any advice is welcome!
Thanks