Skip to main content

Discover devices on your local network

Project description

This library is deprecated. We will no longer release new versions, fix bugs or accept pull requests. If you are looking to make your Home Assistant integration discoverable, use the zeroconf and SSDP manifest options.

NetDisco

NetDisco is a Python 3 library to discover local devices and services. It allows to scan on demand or offer a service that will scan the network in the background in a set interval.

Current methods of scanning:

  • mDNS (includes Chromecast, Homekit)
  • uPnP
  • Plex Media Server using Good Day Mate protocol
  • Logitech Media Server discovery protocol
  • Daikin discovery protocol
  • Web OS discovery protocol

It is the library that powers the device discovery within Home Assistant.

We are no longer accepting PRs that implement custom discovery protocols. Only PRs that use mDNS or uPnP are supported. See this issue

Installation

Netdisco is available on PyPi. Install using pip3 install netdisco.

Example

From command-line:

python3 -m netdisco
# To see all raw data:
python3 -m netdisco dump

In your script:

from netdisco.discovery import NetworkDiscovery

netdis = NetworkDiscovery()

netdis.scan()

for dev in netdis.discover():
    print(dev, netdis.get_info(dev))

netdis.stop()

Will result in a list of discovered devices and their most important information:

DLNA ['http://192.168.1.1:8200/rootDesc.xml', 'http://192.168.1.150:32469/DeviceDescription.xml']
google_cast [('Living Room.local.', 8009)]
philips_hue ['http://192.168.1.2:80/description.xml']
belkin_wemo ['http://192.168.1.10:49153/setup.xml']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netdisco-2.8.3.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

netdisco-2.8.3-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

File details

Details for the file netdisco-2.8.3.tar.gz.

File metadata

  • Download URL: netdisco-2.8.3.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for netdisco-2.8.3.tar.gz
Algorithm Hash digest
SHA256 e164bd3e212b07a53b42e7a34ef6eb3a69c77ad6c4e52e33694ca12c26f28a13
MD5 9a66504a77808c78dc1f5d2f9afdd2bc
BLAKE2b-256 d911615e190e6fd740e3800362379f8d5beb6693d112767298a4eef4a2052a9e

See more details on using hashes here.

File details

Details for the file netdisco-2.8.3-py3-none-any.whl.

File metadata

  • Download URL: netdisco-2.8.3-py3-none-any.whl
  • Upload date:
  • Size: 51.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for netdisco-2.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8beb546ee8f503e25ed7226f4afbeddc14e7e1ad6989af4f36acf85df68266c8
MD5 04d5d682c362d038dc9bb1da4d57bd5a
BLAKE2b-256 e247b1fd6a865c2605a886a69ccaae478bad04bcba5fd172fd6faea0af8189de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page