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)
Built Distributions
roku_scanner-1.0.0-py3.8.egg
(10.9 kB
view hashes)
Close
Hashes for roku_scanner-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34aaa60715afe9cdb7ba1e4b6f133cc93a178a3ce93a2aaed89749602664b99f |
|
MD5 | ff34424d58046787aaa7a2ceb7b16068 |
|
BLAKE2b-256 | 9d3d6a6e7668eb453d5b6a946e0e9a4a3d8d2e64962ac5bac611182c70009580 |