Skip to main content

Scans LAN for and Roku devices and gives device information

Project description

Roku-Scanner 1.0.0

Scans LAN for and connected Roku's and returns available device information.

Installation

pip install roku-scanner

Usage

CLI

python -m roku_scanner

Importing

Can used as below.

from roku_scanner.scanner import Scanner
from roku_scanner.roku import Roku

scanner = Scanner()
scanner.discover()

found_devices = scanner.discovered_devices

for device in found_devices:
    roku_location = device.get('LOCATION')
    roku = Roku(location=roku_location, discovery_data=device)
    roku.fetch_data()
    detailed_device_data = roku.data
    print(detailed_device_data)

JSON

roku_location = device.get('LOCATION')
roku = Roku(location=roku_location, discovery_data=device)
roku.fetch_data()
json_data = roku.as_json()

XML

roku_location = device.get('LOCATION')
roku = Roku(location=roku_location, discovery_data=device)
roku.fetch_data()
json_data = roku.as_xml()

Options

Device data output to be in JSON.

python -m roku_scanner --json

Increasing timeout on search time. Default is 2 secs. It advised to use a time less than 10 secs.

python -m roku_scanner --timeout 5

Change search target to target all devices and not only Roku devices.

python -m roku_scanner --search-target-all

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

roku-scanner-1.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distributions

roku_scanner-1.0.0-py3.8.egg (10.9 kB view hashes)

Uploaded Source

roku_scanner-1.0.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

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