TV Device Information

Service URI - luna://com.webos.service.tv.systemproperty

Provides a method for retrieving TV system information. This API is used to check the version of webOS TV and its features.

Methods

Method

Description

Supported in Emulator

getSystemInfo

Retrieves the system information with keys.  Yes

 

Open All


getSystemInfo

Description

Retrieves the system information with keys that are specified in an array as a parameter. Following keys are available:

Key Name

Description

Type

User Agreements

Supported webOS TV Version

boardType

Board type is used to check the chipset. The result string has the following format.

  • [Chipset]_[DTV Standard]_[Country Code]
    • Example: "H15_ATSC_US", "M14_ATSC_KR", "LM15U_ATSC_KR" 
  • The following values are available for DTV Standard
    • ATSC: Advanced Television System Committee
    • DVB: Digital Video Broadcasting
    • ARIB: ISDB (Integrated Services Digital Broadcasting) maintained by the Japanese organization ARIB (Association of Radio Industries and Businesses).
Note. This property is not supported in the emulator.
String Not required Since webOS TV 2.0
firmwareVersion

Firmware version

String Required Since webOS TV 1.2
modelName

Model name

  • Example: "LB6700AKR"
String Required Since webOS TV 1.2
sdkVersion

webOS TV SDK version

  • Example: "1.3.0", "2.0.0"
String Not required Since webOS TV 1.2
UHD

Whether supports Ultra HD resolution

  • true: Supports UHD resolution.
  • false: Not supported.
Boolean Not required Since webOS TV 1.2
_3d

Whether supports 3D video

  • true: Supports 3D video.
  • false: Not supported.
Boolean Not required Since webOS TV 1.2
boardType cannot be used in webOS TV version 1.x. For more detailed information about webOS TV version, see Spec and Version.

Syntax

getSystemInfo(String[] keys[, Boolean subscribe])

Parameters

Name

Required

Type

Description

keys Required String array

An array of key names for retrieving system information.

  • Example: ["boardType", "projectName"]
subscribe Optional Boolean

Flag that decides whether to subscribe or not. If you enabled the subscription, you will get an event when every system information you specified is changed.

  • true: Subscribe
  • false: Do not subscribe. Call the method only once. (Default)

Call Returns

Name

Required

Type

Description

returnValue Required Boolean Flag that indicates success/failure of the request.
  • true: Success
  • false: Failure
errorCode Optional String

errorCode contains the error code if the method fails. The method will return errorCode only if it fails.
See the Error Codes Reference of this method for more details.

errorText Optional String

errorText contains the error text if the method fails. The method will return errorText only if it fails.
See the Error Codes Reference of this method for more details.

[key name]* Optional String

If getSystemInfo method succeeds, the paired key-value that you specified will be returned.

Remarks

  • If you used a wrong key or error occurs, no result data will be returned for that key.
  • If you subscribe more than one key, you will receive the result data for whole keys at the first return. After the first return, you will receive the result data for each key when corresponding system information is changed.

Error Reference

Error Code

Error Message

ERROR_06 Invalid argument
ERROR_10 Resource temporarily unavailable
ERROR_99 JSON format error

Example

// One-time call
var request = webOS.service.request("luna://com.webos.service.tv.systemproperty", {
    method: "getSystemInfo",
    parameters: { 
        "keys": ["modelName", "firmwareVersion", "UHD", "sdkVersion"]
    },
    onComplete: function (inResponse) {
        var isSucceeded = inResponse.returnValue;

        if (isSucceeded){
            console.log("Result: " + JSON.stringify(inResponse));
            // To-Do something
        } else {
            console.log("Failed to get TV device information");
            // To-Do something
            return;
        }
    }
});
 
// Subscription
var subscriptionHandle;
 
subscriptionHandle = webOS.service.request("luna://com.webos.service.tv.systemproperty", {
    method: "getSystemInfo",
    parameters: { 
        "keys": ["modelName", "firmwareVersion", "UHD", "sdkVersion"],
        "subscribe": true 
    },
    onComplete: function (inResponse) {
        var isSucceeded = inResponse.returnValue;
       
        if (typeof(inResponse.subscribed) != 'undefined') {
            if (!inResponse.subscribed) {
                console.log("Failed to subscribe TV device information");
                return;
            }
        }

        if (isSucceeded){
            console.log("Result: " + JSON.stringify(inResponse));
            // To-Do something
        } else {
            console.log("Failed to TV device information");
            // To-Do something
            return;
        }
    }
});
...
// If you need to unsubscribe the data, use cancel() method as below
subscriptionHandle.cancel();

Return Example

// Success return
{
    "returnValue" : true,
    "modelName" : "WEBOS1",
    "firmwareVersion" : "3.00.00",
    "UHD":"true",
    "sdkVersion":"1.05.00"
}

// Failure return
{
    "returnValue" : false
    "errorCode" : "ERROR_06",
    "errorText" : "Invalid argument."
}


// Subscription example

// First response
{ "returnValue" : true, "modelName" : "WEBOS1", "firmwareVersion" : "3.00.00" }

// When modelName is changed to "WEBOS2"
{ "returnValue" : true, "modelName" : "WEBOS2" }

// When firmwareVersion is changed to "3.02.00"
{ "returnValue": true, "firmwareVersion" : "3.02.00" }

See Also



Navigation