Getting Started

Estimated reading time: 2 minutes

The following describes how to change the input source to HDMI2 from your PC.

Requirements

  • BRAVIA Professional Display + Remote Controller
  • PC web browser (e.g. Google Chrome)
  • Local network environment (Wired LAN or Wi-Fi)
  • display_control.html (Download from here)

Note:

You can send REST API commands with any programing languages. In display_control.html, REST API commands are sent with JavaScript.

Preparation

  • Connect BRAVIA Professional Display and your PC to the same network
  • Set up BRAVIA Professional Display
    • Check the IP address of the BRAVIA (e.g. 192.168.0.1)
        1. [HOME] Settings
        2. Network
        3. Advanced settings
        4. Network status
        5. IP address
    • Set “Authentication” in order to use Pre-Shared Key
        1. [HOME] Settings
        2. Network
        3. Home network setup
        4. IP control
        5. Authentication
        6. Normal and PreShared Key
        1. [HOME] Settings
        2. Network
        3. Home network setup
        4. IP control
        5. Pre-Shared Key
        (*) Set "1234" in this trial.
    • Change the input source to HDMI1 by remote controller.

    • Open display_control.html on PC web browser

Execution

  • Put the display’s IP address and Pre-Shared Key to the display_control.html
  • Select “HDMI 2” from the Input field and press the “Go” button.
    A command will be sent from your PC to the BRAVIA.

HTTP Request / Response

  • You can observe the following JSON-RPC data flow between the BRAVIA and your PC.
  • Request
    POST /sony/avContent HTTP/1.1
    HOST: 192.168.0.1
    X-Auth-PSK: 1234
    Content-Type: application/json; charset=UTF-8
    {
    method: "setPlayContent",
    version: "1.0",
    id: 1,
    params: [{uri: "extInput:hdmi?port=2"}]
    }
    
  • Response
    // HTTP 200 OK
    {
    "result": [],
    "id": 1
    }
    

Note:

Instead of using display_control.html, you can easily send the REST API command by the following JavaScript sample using Google Chrome Developer Tools - Console.

var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://192.168.0.1/sony/avContent');
xhr.setRequestHeader('X-Auth-PSK', '1234');
xhr.send(JSON.stringify(
{method: "setPlayContent",
  version: "1.0",
  id: 1,
  params: [{uri: "extInput:hdmi?port=2"}]}
));
Last modified: 8 Jun 2021