klf-200-api
    Preparing search index...

    Class Gateway

    Provides basic functions to control general functions of the KLF interface.

    Gateway

    Index

    Constructors

    Properties

    connection: IConnection

    The connection that will be used to send and receive commands.

    Methods

    • Changes the password of the KLF interface.

      Parameters

      • oldPassword: string

        Provide the old password.

      • newPassword: string

        Provide a new password. The password must not exceed 32 characters.

      Returns Promise<boolean>

      Returns a promise that fulfills to true if the password has been changed successfully.

    • Disables the house status monitor.

      After disabling the house status monitor you will no longer get notifications of changes.

      Returns Promise<void>

    • Enables the house status monitor.

      With the house status monitor enabled you can get notifications of changes of products.

      Returns Promise<void>

    • Resets the KLF interface to the factory default settings. After 30 seconds you can reconnect.

      Returns Promise<void>

    • Get the network settings

      Returns Promise<
          {
              DefaultGateway: string;
              DHCP: boolean;
              IPAddress: string;
              Mask: string;
          },
      >

      Returns an object with IP address, mask and default gateway and if DHCP is used.

    • Reads the protocol version information from the KLF interface.

      Returns Promise<{ MajorVersion: number; MinorVersion: number }>

      Returns an object with major and minor version number of the protocol.

    • Reads the version information from the KLF interface, e.g. the firmware software version number

      Returns Promise<
          {
              HardwareVersion: number;
              ProductGroup: number;
              ProductType: number;
              SoftwareVersion: SoftwareVersion;
          },
      >

      Returns an object with the several version numbers.

    • If the gateway has been put into learn state by pressing the learn button then leaveLearnStateAsync can be called to leave the learn state.

      Returns Promise<void>

    • Reboots the KLF interface. After reboot the socket has to be reconnected.

      Returns Promise<void>

    • Set the KLF interface to use DHCP.

      Parameters

      • DHCP: true

        Set DHCP to true to use DHCP.

      Returns Promise<void>

    • Set the KLF interface to use a fixed IP address.

      Parameters

      • DHCP: false

        Set DHCP to false to use a fixed IP address.

      • IPAddress: string

        The IP address for the KLF interface.

      • Mask: string

        The IP mask for the network settings.

      • DefaultGateway: string

        The default gateway of your gateway.

      Returns Promise<void>

    • Sets the time zone of the interface.

      Parameters

      • timeZone: string

        A string describing the time zone. See the KLF API documentation for details. Example: :GMT+1:GMT+2:0060:(1994)040102-0:110102-0

      Returns Promise<void>

    • Sets the internal real time clock of the interface.

      Parameters

      • OptionalutcTimestamp: Date = ...

        The new date that should be set. Default is the current date/time.

      Returns Promise<void>