Skip to content
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

The device tracker feature works for one round but hangs ever after #113605

Closed
lextm opened this issue Mar 16, 2024 · 13 comments
Closed

The device tracker feature works for one round but hangs ever after #113605

lextm opened this issue Mar 16, 2024 · 13 comments

Comments

@lextm
Copy link
Contributor

lextm commented Mar 16, 2024

The problem

This issue happens after running a local fork with #113463.

From Wireshark we can see the first round of SNMP packets sent after HA restarts, which indicates the PySNMP calls work as expected. But no further rounds of packets are being sent out, which indicates the scheduling mechanism might hang up.

We might add HA log back later so that other users can review if they hit the same issue in the future.

What version of Home Assistant Core has the issue?

2024.3.1

What was the last working version of Home Assistant Core?

2024.2.4

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@lextm
Copy link
Contributor Author

lextm commented Mar 16, 2024

We found that the changes fbcba7f made by @nmaggioni in #112815 actually resolves the issue. Tests pass if you run HA from this branch, https://github.com/lextm/core/tree/asyncio-device-tracker where we cherry picked his changes.

Thus, we suggest #112815 to be taken as early as possible.

@erikmouw
Copy link

I think somebody has to label this issue with "integration: snmp" or otherwise it will not show up in the list of open SNMP issues

@Theetjuh
Copy link

Still broken in 2024.3.3 I guess?

@erikmouw
Copy link

Yes, still broken in 2024.3.3. Downgrading pysnmp-lextudio to 5.0.34 is still the only known workaround to get the device tracker working. I haven’t had time to try #112815 .

@Theetjuh
Copy link

Thanks for confirming, no idea how I could downgrade though, am running core in docker.
But using 2024.2.5 for the time being is no issue at the moment.

@mmiller7
Copy link

mmiller7 commented Apr 3, 2024

Anyone know what's going on here?

This seems like madness that something as basic as a SNMP device tracker has been broken for over a month now and didn't even seem to get marked as breaking changes in the documentation that I could tell

@lextm
Copy link
Contributor Author

lextm commented Apr 4, 2024

@mmiller7 there were just ~100 HA users enabled SNMP last time I checked, so I don't think this can be considered a "basic" feature compared to other features with much more users.

The pull request has already been created, #112815. Once it is merged, this issue should disappear.

You might leave a comment there to urge the reviewer(s) if you like.

@mmiller7
Copy link

mmiller7 commented Apr 5, 2024

Posted a comment inquiring on there, thanks. Its hard to track which of so many threads is latest on this one.

The HA docs suggest (at least of whatever metrics they have) a bit over 350 but that seems surprisingly low. I haven't found anything else that works remotely as reasonably when you have some users that need to count as "home" but they can't or won't install apps (or you don't grant them access to HA) as simply polling the router. Tried nmap at one point but it can't handle more than one of the same model smartphone on the network since it goes by hostname and phones seem to be detected by their model number makes it a logistical headache.

If there is any other way to do presence detection of stuff coming on/off WiFi by MAC address I'd love to know, but my research has kept coming back to the same thing of using the router SNMP polling.

@home-assistant
Copy link

home-assistant bot commented Apr 5, 2024

@lextm
Copy link
Contributor Author

lextm commented Apr 5, 2024

For device tracker this seems to be the last thread. As long as that pull request is merged, I will close this issue.

There are a few new issues with SNMP sensors but the cause has been known and the pull request has been sent.

Hope 2024.4.1 can include all the fixes, and conclude the major upgrade.

@workingmanrob
Copy link

@lextm PR was not merged - Changes requested - Merging is blocked

so 2024.4.1 just dropped without the fix.

@Theetjuh
Copy link

Theetjuh commented Apr 6, 2024

Changes made and is now on 2024.4.2 milestone :)

@lextm
Copy link
Contributor Author

lextm commented Apr 7, 2024

Close it now, as we only need to wait for the new release.

@lextm lextm closed this as completed Apr 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants