Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.39 KB

README.md

File metadata and controls

47 lines (31 loc) · 1.39 KB

pylw3

Tests Linting

Lightware LW3 protocol library for controlling Lightware encoders and decoders.

This library uses our pytelnetdevice library under the hood.

Usage

This is just a basic example, explore the library to and the documentation for the LW3 protocol for your specific device to learn more.

import asyncio

from pylw3 import LW3


async def main():
    # Connect to a VINX decoder and print the current input
    decoder_device = LW3("10.211.0.23", 6107)
    async with decoder_device.connection():
        video_channel_id = await decoder_device.get_property("/SYS/MB/PHY.VideoChannelId")
        print(video_channel_id)

    # Connect to a VINX encoder and print whether signal is present
    encoder_device = LW3("10.211.0.86", 6107)
    async with encoder_device.connection():
        signal_present = await encoder_device.get_property("/MEDIA/VIDEO/I1.SignalPresent")
        print(signal_present)


asyncio.run(main())

This will output something like:

9
0

License

GNU GENERAL PUBLIC LICENSE version 3