Interface HomekitAccessory

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.String> getFirmwareRevision()
      Returns a firmware revision to display in iOS.
      int getId()
      A unique identifier that must remain static across invocations to prevent errors with paired iOS devices.
      java.util.concurrent.CompletableFuture<java.lang.String> getManufacturer()
      Returns a manufacturer to display in iOS.
      java.util.concurrent.CompletableFuture<java.lang.String> getModel()
      Returns a model name to display in iOS.
      java.util.concurrent.CompletableFuture<java.lang.String> getName()
      Returns a name to display in iOS.
      default Service getPrimaryService()
      default implementation which is sufficient if accessory has only one service
      java.util.concurrent.CompletableFuture<java.lang.String> getSerialNumber()
      Returns a serial number to display in iOS.
      default java.util.Collection<Service> getServices()
      The collection of Services this accessory supports.
      void identify()
      Performs an operation that can be used to identify the accessory.
    • Method Detail

      • getId

        int getId()
        A unique identifier that must remain static across invocations to prevent errors with paired iOS devices. When used as a child of a Bridge, this value must be greater than 1, as that ID is reserved for the Bridge itself.
        Returns:
        the unique identifier.
      • getName

        java.util.concurrent.CompletableFuture<java.lang.String> getName()
        Returns a name to display in iOS.
        Returns:
        the label.
      • identify

        void identify()
        Performs an operation that can be used to identify the accessory. This action can be performed without pairing.
      • getSerialNumber

        java.util.concurrent.CompletableFuture<java.lang.String> getSerialNumber()
        Returns a serial number to display in iOS.
        Returns:
        the serial number, or null.
      • getModel

        java.util.concurrent.CompletableFuture<java.lang.String> getModel()
        Returns a model name to display in iOS.
        Returns:
        the model name, or null.
      • getManufacturer

        java.util.concurrent.CompletableFuture<java.lang.String> getManufacturer()
        Returns a manufacturer to display in iOS.
        Returns:
        the manufacturer, or null.
      • getFirmwareRevision

        java.util.concurrent.CompletableFuture<java.lang.String> getFirmwareRevision()
        Returns a firmware revision to display in iOS.
        Returns:
        the firmware revision, or null.
      • getServices

        default java.util.Collection<Service> getServices()
        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.

        Returns:
        the collection of services.
      • getPrimaryService

        default Service getPrimaryService()
        default implementation which is sufficient if accessory has only one service
        Returns:
        primary service