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

getSystemInfo

Description

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

Key NameDescriptionTypeUser AgreementsSupported 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 it supports Ultra HD resolution
  • true: Supports UHD resolution.
  • false: Not supported.
String
Not required
Since webOS TV 1.2
_3d
Whether it supports 3D video
  • true: Supports 3D video.
  • false: Not supported.
String
Not required
Since webOS TV 1.2

Parameters

NameRequiredTypeDescription
keys
Yes
String array
An array of key names for retrieving system information.
  • Example: ["boardType", "projectName"]
subscribe
No
Boolean
Flag that decides whether to subscribe or not. If you enable the subscription, you will receive an event whenever any of the specified system information changes.
  • true: Subscribe
  • false: Do not subscribe. Call the method only once. (Default)

Call returns

NameRequiredTypeDescription
returnValue
Yes
Boolean
Flag that indicates success/failure of the request.
  • true: Success
  • false: Failure
errorCode
No
String
`errorCode` contains the error code if the method fails. The method returns `errorCode` only if it fails.
See the Error code reference of this method for more details.
errorText
No
String
`errorText` contains the error text if the method fails. The method returns `errorText` only if it fails.
See the Error code reference of this method for more details.
[key name]*
No
String
If `getSystemInfo` method succeeds, the paired key-value that you specified will be returned.

Remarks

  • If you use a wrong key or an 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 all keys at the first return. After the first return, you will receive the result data for each key when the corresponding system information changes.

Error code 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 get 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

None

No Headings