sendCommand(method, args = [], options = {}) {
        const msg = {"method": method, "params": args};

        if (options.interface === "cloud") {
            if (this.dummyCloud.miioSocket.connected) {
                return this.sendCloud(msg, options);
            } else {
                throw new MiioDummycloudNotConnectedError(msg);
            }
        } else if (options.interface === "local") {
            return this.localSocket.sendMessage(msg, options);
        } else {
            if (this.dummyCloud.miioSocket.connected) {
                return this.sendCloud(msg, options);
            } else {
                return this.localSocket.sendMessage(msg, options);
            }
        }
    }
Sends a {'method': method, 'params': args} message to the robot.
Uses the cloud socket if available or falls back to the local one.

@public
@param {string} method
@param {object|Array} args
@param {object} options
@param {number=} options.retries
@param {number=} options.timeout custom timeout in milliseconds
@param {"local"|"cloud"=} options.interface
@returns {Promise<Array|object|string>}