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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyavaccess-0.2.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file pyavaccess-0.2.0.tar.gz.

File metadata

  • Download URL: pyavaccess-0.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for pyavaccess-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b3e17aebb79b9595f00e246cf3b01f6661f71e01046cb6515580d2e3aa2a4e90
MD5 f2accc2feb134934d916008b3239808e
BLAKE2b-256 9cf9e1d8fb214f6925d99781db54bd66380abcce77c5dba46e22e5b216b3b44c

See more details on using hashes here.

File details

Details for the file pyavaccess-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyavaccess-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for pyavaccess-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4d72d471458be3a82ad073354686f8f02ee98f3f59234e0ab81b994c04723e
MD5 a71ffd23b1afff274502e341fead1dff
BLAKE2b-256 c606caedeea5a7fe8e225fa89f1f44c7ca36c44c1e39dd2993a50a71a76af342

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page