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
Sensor SNNP #110100
Comments
You should use |
Downgrade pysnmp-lextudio from 5.0.34 to 5.0.31 didn't help, same error: |
In that case I don't know how to fix this, could be that there just are no wheels available for this or something along those lines |
When I run HA 2024.1 under Python 3.11, there are no errors, SNMP sensors work again |
Yes, there is no support for pysnmp in python 3.12, there is a switch in libraries for that. |
This is interesting. I'm not having issues with |
Raspberry Pi OS Lite - Debian 12 (bookworm) |
Okay, I can confirm it works okay with HASS OS 11.5, with |
pysnmp-lextudio 5.0.31 works fine on x86-64 system! Doesn't want on Pi OS (arm64) |
2024-02-17 10:29:04.310 ERROR (MainThread) [homeassistant.config] Platform error: sensor - No module named 'asyncore' |
The issue is that pyasyncore doesn't seem to install the Here's a workaround when running Hass core in a virtualenv: copy warnings._deprecated(__name__, _DEPRECATION_MSG, remove=(3, 12)) into
Restart hass, and you'll have your SNMP device tracker back. Dirty, but it works. |
Yes, everything worked. Thank you! |
Come to think of it: the issue is that there appears to be no wheel available for
That way it also works and you don't mess up pip's idea about what's installed. |
I opened simonrob/pyasyncore#2 upstream. |
Works on ARM mac |
The proof is to |
See simonrob/pyasyncore#2 (comment) and my comment below. As this issue (and the related ones) only appears to affect Hass core users on Raspberry Pi, I guess those all still have a file
Which tells pip to download wheels from piwheels.org. Apparently piwheels.org rebuild the wheels with a Python version < 3.12, and the setup code for On my Pi, this file was a remnant of the So, solution can be: Check if the file is a left over config file: dpkg -l $(dpkg -S /etc/pip.conf | awk -F: '{ print $1 }') The output should look like: Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-================-============-=====================================
rc python-pip-whl 20.3.4-4+deb11u1 all Python package installer (pip wheels) If the output starts with If the file
|
This workarround fix the issue, i confirm it's working |
I think we should remove core/homeassistant/package_constraints.txt Lines 162 to 168 in d12335a
|
I don't see an issue with PySNMP and hass core 2024.2.2, once I had the proper pyasyncore in place SNMP presence detection started working again. |
Ultimately you should rewrite this with asyncio, instead of asyncore.
|
Proposed #112795 to resolve this. |
I found this after searching for the problem, I have the same SNMP failures on 2024.3.0, the logs report that SNMP takes too long to run, but the values are stuck. I've reverted to 2024.2.4 and It has started working again. |
i think maybe we should open up a new issue as it looks like this one is related to snmp not work ing at all when your and mine is related to stuck entries. this started with 2024.3.0 for me - snmp will work for awhile but then stop. i get a 10 sec timeout in the log and then consecutive errors refreshing after that. reboot brings it all back for a period of time. |
It might work for the sensor part, but it doesn't solve it for the device_tracker, see my comments in #112548 . So far only (network hardware is an old but very reliable HP ProCurve 1800-24G J9028B gigabit ethernet switch) |
Problems for me too. Revert to 2024.2.4 and I'm just fine again. |
Since this issue was originally opened to track the broken sensor feature only and the issue was partially fixed in 2024.3.1 and updated again in #113463, we suggest it should be closed now. As maintainers of For other problems (mostly around device tracker feature), we have created new issues to track, like #113457 and #113605. Based on our investigation, the necessary fixes are already available and we just wait for #112815 to be merged. |
Yesterday 2024.4.2 has been released with major SNMP changes, maybe check if this is still an issue? |
SNMP device tracker works for me on hass 2024.4.2. |
The problem
Snmp sensors don't work after Python 3.12 update.
What version of Home Assistant Core has the issue?
2024.2.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
snmp sensor
Link to integration documentation on our website
https://www.home-assistant.io/integrations/snmp/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Installing pyasyncore
python3 -m pip install pyasyncore
hasen't effect
The text was updated successfully, but these errors were encountered: