Interface HomekitAccessory

    • 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.
      • identify

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

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

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

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

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

        default 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 services
        Returns:
        primary service