Skip to content

byuoitav/atlona-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atlona-control

Microservice to RESTfully control Atlona video switchers

Overview

This microservice provides a RESTful API to control various Atlona video switchers. It handles the communication protocol with the devices, providing a simple interface for switching inputs, controlling volume, and managing mute settings.

Communication Protocol

This microservice will immediately execute one connection and then will add a delay of 1 second for all subsequent commands until all connections have completed. Atlona switchers require 500ms before each command and this code includes 500ms of delay when reading the responses from the device.

Each command opens, executes, reads and returns the response, and closes the connection with the Atlona device.

Supported Devices

The following Atlona devices are supported:

  • AT-UHD-SW-52ED - 5×2 HDMI switcher
  • AT-OME-PS62 - 6×2 presentation switcher
  • AT-GAIN-60 - Audio amplifier

API Documentation

Common Endpoints

All devices share these standard endpoints:

Health Check Endpoints

  • GET /ping - Returns "pong" if the service is running
  • GET /status - Returns the service status

Device-specific Endpoints

AT-UHD-SW-52ED and AT-OME-PS62

Both devices share these endpoints:

Action Endpoints

  • GET /api/v1/AT-UHD-SW-52ED/:address/output/:output/input/:input - Switch input for a specified output
  • GET /api/v1/AT-UHD-SW-52ED/:address/block/:output/volume/:level - Set volume level
  • GET /api/v1/AT-UHD-SW-52ED/:address/block/:output/muted/:mute - Set mute state (true/false)

Status Endpoints

  • GET /api/v1/AT-UHD-SW-52ED/:address/output/:output/input - Get current input for output
  • GET /api/v1/AT-UHD-SW-52ED/:address/block/:output/volume - Get current volume level
  • GET /api/v1/AT-UHD-SW-52ED/:address/block/:output/muted - Get current mute state

Replace AT-UHD-SW-52ED with AT-OME-PS62 for the PS62 switcher.

AT-GAIN-60

Action Endpoints

  • GET /api/v1/AT-GAIN-60/:address/block/:output/volume/:level - Set volume level
  • GET /api/v1/AT-GAIN-60/:address/block/:output/muted/:mute - Set mute state (true/false)

Status Endpoints

  • GET /api/v1/AT-GAIN-60/:address/block/:output/volume - Get current volume level
  • GET /api/v1/AT-GAIN-60/:address/block/:output/muted - Get current mute state

Development

Building

Use the Makefile to build the project:

make build

Testing

To run tests:

make test

Docker Deployment

Build and deploy Docker containers:

make docker
make deploy

References

The following API guides were used and switchers have been tested:

Project Structure

The main package is located in the cmd folder. Device communication logic is contained in the device/actions package.

About

Microservice to RESTfully control Atlona video switchers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors