{"id":23207,"library":"aiodiscover","title":"aiodiscover","description":"Async host discovery via ARP and PTR lookup, used primarily in home automation projects like Home Assistant. Current version: 2.7.1. Release cadence: frequent, every few months.","status":"active","version":"2.7.1","language":"python","source_language":"en","source_url":"https://github.com/bluetooth-devices/aiodiscover","tags":["discovery","network","async","arp","dns","home-assistant"],"install":[{"cmd":"pip install aiodiscover","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"DNS resolution (PTR lookups)","package":"dnspython","optional":false},{"reason":"Timeout handling (only for Python <3.11)","package":"async-timeout","optional":true}],"imports":[{"note":"Common mistake due to internal module structure","wrong":"from aiodiscover.discover import AIODiscover","symbol":"AIODiscover","correct":"from aiodiscover import AIODiscover"}],"quickstart":{"code":"import asyncio\nfrom aiodiscover import AIODiscover\n\nasync def main():\n    discover = AIODiscover()\n    hosts = await discover.async_discover()\n    print(hosts)\n\nasyncio.run(main())","lang":"python","description":"Discover all hosts on the local network using ARP and PTR lookup."},"warnings":[{"fix":"Rely on internal resolver management; do not instantiate multiple AIODiscover objects.","message":"v2.7.0 changed DNSResolver to a single shared instance – code relying on separate resolvers per call may break.","severity":"breaking","affected_versions":">=2.7.0"},{"fix":"Run script with sudo, or use Docker with NET_ADMIN capability.","message":"Requires root/sudo on Linux to send ARP packets via raw socket.","severity":"gotcha","affected_versions":"all"},{"fix":"For Python >=3.11, no extra needed; for older versions, install async_timeout.","message":"async_timeout is required only for Python <3.11; it's optional for 3.11+.","severity":"deprecated","affected_versions":">=2.2.2"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install aiodiscover","cause":"Library not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'aiodiscover'"},{"fix":"Run the script with sudo or as root.","cause":"Raw socket creation requires root privileges on Linux.","error":"PermissionError: [Errno 1] Operation not permitted"},{"fix":"Use 'from aiodiscover import AIODiscover'","cause":"Incorrect import path; the public class is directly in aiodiscover.","error":"ImportError: cannot import name 'AIODiscover' from 'aiodiscover.discover'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}