Skip to main content
Version: 8.7.0

nmc

The sos.native.nmc API groups together methods for controlling WebOs devices using NMC commands.

warning

This API is currently available on WebOs devices only.

NMC Management Capabilities
| Capability | Description | |:------------|:-------------| | `NATIVE_COMMANDS_NMC` | If device supports performing NMC commands |
	If you want to check if the device supports this capability, use [`sos.management.supports()`](https://developers.signageos.io/sdk/sos_management/#supports).

Methods

sendOne()

The sendOne() method sends an NMC command to another WebOS device on the same network or to the localhost.

sendOne(ipAddress: IpAddressType, command: typeof NmcCommands, data: string[] | [
]): Promise<INMCResponse>;

Params

NameTypeRequiredDescription
ipAddressstring
Yes
The IP address of the device to send the command to.
commandtypeof NmcCommands
Yes
The NMC command to send. See NmcCommands for available commands.
datastring[] | []
Yes
The optional data to send with the command.

Return value

NMC response object containing the result of the command execution.

Possible errors

  • If the ipAddress is not a valid string or if the command is not a valid number.
  • If the data is not an array of strings.
  • If any error occurs during the command execution.

Example

// Send a command to a WebOS device at IP address for menu open
await sos.native.nmc.sendOne('192.168.0.10', ['m','c'], ['43']);

// Send a command to a WebOS device at IP address for device power on
await sos.native.nmc.sendOne('192.168.0.10', ['k', 'a'], ['1']);