Send ON command to device.
189829
def on(self):
        """"""
        on_command = StandardSend(self._address,
                                  COMMAND_LIGHT_ON_0X11_NONE, 0xff)
        self._send_method(on_command,
                          self._on_message_received)
1122364
def sendCommand(self, command):
        
        command_data = [ord(x) for x in buffer(command)]
        self.hid.write(command_data)
        response_data = ''.join(chr(x) for x in self.hid.read(64))
        response = command.RESPONSE.from_buffer_copy(response_data)
        if response.status != 0:
            raise CommandException(response.status)
        return response
1083826
async def send_command(self, command):
        """"""
        _LOGGER.debug("Sending command to projector %s", command)
        if self.__checkLock():
            return False
        self.__setLock(command)
        response = await self.send_request(
            timeout=self.__get_timeout(command),
            params=EPSON_KEY_COMMANDS[command],
            type='directsend',
            command=command)
        return response
973290
def _sendCommand(self, command):
        

        if(self.process is not None):
            try:
                if logger.isEnabledFor(logging.DEBUG):
                    logger.debug("Command: {}".format(command).strip())
                self.process.stdin.write(command.encode('utf-8', 'replace'))
                self.process.stdin.flush()
            except:
                msg = "Error when sending: {}"
                if logger.isEnabledFor(logging.ERROR):
                    logger.error(msg.format(command).strip(), exc_info=True)
228863
def send(self, command):
        ""
        if self.secure_rcon == self.RCON_NOSECURE:
            self.sock.send(rcon_nosecure_packet(self.password, command))
        elif self.secure_rcon == self.RCON_SECURE_TIME:
            self.sock.send(rcon_secure_time_packet(self.password, command))
        elif self.secure_rcon == self.RCON_SECURE_CHALLENGE:
            challenge = self.getchallenge()
            self.sock.send(rcon_secure_challenge_packet(self.password,
                                                        challenge, command))
        else:
            raise ValueError("Bad value of secure_rcon")
836572
def sendcommand(self, cmd, opt=None):
        ""
        if cmd in [DO, DONT]:
            if not self.DOOPTS.has_key(opt):
                self.DOOPTS[opt] = None
            if (((cmd == DO) and (self.DOOPTS[opt] != True))
            or ((cmd == DONT) and (self.DOOPTS[opt] != False))):
                self.DOOPTS[opt] = (cmd == DO)
                self.writecooked(IAC + cmd + opt)
        elif cmd in [WILL, WONT]:
            if not self.WILLOPTS.has_key(opt):
                self.WILLOPTS[opt] = ''
            if (((cmd == WILL) and (self.WILLOPTS[opt] != True))
            or ((cmd == WONT) and (self.WILLOPTS[opt] != False))):
                self.WILLOPTS[opt] = (cmd == WILL)
                self.writecooked(IAC + cmd + opt)
        else:
            self.writecooked(IAC + cmd)
878815
async def _send_command(self, command):
        
        send_message = ""

        for i in command:
            send_message += chr(i)
        result = None
        for data in send_message:
            try:
                result = await self.write(data)
            except():
                if self.log_output:
                    logging.exception('cannot send command')
                else:
                    print('cannot send command')
        return result
506363
def send(self, s, end=os.linesep, signal=False):
        """"""

        if self.blocking:
            raise RuntimeError('send can only be used on non-blocking commands.')

        if not signal:
            if self._uses_subprocess:
                return self.subprocess.communicate(s + end)
            else:
                return self.subprocess.send(s + end)
        else:
            self.subprocess.send_signal(s)
1277865
function _send(cmd, callback) {
      cmd_callback = callback;
      if(connected) {
        client.write(cmd + '\n');
      } else {
        connect();
      }
    }
1237150
def send(self, data):
        """"""
        self._send_data(int_to_hex(len(data)))

        self._send_data(data)
1106573
def onSendCommand(self):
        ''''''
        self.agent_host.sendCommand(self.command_entry.get())
        self.command_entry.delete(0,END)
        self.canvas.focus_set()
870795
def sendCommand(self, command):
    """"""
    data = { 'rapi' : command }
    full_url = self.url + urllib.parse.urlencode(data)
    data = urllib.request.urlopen(full_url)
    response = re.search('\<p>&gt;\$(.+)\<script', data.read().decode('utf-8'))
    if response == None:#If we are using version 1 - https://github.com/OpenEVSE/ESP8266_WiFi_v1.x/blob/master/OpenEVSE_RAPI_WiFi_ESP8266.ino#L357
      response = re.search('\>\>\$(.+)\<p>', data.read().decode('utf-8'))
    return response.group(1).split()
216964
def send(self, op, cmd, integration_id, *args):
    """"""
    out_cmd = ",".join(
        (cmd, str(integration_id)) + tuple((str(x) for x in args)))
    self._conn.send(op + out_cmd)
688547
def _sendDDEcommand(self, cmd, timeout=None):
        """"""
        reply = self.conversation.Request(cmd, timeout)
        if self.pyver > 2:
            reply = reply.decode('ascii').rstrip()
        return reply
651529
def _command(self, msg):
        """"""
        logger.debug('send command to %s', "ws://{}:{}".format(self.ip, self.port));
        try:
            websocket = yield from websockets.connect(
                "ws://{}:{}".format(self.ip, self.port), timeout=self.timeout_connect)
        except:
            logger.debug('command failed to connect to %s', "ws://{}:{}".format(self.ip, self.port));
            return False

        logger.debug('command websocket connected to %s', "ws://{}:{}".format(self.ip, self.port));

        try:
            yield from self._send_register_payload(websocket)

            if not self.client_key:
                raise PyLGTVPairException("Unable to pair")

            yield from websocket.send(json.dumps(msg))

            if msg['type'] == 'request':
                raw_response = yield from websocket.recv()
                self.last_response = json.loads(raw_response)

        finally:
            logger.debug('close command connection to %s', "ws://{}:{}".format(self.ip, self.port));
            yield from websocket.close()
521942
def _send_command(self, input_command):
        
        if input_command is None:
            return
        time_since_last_command = time.time() - self.last_command_at
        if time_since_last_command < self.pause_between_commands:
            # Wifi gateway requires 100ms pause between commands to function at least somewhat reliably.
            time.sleep(self.pause_between_commands - time_since_last_command)
        self.last_command_at = time.time()
        command = b""
        for item in input_command:
            command = command + item
        if len(command) == 1:
            command = command + b"\x00"
        if len(command) == 2:
            command = command + b"\x55"

        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.sendto(command, (self.gateway_ip, self.gateway_port))
        sock.close()
        return command
935167
def send(self, data):
        """"""
        # send message
        _LOGGER.debug("send: " + data)
        self.socket.send(data.encode('ascii'))
        # sleep needed to prevent flooding the GC100 with sends
        sleep(.01)