-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HP ILO integration not working in most recent update #109581
Comments
Can confirm ilo integration is broken in 2024.2b8 -- likely due to the Python upgrade. This may be applicable: eventlet/eventlet#795 `Logger: homeassistant.components.sensor hp_ilo: Error on device update! |
so what will be done?
Valera Nordstrom
…On Mon, Feb 5, 2024 at 9:35 PM Christopher Michael Shaw < ***@***.***> wrote:
Can confirm ilo integration is broken in 2024.2b8 -- likely due to the
Python upgrade.
This may be applicable: eventlet/eventlet#795
<eventlet/eventlet#795>
`Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:581
Integration: Sensor (documentation
<https://rc.home-assistant.io/integrations/sensor>, issues
<https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22>
)
First occurred: 19:21:37 (13 occurrences)
Last logged: 19:21:48
hp_ilo: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py",
line 581, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1261,
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 166, in update
ilo_data = getattr(self.hp_ilo_data.data, self._ilo_function)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 1035, 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 730, 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'', ILO_HTTP, save=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 406, in
_communicate
sock = self._get_socket()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/hpilo.py", line 401, in
_get_socket
return ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS)
^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'`
—
Reply to this email directly, view it on GitHub
<#109581 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWLTQPCFO2FXYT2KCBILPCLYSGQH3AVCNFSM6AAAAABCYPOP22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRYG4ZDIOJWGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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. |
More context here from the Python documentation: https://docs.python.org/3.12/whatsnew/3.12.html#ssl
|
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! |
Same Here I updated to 2024.2 and all my entities related to HI ILO disappear afterwards |
me 3 |
2024.2.1 - iLo also doesn't work. |
Please guys, try to read! |
The issue with the deprecated and now removed ssl.wrap_socket function was fixed years ago in the library
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
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 already created a PR. Would you maybe review it? |
i will try it later |
I see, I have chosen a bad day to start using the hp_ilo integration :D
I downloaded your version as you described and tested it in advanced terminal where it worked, but HA still does not create the entities no matter how often and thoroughly I restart. could there maybe more broken? also, I don't know if it was something with my python installation but I needed to change the docker exec -it homeassistant bash
cd /usr/local/lib/python3.12/site-packages/
python and then hpilo.Ilo("xx.xx.0.200", login="a_username", password="a_password", timeout=60, port=443, protocol=None, delayed=False, ssl_verify=False, ssl_context=None)
ilo.get_power_readings works! but:
not |
I think you forgot a [0].
|
This is only a syntax warning afaik. It's not nice, but in the library for ages it seems. It should work fine with the warnings. |
Hi, I tried the commands (HAOS 11.5), what am I doing wrong ?
|
You could likely just strip the docker exec wrapper and use the curl
command, as it appears your pwd is already in the correct container.
But to use the command as is (works for me), you’d need to use the Advanced
SSH & Web Terminal Add-On with Protection mode disabled. Then just paste it
into the terminal.
…--
Christopher Shaw
***@***.***
425.435.8440
On Fri, Feb 16, 2024 at 11:16 Robert Wójtowicz ***@***.***> wrote:
Hi,
Does not work on Core version 2024.2.2
I tried the commands (HAOS), what am I doing wrong ?
[core-ssh ~]$ 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"
-bash: docker: command not found
[core-ssh ~]$ ha 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"
Error: unknown shorthand flag: 'i' in -it
—
Reply to this email directly, view it on GitHub
<#109581 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APSZUKH4CCJI5C5ES45PWJDYT6WB5AVCNFSM6AAAAABCYPOP22VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZGE3DMMBVGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@emontnemery - looks like you are owning this integration here: https://github.com/home-assistant/core/tree/dev/homeassistant/components/hp_ilo |
@christophermichaelshaw it works!, I used wrong ssh plugin. Thx |
or @epenet ? |
This fixed it for me on 2024.2.2 |
I am using HAOS Core and don't have a python 3.12 folder, how would I go about fixing this? I'm reading addons run within docker instances but I can't seem to find it. |
Please read the comment to the end. You need this addon (and really the non-restricted one) and execute it in that then. |
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
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: