Welcome to the Atlona Help Center

WebSocket: The New Kid on the AV Block

Remember when Telnet was the coolest thing since sliced bread in AV control? Well, move over Telnet, there's a new sheriff in town - WebSocket! But don't worry; it's not as scary as it sounds. Let's break it down, AV style.

Why Are We Even Talking About WebSocket? πŸ€”

Picture this: You're trying to control a room full of displays with Telnet. It's like trying to have 20 phone conversations at once - hanging up and redialing for each command. WebSocket is more like having 20 walkie-talkies - always on, always ready.

The Cool Benefits:

  • πŸ”Œ Stays connected (no more "reconnect, reconnect, reconnect")
  • πŸ”’ More secure (especially with WSS - think https for sockets)
  • πŸš€ Faster (way faster than opening/closing Telnet connections)
  • 🧱 Firewall-friendly (works over standard web ports)

Understanding WebSocket Messages πŸ”

Message Structure

Think of a WebSocket message like a game controller - it has specific buttons in specific places. Here's the basic layout:

{
    // 1. Protocol Version (Always the same)
    "jsonrpc": "2.0",

    // 2. Message ID (Like a receipt number)
    "id": "User1",

    // 3. The actual command (What you want to do)
    "method": "DisplayCtrlOperation.Set",

    // 4. Additional information (The details)
    "params": {
        "command": "poweron",
        "controlmode": "RS232"
    }
}

Basic Template

{
    "jsonrpc": "2.0",        // Always the same
    "id": "AnyNameHere",     // Can be any tracking ID
    "method": "COMMAND.NAME", // The actual command
    "params": {              // Extra info if needed
        // parameters go here
    }
}

Basic Commands πŸ“

Command Types

Simple Commands (No parameters needed)

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "System.Get"    // Just the method name
}

Commands with Single Parameter

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "SystemStandby.Set",
    "params": true           // Single value
}

Commands with Multiple Parameters

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "VideoSwitch.Set",
    "params": {              // Multiple values
        "in": "in1",
        "out": "out1"
    }
}

Common Command Examples πŸ“‹

1. Get System Info

Like "status" in telnet:

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "System.Get"
}

2. Power On Display

Like "PWON" in telnet:

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "DisplayCtrlOperation.Set",
    "params": {
        "command": "poweron",
        "controlmode": "RS232"
    }
}

3. Switch Input

Like "x1" in telnet:

{
    "jsonrpc": "2.0",
    "id": "User1",
    "method": "VideoSwitch.Set",
    "params": {
        "in": "in1",
        "out": "out1"
    }
}

Response Patterns

Success Response

{
    "id": "User1",           // Same ID you sent
    "result": {              // The answer
        "property": "value"
    },
    "jsonrpc": "2.0"
}

Error Response

{
    "id": "User1",
    "error": {               // Something went wrong
        "code": -32602,
        "message": "Invalid params"
    },
    "jsonrpc": "2.0"
}

Testing Tools πŸ› οΈ

Recommended Testing Tools

  • Postman - Our recommended tool for testing and saving commands
  • Simple WebSocket - Chrome extension for quick tests
  • wscat - Command-line tool for those who prefer terminals

Getting Connected πŸ”Œ

Connection Basics

/* Standard Connection */
ws://deviceIP/ws      // Example: ws://192.168.1.100/ws

/* Secure Connection (Preferred) */
wss://deviceIP/ws     // Example: wss://192.168.1.100/ws

Important Port Information:

  • Standard WebSocket (ws://) uses port 80
  • Secure WebSocket (wss://) uses port 443

Troubleshooting Like a Pro πŸ”

Common Issues and Solutions

Issue Solution
Connection Refused
  • Verify device IP address
  • Check if ports 80/443 are open
  • Ensure device is on the same network
Command Not Working
  • Check JSON syntax (watch those commas!)
  • Verify command compatibility with your model
  • Make sure all required parameters are included

Practice Exercises 🎯

Exercise 1: Your First Connection

  1. Connect to your device
  2. Send this simple System.Get command:
{
    "jsonrpc": "2.0",
    "id": "FirstTest",
    "method": "System.Get"
}
        

You should receive a response with your device information.

Exercise 2: Switching Inputs

  1. Connect to your device
  2. Try this input switching command:
{
    "jsonrpc": "2.0",
    "id": "SwitchTest",
    "method": "VideoSwitch.Set",
    "params": {
        "in": "in1",
        "out": "out1"
    }
}
        

Need Help? πŸ†˜

Before Contacting Support

Please have this information ready:

  • Your device model number
  • Current firmware version
  • The exact command you're trying to use
  • Any error messages you're receiving

Wrapping Up 🎬

WebSocket might seem like a big change from Telnet, but it's like upgrading from a flip phone to a smartphone - once you get used to it, you'll wonder how you ever lived without it.

Remember: The best way to learn is to try it out. Start with simple commands, test in a safe environment, and gradually work your way up to more complex operations. Before you know it, you'll be a WebSocket pro! πŸš€

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Contact Us