06-27-2024 01:13 AM - edited 06-27-2024 02:15 AM
Hi,
The ability to control other AV devices via USB to RS232 was added in roomOS.
https://roomos.cisco.com/doc/TechDocs/OutboundSerialControl
I'm using a FTDI chipset cable, on a Cisco Room Kit Plus in combination with a Samsung Screen QMR55 (RS232c).
I tested all of these RS232c commands in the command line, and they worked:
Command Code (HEX) Control System Representation
Power On | AA 11 FE 01 01 11 | \xAA\x11\xFE\x01\x01\x11 |
Power Off | AA 11 FE 01 00 10 | \xAA\x11\xFE\x01\x00\x10 |
Volume Up | AA 62 FE 01 00 61 | \xAA\x62\xFE\x01\x00\x61 |
Volume Down | AA 62 FE 01 01 62 | \xAA\x62\xFE\x01\x01\x62 |
Mute On | AA 13 FE 01 01 13 | \xAA\x13\xFE\x01\x01\x13 |
Mute Off | AA 13 FE 01 00 12 | \xAA\x13\xFE\x01\x00\x12 |
Select HDMI 1 | AA 14 FE 01 21 34 | \xAA\x14\xFE\x01\x21\x34 |
Select HDMI 2 | AA 14 FE 01 23 36 | \xAA\x14\xFE\x01\x23\x36 |
Select HDMI 3 | AA 14 FE 01 31 44 | \xAA\x14\xFE\x01\x31\x44 |
Example of command line:
xcommand SerialPort PeripheralControl Send Text: \xAA\x14\xFE\x01\x23\x36
OK
*r PeripheralControlSendResult (status=OK):
** end
Like I already said, the commands work, status returns OK, and the TV/Screen actually receives the command and changes HDMI source.
Now the idea is to create a screen control panel on the unit, but for now I just wanted to test it first in a Macro, I created a very simple macro that triggers on a UI extension Action Button.
import xapi from 'xapi';
xapi.event.on("UserInterface Extensions Panel Clicked", async (event) => {
if (event.PanelId == "hdmi2") {
xapi.Command.SerialPort.PeripheralControl.Send(
{ Text: "\xAA\x14\xFE\x01\x23\x36" });
console.log("Switch Screen to HDMI 2");
}
});
I see the console log trigger, but the command doesn't seem to get processed correctly by the TV/screen. When pressing my HDMI2 button on the Cisco navigator I do see the USB module Tx and Rx link blink. I'm assuming now the xapi is broken in some way where it does send a RS232 signal but incorrectly, since the same command works in commandline.
I wonder if anybody else has been testing with this, and got it working.
Solved! Go to Solution.
06-27-2024 04:05 AM
I found out what I was doing wrong after I tried sending the command via webexapis.com, the issue is with how the hexadecimal escape sequences are being represented within the JSON argument - Text.
I was using (which works in commandline): "\xAA\x14\xFE\x01\x23\x36"
Correct for xapi: "\\xAA\\x14\\xFE\\x01\\x23\\x36"
Issue resolved.
06-27-2024 04:05 AM
I found out what I was doing wrong after I tried sending the command via webexapis.com, the issue is with how the hexadecimal escape sequences are being represented within the JSON argument - Text.
I was using (which works in commandline): "\xAA\x14\xFE\x01\x23\x36"
Correct for xapi: "\\xAA\\x14\\xFE\\x01\\x23\\x36"
Issue resolved.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide