refresh(options = {}) {
    const payload = {
      gwId: this.device.gwID,
      devId: this.device.id,
      t: Math.round(new Date().getTime() / 1000).toString(),
      dpId: options.requestedDPS ? options.requestedDPS : this._dpRefreshIds,
      uid: this.device.id
    };

    if (options.cid) {
      payload.cid = options.cid;
    }

    debug('GET Payload (refresh):');
    debug(payload);

    const sequenceN = ++this._currentSequenceN;
    // Create byte buffer
    const buffer = this.device.parser.encode({
      data: payload,
      commandByte: CommandType.DP_REFRESH,
      sequenceN
    });

    // Send request and parse response
    return new Promise((resolve, reject) => {
      this._expectRefreshResponseForSequenceN = sequenceN;
      // Send request
      this._send(buffer).then(async data => {
        if (data === 'json obj data unvalid') {
          // Some devices don't respond to DP_QUERY so, for DPS get commands, fall
          // back to using SEND with null value. This appears to always work as
          // long as the DPS key exist on the device.
          // For schema there's currently no fallback options
          const setOptions = {
            dps: options.requestedDPS ? options.requestedDPS : this._dpRefreshIds,
            set: null,
            isSetCallToGetData: true
          };
          data = await this.set(setOptions);
        }

        if (typeof data !== 'object' || options.schema === true) {
          // Return whole response
          resolve(data);
        } else if (options.dps) {
          // Return specific property
          resolve(data.dps[options.dps]);
        } else {
          // Return all dps by default
          resolve(data.dps);
        }
      })
        .catch(reject);
    });
  }
Refresh a device's current status.
Defaults to returning all values.
@param {Object} [options] Options object
@param {Boolean} [options.schema]
true to return entire list of properties from device
@param {Number} [options.dps=1]
DPS index to return
@param {String} [options.cid]
if specified, use device id of zigbee gateway and cid of subdevice to refresh its status
@param {Array.Number} [options.requestedDPS=[4,5,6,18,19,20]]
only set this if you know what you're doing
@example
// get first, default property from device
tuya.refresh().then(status => console.log(status))
@example
// get second property from device
tuya.refresh({dps: 2}).then(status => console.log(status))
@example
// get all available data from device
tuya.refresh({schema: true}).then(data => console.log(data))
@returns {Promise<Object>}
returns object of results