Package io.github.hapjava.accessories
Interface SecuritySystemAccessory
- 
- All Superinterfaces:
- HomekitAccessory
 
 public interface SecuritySystemAccessory extends HomekitAccessory A security system that can be armed so that when a contact sensor is opened or a motion sensor detects movement, then a siren could be fired off. There are different modes for arming the system. SeeTargetSecuritySystemStateEnumfor more information.- Author:
- Gaston Dombiak
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<CurrentSecuritySystemStateEnum>getCurrentSecuritySystemState()Retrieves the current state of the security system.default CurrentSecuritySystemStateEnum[]getCurrentSecuritySystemStateValidValues()Valid values for current state.default java.util.Collection<Service>getServices()The collection of Services this accessory supports.java.util.concurrent.CompletableFuture<TargetSecuritySystemStateEnum>getTargetSecuritySystemState()Retrieves the pending, but not yet completed, state of the security system.default TargetSecuritySystemStateEnum[]getTargetSecuritySystemStateValidValues()Valid values for target state.voidsetTargetSecuritySystemState(TargetSecuritySystemStateEnum state)Sets the state of the security system.voidsubscribeCurrentSecuritySystemState(HomekitCharacteristicChangeCallback callback)Subscribes to changes to the state of the security system.voidsubscribeTargetSecuritySystemState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the pending, but not yet completed, state of the security system.voidunsubscribeCurrentSecuritySystemState()Unsubscribes from changes in the state of the security system.voidunsubscribeTargetSecuritySystemState()Unsubscribes from changes in the pending, but not yet completed, state of the security system.- 
Methods inherited from interface io.github.hapjava.accessories.HomekitAccessorygetFirmwareRevision, getId, getManufacturer, getModel, getName, getPrimaryService, getSerialNumber, identify
 
- 
 
- 
- 
- 
Method Detail- 
getCurrentSecuritySystemStatejava.util.concurrent.CompletableFuture<CurrentSecuritySystemStateEnum> getCurrentSecuritySystemState() Retrieves the current state of the security system. The state describes if the system is armed in any of its variations; or if the alarm has been triggered; or if the system is disarmed.- Returns:
- current state of the security system.
 
 - 
subscribeCurrentSecuritySystemStatevoid subscribeCurrentSecuritySystemState(HomekitCharacteristicChangeCallback callback) Subscribes to changes to the state of the security system.- Parameters:
- callback- the function to call when the state changes.
 
 - 
unsubscribeCurrentSecuritySystemStatevoid unsubscribeCurrentSecuritySystemState() Unsubscribes from changes in the state of the security system.
 - 
setTargetSecuritySystemStatevoid setTargetSecuritySystemState(TargetSecuritySystemStateEnum state) throws java.lang.Exception Sets the state of the security system. The security system could be armed in any of its variations or disarmed.- Parameters:
- state- target state of the security system.
- Throws:
- java.lang.Exception- when the change cannot be made.
 
 - 
getTargetSecuritySystemStatejava.util.concurrent.CompletableFuture<TargetSecuritySystemStateEnum> getTargetSecuritySystemState() Retrieves the pending, but not yet completed, state of the security system.- Returns:
- target state of the security system.
 
 - 
subscribeTargetSecuritySystemStatevoid subscribeTargetSecuritySystemState(HomekitCharacteristicChangeCallback callback) Subscribes to changes in the pending, but not yet completed, state of the security system.- Parameters:
- callback- the function to call when the state changes.
 
 - 
unsubscribeTargetSecuritySystemStatevoid unsubscribeTargetSecuritySystemState() Unsubscribes from changes in the pending, but not yet completed, state of the security system.
 - 
getCurrentSecuritySystemStateValidValuesdefault CurrentSecuritySystemStateEnum[] getCurrentSecuritySystemStateValidValues() Valid values for current state.- Returns:
- array of valid current states.
 
 - 
getTargetSecuritySystemStateValidValuesdefault TargetSecuritySystemStateEnum[] getTargetSecuritySystemStateValidValues() Valid values for target state.- Returns:
- array of valid targe states.
 
 - 
getServicesdefault java.util.Collection<Service> getServices() Description copied from interface:HomekitAccessoryThe 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:
- getServicesin interface- HomekitAccessory
- Returns:
- the collection of services.
 
 
- 
 
-