Interface LockMechanismAccessory

    • Method Detail

      • getLockCurrentState

        java.util.concurrent.CompletableFuture<LockCurrentStateEnum> getLockCurrentState()
        Retrieves the lock current state.
        Returns:
        a future that will contain the lock current state .
      • getLockTargetState

        java.util.concurrent.CompletableFuture<LockTargetStateEnum> getLockTargetState()
        Retrieves the lock target state.
        Returns:
        a future that will contain the lock target state .
      • setLockTargetState

        java.util.concurrent.CompletableFuture<java.lang.Void> setLockTargetState​(LockTargetStateEnum state)
        set lock target state the lock target state.
        Parameters:
        state - lock target state
        Returns:
        a future that completes when the change is made
      • subscribeLockCurrentState

        void subscribeLockCurrentState​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the lock current state.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeLockCurrentState

        void unsubscribeLockCurrentState()
        Unsubscribes from changes in lock current state.
      • subscribeLockTargetState

        void subscribeLockTargetState​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the lock target state.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeLockTargetState

        void unsubscribeLockTargetState()
        Unsubscribes from changes in lock target state.
      • getServices

        default java.util.Collection<Service> getServices()
        Description copied from interface: HomekitAccessory
        The collection of Services this accessory supports. Services are the primary way to interact with the accessory via HomeKit. Besides the Services offered here, the accessory will automatically include the required information service.

        This method will only be useful if you're implementing your own accessory type. For the standard accessories, use the default implementation provided by the interfaces in io.github.hapjava.accessories.

        Specified by:
        getServices in interface HomekitAccessory
        Returns:
        the collection of services.