GithubHelp home page GithubHelp logo

indigos33k3r / netdisco Goto Github PK

View Code? Open in Web Editor NEW

This project forked from home-assistant-libs/netdisco

0.0 0.0 0.0 259 KB

:mag_right: Python library to scan local network for services and devices.

License: Other

Python 99.59% Shell 0.41%

netdisco's Introduction

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']

netdisco's People

Contributors

balloob avatar scop avatar fabaff avatar jaharkes avatar robbiet480 avatar magicus avatar postlund avatar rytilahti avatar nielstron avatar molobrakos avatar escoand avatar stevenlooman avatar syssi avatar sdague avatar pfalcon avatar hellowlol avatar rofrantz avatar florianholzapfel avatar brburns avatar tomduijf avatar mjg59 avatar patthoyts avatar pauln avatar dotlambda avatar abmantis avatar bachp avatar pvizeli avatar sebk-666 avatar stuwil avatar timotk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.