Simple script to automate AJA KUMO Routers

I was working on a project this week that is using a multitude of AJA Kumo routers. While the routers themselves are brilliant, the API documentation is less than desirable. After digging through the API example code, I uncovered a great little text dump call that gives me all of the IDs.

I’ve put the source code to the python script on GitHub.

https://github.com/szumlins/Scripts/blob/master/kumo.py

The script requires the requests library for python. Easiest way to get requests is to use pip to install.

You can get the help output by running the -h flag:

bash-3.2# ./kumo.py -h
usage: kumo.py [-h] [-d CROSSPOINT] [-s CROSSPOINT] [-a ADDRESS] [-e]
 
Set and Get AJA KUMO cross points. On get success, the script returns the
source. On set success, the script returns the source and destination
separated by a comma. On failure, the script returns -1
 
optional arguments:
  -h, --help            show this help message and exit
  -d CROSSPOINT, --get_xpt CROSSPOINT
                        Get crosspoint source for destination
  -s CROSSPOINT, --set_xpt CROSSPOINT
                        Set crosspoint source for destination (defined by -d)
  -a ADDRESS, --address ADDRESS
                        IP address or DNS name of KUMO
  -e, --print_error     Print out all error codes and exit

You can also get output of all the error codes by running the -e flag

bash-3.2# ./kumo.py -e
Error Codes:
 
-1: can't connect to KUMO (check your URL or network)
-2: destination out of range (not enough destinations in router)
-3: source is out of range (not enough sources in router)

So for example, to get what the source of destination 1 is, we can run a relatively simple command.

bash-3.2# ./kumo.py -a 192.168.10.59 -d 1
3

This responds by telling us that the source for this destination is input 3. If we want to change the source for that destination, we run another simple command to set the source.

bash-3.2# ./kumo.py -a 192.168.10.59 -d 1 -s 1
1,1

This tells us that destination 1 is now set to source 1.

I found that using this we can use simple tools like Arduino/Raspberry Pi systems to control KUMO routers without heavy scripting.