Class Connection

The Connection class is used to handle the communication with the Velux KLF interface. It provides login and logout functionality and provides methods to run other commands on the socket API.

const Connection = require('velux-api').Connection;

let conn = new Connection('velux-klf-12ab');
conn.loginAsync('velux123')
.then(() => {
... do some other stuff ...
return conn.logoutAsync();
})
.catch((err) => { // always close the connection
return conn.logoutAsync().reject(err);
});

Connection

Implements

Constructors

  • Creates a new connection object that connect to the given host.

    Parameters

    • host: string

      Host name or IP address of the KLF-200 interface.

    • OptionalCA: Buffer

      A buffer with a certificate of the certificate authority. Currently, the interface uses a self-signed certificate thus a certificate has to be provided for the CA. This parameter is optional and in case the certificate will be changed with subsequent firmware updates you can provide the matching certificate with this parameter.

    • Optionalfingerprint: string

      The fingerprint of the certificate. This parameter is optional.

    Returns Connection

  • Creates a new connection object that connect to the given host.

    Parameters

    • host: string

      Host name or IP address of the KLF-200 interface.

    • connectionOptions: ConnectionOptions

      Options that will be provided to the connect method of the TLS socket.

    Returns Connection

Properties

CA: Buffer = ca
connectionOptions?: ConnectionOptions
fingerprint: string = FINGERPRINT
host: string

Accessors

Methods

  • Logs in to the KLF interface by sending the GW_PASSWORD_ENTER_REQ.

    Parameters

    • password: string

      The password needed for login. The factory default password is velux123.

    • Optionaltimeout: number = 60

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<void>

    Returns a promise that resolves to true on success or rejects with the errors.

  • Logs out from the KLF interface and closes the socket.

    Parameters

    • Optionaltimeout: number = 10

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<void>

    Returns a promise that resolves to true on successful logout or rejects with the errors.

  • Add a handler to listen for confirmations and notification. You can provide an optional filter to listen only to specific events.

    Parameters

    • handler: Listener<IGW_FRAME_RCV>

      Callback functions that is called for an event

    • Optionalfilter: GatewayCommand[]

      Array of GatewayCommand entries you want to listen to. Optional.

    Returns Disposable

    Returns a Disposable that you can call to remove the handler.

  • Add a handler to listen for sent frames. You can provide an optional filter to listen only to specific events.

    Parameters

    • handler: Listener<IGW_FRAME_REQ>

      Callback functions that is called for an event

    • Optionalfilter: GatewayCommand[]

      Array of GatewayCommand entries you want to listen to. Optional.

    Returns Disposable

    Returns a Disposable that you can call to remove the handler.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_REBOOT_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_REBOOT_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_FACTORY_DEFAULT_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_FACTORY_DEFAULT_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_VERSION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_VERSION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_PROTOCOL_VERSION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_PROTOCOL_VERSION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_STATE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_STATE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_LEAVE_LEARN_STATE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_LEAVE_LEARN_STATE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_NETWORK_SETUP_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_NETWORK_SETUP_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_NETWORK_SETUP_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_NETWORK_SETUP_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_GET_SYSTEMTABLE_DATA_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_GET_SYSTEMTABLE_DATA_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_DISCOVER_NODES_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_DISCOVER_NODES_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_REMOVE_NODES_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_REMOVE_NODES_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_VIRGIN_STATE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_VIRGIN_STATE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_CONTROLLER_COPY_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_CONTROLLER_COPY_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_RECEIVE_KEY_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_RECEIVE_KEY_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_GENERATE_NEW_KEY_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_GENERATE_NEW_KEY_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_REPAIR_KEY_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_REPAIR_KEY_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CS_ACTIVATE_CONFIGURATION_MODE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CS_ACTIVATE_CONFIGURATION_MODE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_NODE_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_NODE_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_ALL_NODES_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_ALL_NODES_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_NODE_VARIATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_NODE_VARIATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_NODE_NAME_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_NODE_NAME_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_NODE_ORDER_AND_PLACEMENT_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_NODE_ORDER_AND_PLACEMENT_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_GROUP_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_GROUP_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_GROUP_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_GROUP_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_DELETE_GROUP_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_DELETE_GROUP_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_NEW_GROUP_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_NEW_GROUP_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_ALL_GROUPS_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_ALL_GROUPS_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_HOUSE_STATUS_MONITOR_ENABLE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_HOUSE_STATUS_MONITOR_ENABLE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_HOUSE_STATUS_MONITOR_DISABLE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_HOUSE_STATUS_MONITOR_DISABLE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_COMMAND_SEND_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_COMMAND_SEND_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_STATUS_REQUEST_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_STATUS_REQUEST_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_WINK_SEND_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_WINK_SEND_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_LIMITATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_LIMITATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_LIMITATION_STATUS_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_LIMITATION_STATUS_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_MODE_SEND_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_MODE_SEND_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_INITIALIZE_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_INITIALIZE_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_INITIALIZE_SCENE_CANCEL_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_INITIALIZE_SCENE_CANCEL_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_RECORD_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_RECORD_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_DELETE_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_DELETE_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_RENAME_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_RENAME_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_SCENE_LIST_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_SCENE_LIST_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_SCENE_INFORMATION_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_SCENE_INFORMATION_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_ACTIVATE_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_ACTIVATE_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_STOP_SCENE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_STOP_SCENE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_ACTIVATE_PRODUCTGROUP_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_ACTIVATE_PRODUCTGROUP_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_CONTACT_INPUT_LINK_LIST_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_CONTACT_INPUT_LINK_LIST_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_CONTACT_INPUT_LINK_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_CONTACT_INPUT_LINK_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_REMOVE_CONTACT_INPUT_LINK_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_REMOVE_CONTACT_INPUT_LINK_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_ACTIVATION_LOG_HEADER_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_ACTIVATION_LOG_HEADER_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_CLEAR_ACTIVATION_LOG_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_CLEAR_ACTIVATION_LOG_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_ACTIVATION_LOG_LINE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_ACTIVATION_LOG_LINE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_MULTIPLE_ACTIVATION_LOG_LINES_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_MULTIPLE_ACTIVATION_LOG_LINES_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_SET_UTC_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_SET_UTC_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_RTC_SET_TIME_ZONE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_RTC_SET_TIME_ZONE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_GET_LOCAL_TIME_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_GET_LOCAL_TIME_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_PASSWORD_ENTER_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_PASSWORD_ENTER_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Sends a request frame to the KLF interface.

    Parameters

    • frame: GW_PASSWORD_CHANGE_REQ

      The frame that should be sent to the KLF interface.

    • Optionaltimeout: number

      A timeout in seconds. After the timeout the returned promise will be rejected.

    Returns Promise<GW_PASSWORD_CHANGE_CFM>

    Returns a promise with the corresponding confirmation message as value. In case of an error frame the promise will be rejected with the error number. If the request frame is a command (with a SessionID) than the promise will be resolved by the corresponding confirmation frame with a matching session ID.

  • Start a keep-alive timer to send a message at least every [[interval]] minutes to the interface. The KLF-200 interface will close the connection after 15 minutes of inactivity.

    Parameters

    • Optionalinterval: number = ...

      Keep-alive interval in minutes. Defaults to 10 min.

    Returns void

  • Stops the keep-alive timer. If not timer is set nothing happens.

    Returns void