Device command

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

device_command(cmd_name)
device_command(device_id, cmd_name)

device_command is used to fire a command for a device. Available commands depend on the device type.

See Device list for available commands.

Return value

This function won't return a value.

Arguments

# Argument Type Description
1 device_id id (Optional) Device id. This can be obtained through Device_add function. Not needed when starting script within Device plugin.
2 cmd_name String Command name which need to be set. See the Device list for available commnads.

Example

-- Fire command
device_command("CMD_NAME")