klf-200-api
    Preparing search index...

    Class Scenes

    Use the scenes object to retrieve a list of scenes known to your KLF interface and to start one of them.

    Scenes

    Implements

    • Disposable
    Index

    Properties

    Connection: IConnection
    Scenes: Scene[] = []

    The list of scenes objects that correspond to the scenes defined at the KLF 200 interface.

    The array index corresponds to the scene ID.

    Methods

    • Returns void

    • Finds a scene by its name and returns the scene object.

      Parameters

      • sceneName: string

        The name of the scene.

      Returns undefined | Scene

      Returns the scene object if found, otherwise undefined.

    • Add an event handler that is called if a scene has been added.

      Parameters

      • handler: Listener<number>

        The handler that is called if the event is emitted.

      Returns Disposable

      Call the dispose method of the returned object to remove the handler.

    • Add an event handler that is called if a scene has been changed.

      Parameters

      • handler: Listener<number>

        The handler that is called if the event is emitted.

      Returns Disposable

      Call the dispose method of the returned object to remove the handler.

    • Add an event handler that is called if a scene has been removed.

      Parameters

      • handler: Listener<number>

        The handler that is called if the event is emitted.

      Returns Disposable

      Call the dispose method of the returned object to remove the handler.

    • Returns Promise<void>

    • Creates an instance of Scenes.

      Parameters

      • Connection: IConnection

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

      Returns Promise<Scenes>

      Returns a new Scenes object that is initialized, already.