core: HP ILO integration not working in most recent update

The problem

The HP ILO integration stopped working the configuration has not change nor has the ilo login details it will not create the entity’s any more even though it has worked up until the last upadte

What version of Home Assistant Core has the issue?

core

What was the last working version of Home Assistant Core?

up until the latest update

What type of installation are you running?

Home Assistant OS

Integration causing the issue

hp_ilo

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hp_ilo/

Diagnostics information

I dont have any at this time

Example YAML snippet

- platform: hp_ilo
  host: 192.168.100.47
  username: Studmuffin
  password: no password for u
  monitored_variables:
    - name: Studmuffin XCP-NG Inlet Tempeture
      sensor_type: server_health
      unit_of_measurement: "°C"
      value_template: '{{ ilo_data.temperature["01-Inlet Ambient"].currentreading[0] }}'
    - name: Studmuffin ESXI 1 Power Consumption
      sensor_type: server_power_readings

Anything in the logs that might be useful for us?

Not currently at this time if u need data tell me how to get it and i can get it to u
the code snippet is 1 out of the 4 i have

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 7
  • Comments: 25 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I created a PR that should fix the problem. In the meantime, if you want a temporary fix until the next update, you can run

docker exec -it homeassistant bash -c "wget https://raw.githubusercontent.com/seveas/python-hpilo/5881ffab4fba6ea136176a92de58c710704e9653/hpilo.py -O /usr/local/lib/python3.12/site-packages/hpilo.py"

Be aware: This won’t carry over after updates.

If you want to do that in HAOS you need the https://github.com/hassio-addons/addon-ssh addon (this is the non-restricted community version) and disable the Safe mode.

I see the same error on my instance. Went from 2023.x to 2024.2.0

Thank you for the report and confirmation!

For further reporters of similar issues – I don’t see a need for any additional “me too” reports at this point, as we’ve identified the issue (deprecated Python function).

I haven’t yet had time to submit a fix, as I’m unfamiliar with the codebase, but will likely submit a PR with a fix by the end of this weekend if need be. The devs are awesome, so I would predict the fix will be released very soon!

I see the same error on my instance. Went from 2023.x to 2024.2.0

Thank you for the report and confirmation!

For further reporters of similar issues – I don’t see a need for any additional “me too” reports at this point, as we’ve identified the issue (deprecated Python function).

I haven’t yet had time to submit a fix, as I’m unfamiliar with the codebase, but will likely submit a PR with a fix by the end of this weekend if need be. The devs are awesome, so I would predict the fix will be released very soon!

I already created a PR. Would you maybe review it?

Give the devs some time to update the integration – appears as if the ssl.wrap_socket() function, deprecated in Python 3.7, needs to be replaced with context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) or something along those lines.

@christophermichaelshaw it works!, I used wrong ssh plugin.

Thx

@emontnemery - looks like you are owning this integration here: https://github.com/home-assistant/core/tree/dev/homeassistant/components/hp_ilo Could you please help us have a look if this can be merged?

but:

sensor:
  - platform: hp_ilo
    host: xx.xx.0.200
    username: a_username
    password: a_password
    monitored_variables:
      - name: Server Power Wattage
        sensor_type: server_power_readings
        unit_of_measurement: Watt
        value_template: '{{ ilo_data.present_power_reading }}'

not

I think you forgot a [0].

      - name: Server Power Wattage
        sensor_type: server_power_readings
        value_template: "{{ ilo_data.present_power_reading[0] }}"
        unit_of_measurement: "W"