_encode35(options) {
    let payload = options.data;

    if (options.commandByte !== CommandType.DP_QUERY &&
        options.commandByte !== CommandType.HEART_BEAT &&
        options.commandByte !== CommandType.DP_QUERY_NEW &&
        options.commandByte !== CommandType.SESS_KEY_NEG_START &&
        options.commandByte !== CommandType.SESS_KEY_NEG_FINISH &&
        options.commandByte !== CommandType.DP_REFRESH) {
      // Add 3.5 header
      const buffer = Buffer.alloc(payload.length + 15);
      Buffer.from('3.5').copy(buffer, 0);
      payload.copy(buffer, 15);
      payload = buffer;
      // OO options.data = '3.5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + options.data;
    }

    // Allocate buffer for prefix, unknown, sequence, command, length
    let buffer = Buffer.alloc(18);

    // Add prefix, command, and length
    buffer.writeUInt32BE(0x00006699, 0); // Prefix
    buffer.writeUInt16BE(0x0, 4); // Unknown
    buffer.writeUInt32BE(options.sequenceN, 6); // Sequence
    buffer.writeUInt32BE(options.commandByte, 10); // Command
    buffer.writeUInt32BE(payload.length + 28 /* 0x1c */, 14); // Length

    const encrypted = this.cipher.encrypt({
      data: payload,
      aad: buffer.slice(4, 18)
    });

    buffer = Buffer.concat([buffer, encrypted]);

    return buffer;
  }
Encodes a payload into a Tuya-protocol-complient packet for protocol version 3.5
@param {Object} options Options for encoding
@param {Buffer|String|Object} options.data data to encode
@param {Boolean} options.encrypted whether or not to encrypt the data
@param {Number} options.commandByte
command byte of packet (use CommandType definitions)
@param {Number} [options.sequenceN] optional, sequence number
@returns {Buffer} Encoded Buffer