function(thisObject, commandClass, requestCommand, data, responseCommand, responseMatchingId) {
    if (typeof responseMatchingId === "undefined") {
        // default
        responseMatchingId = null;
    }

    return new Promise(function(resolve, reject) {
        // register our response callback (so that we are listening for the response)
        let commandCallbackObject = thisObject.registerResponseCallback(commandClass, responseCommand, responseMatchingId, INTERNAL_ZWAVE_RESPONSE_TIMEOUT_MS, 
          false /* response is not wrapped in Z/IP frame */, function(response, timeoutOccurred) {
            if (timeoutOccurred) { // timeout
                reject(new TimeoutError());
            } else { // response received
                resolve(response);
            }
        });

        sendRawMessage(thisObject, commandClass, requestCommand, data);
    });
}
function(thisObject, commandClass, requestCommand, data, responseCommand, responseMatchingId) {
    if (typeof responseMatchingId === "undefined") {
        
        responseMatchingId = null;
    }

    return new Promise(function(resolve, reject) {
        
        let commandCallbackObject = thisObject.registerResponseCallback(commandClass, responseCommand, responseMatchingId, INTERNAL_ZWAVE_RESPONSE_TIMEOUT_MS, 
          false , function(response, timeoutOccurred) {
            if (timeoutOccurred) { 
                reject(new TimeoutError());
            } else { 
                resolve(response);
            }
        });

        sendRawMessage(thisObject, commandClass, requestCommand, data);
    });
}
function ( thisObject , commandClass , requestCommand , data , responseCommand , responseMatchingId ) { if ( typeof responseMatchingId === "undefined" ) { // default responseMatchingId = null ; } return new Promise ( function ( resolve , reject ) { // register our response callback (so that we are listening for the response) let commandCallbackObject = thisObject . registerResponseCallback ( commandClass , responseCommand , responseMatchingId , INTERNAL_ZWAVE_RESPONSE_TIMEOUT_MS , false /* response is not wrapped in Z/IP frame */ , function ( response , timeoutOccurred ) { if ( timeoutOccurred ) { // timeout reject ( new TimeoutError ( ) ) ; } else { // response received resolve ( response ) ; } } ) ; sendRawMessage ( thisObject , commandClass , requestCommand , data ) ; } ) ; }
NOTE: this function sends a raw Z-Wave command, does not wait for an ACK, but does wait for a (raw) response
NOTE : this function sends a raw Z - Wave command does not wait for an ACK but does wait for a ( raw ) response