Control your Atlona HDMI matrix switch over the network
atlona-matrix
is a Node.js library that allows you to control your Atlona HDMI matrix switch over your local network. It's especially useful for integrating into a home automation system.
atlona-matrix
is distributed through NPM:
npm install atlona-matrix
# or, if you prefer:
yarn add atlona-matrix
Atlona matrix switches unfortunately do not advertise themselves on the local network in any way that facilitates discovery, so you'll have to have some other way of knowing the IP address of your switch.
Once you've solved that problem, connecting to and controlling your switch is easy:
const matrix = new AtlonaMatrix('192.168.1.1'); // or whatever
Commands of the form get<Something>
return Promises. Other commands return nothing.
Returns a promise that resolves with 'on'
or 'off'
depending on the current state of the switch.
Returns a boolean indicating the whether the switch is on or not.
Returns a Promise that resolves with an object indicating the type and version of the hardware.
Returns a Promise that resolves with a list of the current inputs mapped to each output.
Set the given output to show the given input
Turn the switch on (isOn == true) or off (isOn == false).
Unconditionally try to turn the switch on.
Unconditionally try to turn the switch off.
Turn the switch off if it can be determined that none of the outputs are in use.
Turn off a single given output
atlona-matrix
is built to support Node.js version 6.0 or higher.
Contributions are of course always welcome. If you find problems, please report them in the Issue Tracker. If you've made an improvement, open a pull request.
Getting set up for development is very easy:
git clone <your fork>
cd atlona-matrix
yarn
And the development workflow is likewise straightforward:
# make a change to the src/ file, then...
yarn build
node dist/example.js
# or if you want to clean up all the leftover build products:
yarn run clean
- 1.0.0
- The first release.
Zach Bean – zb@forty2.com
Distributed under the MIT license. See LICENSE for more detail.