Interface IrrigationSystemAccessory

  • All Superinterfaces:
    HomekitAccessory

    public interface IrrigationSystemAccessory
    extends HomekitAccessory
    irrigation system accessory that controls several valves.
    • Method Detail

      • getActive

        CompletableFuture<ActiveEnum> getActive()
        An irrigation system is set to Active when the system is enabled. When one of the valves is set to In Use, the irrigation system must be set to in use.
        Returns:
        a future that will contain the binary state
      • setActive

        CompletableFuture<Void> setActive​(ActiveEnum active)
                                   throws Exception
        Sets the irrigation active state
        Parameters:
        active - the binary state to set
        Returns:
        a future that completes when the change is made
        Throws:
        Exception - when the change cannot be made
      • getInUse

        CompletableFuture<InUseEnum> getInUse()
        Retrieves the current inUse state of the irrigation; InUse means one of the valves is set to In Use.
        Returns:
        a future that will contain the binary state
      • subscribeInUse

        void subscribeInUse​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the inUse state.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeInUse

        void unsubscribeInUse()
        Unsubscribes from changes in the inUse state.
      • subscribeActive

        void subscribeActive​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the active state of the irrigation.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeActive

        void unsubscribeActive()
        Unsubscribes from changes in the irrigation active state.
      • subscribeProgramMode

        void subscribeProgramMode​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in the program mode of the irrigation system.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeProgramMode

        void unsubscribeProgramMode()
        Unsubscribes from changes in the program mode.
      • getServices

        default 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.