Skip to main content

Automation library for AV Access devices

Project description

pyavaccess

Python libary for interfacing with AV Access devices over serial. Designed for use with Home Assistant.

Supported Devices

Although this library was created for and tested with the 4kmx42-h2a, it was written so that it could be easily expanded for use with any AV Access device.

Have a different device?

If you're a developer - please consider contributing to this project :)

If you're not a developer - open an issue with the model and features of your device and I'll see what I can do

Usage

from pyavaccess import HDMIMatrixSerial

# Interface with a "4kmx42-h2a" device over serial at "/dev/ttyUSB0"
av = HDMIMatrixSerial("/dev/ttyUSB0", "4KMX42-H2A")

# Print current version
print(av.getVer())

# Get a map of active input for each output {out: in, ...}
outputMap = av.getMappings()

# For each output, print the input mapped to it
for output, input in outputMap.items():
    print("Output {} is mapped to input {}".format(output, input))

# Set the input for output 1 to input 4
av.mapOutput(1, 4)

# Check that the mapping was successful
assert av.getMapping(1) == 4

Testing

The tests for this library are driven by pytest and require connection to an AV Access device.

pytest

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

pyavaccess-0.2.0.tar.gz (19.2 kB view hashes)

Uploaded Source

Built Distribution

pyavaccess-0.2.0-py3-none-any.whl (19.5 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