serial-hdmi-switch
v1.0.6
Published
Serial HDMI Switcher =====
Downloads
2
Readme
Serial HDMI Switcher
Introduction
This is a library that uses the serialport
to control various HDMI switchers. Primary use currently is for a library for (Homebridge)[https://github.com/emptygalaxy/homebridge-hdmi-switch].
Building
- Run
npm install
in the root of the directory. - Run
npm run build
Testing
- Ensure that your configuration is correct in test.js
- Run
node test.js
- Observe HDMI Switcher
Usage
Simple
let device: HDMISwitch = new HDMISwitch('/dev/cu.usbserial-145420')
device.setInputIndex(1);
Complex
You can also supply a options object to the constructor to customize the behavior of the switcher.
The following example is for a Xantech XT-SW41-4K18G:
new HDMISwitch(
'/dev/cu.usbserial-145420',
{
Baud: 57600,
ZeroIndexed: false,
CommandEnd: '\r',
MaxInputs: 4,
Commands: {
PowerOn: 'OUTON',
PowerOff: 'OUTOFF',
OutputSelect: 'OUT FR %d',
}
}
);