diff --git a/bundles/org.openhab.io.homekit/README.md b/bundles/org.openhab.io.homekit/README.md index 17d8c83a2..28189de1f 100644 --- a/bundles/org.openhab.io.homekit/README.md +++ b/bundles/org.openhab.io.homekit/README.md @@ -539,221 +539,221 @@ Support for this is planned for the future release of openHAB HomeKit binding. ## Supported accessory type -| Accessory Tag | Mandatory Characteristics | Optional Characteristics | Supported OH items | Description | -|:---------------------|:----------------------------|:-----------------------------|:-------------------------|:-----------------------------------------------------------------| -| AirQualitySensor | | | | Air Quality Sensor which can measure different parameters | -| | AirQuality | | String | Air quality state, possible values (UNKNOWN,EXCELLENT,GOOD,FAIR,INFERIOR,POOR). Custom mapping can be defined at item level, e.g. [EXCELLENT="BEST", POOR="BAD"] | -| | | OzoneDensity | Number | Ozone density in micrograms/m3, max 1000 | -| | | NitrogenDioxideDensity | Number | NO2 density in micrograms/m3, max 1000 | -| | | SulphurDioxideDensity | Number | SO2 density in micrograms/m3, max 1000 | -| | | PM25Density | Number | PM2.5 micrometer particulate density in micrograms/m3, max 1000 | -| | | PM10Density | Number | PM10 micrometer particulate density in micrograms/m3, max 1000 | -| | | VOCDensity | Number | VOC Density in micrograms/m3, max 1000 | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| LeakSensor | | | | Leak Sensor | -| | LeakDetectedState | | Switch, Contact | Leak sensor state (ON=Leak Detected, OFF=no leak) | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| MotionSensor | | | | Motion Sensor | -| | MotionDetectedState | | Switch, Contact | Motion sensor state (ON=motion detected, OFF=no motion) | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| OccupancySensor | | | | Occupancy Sensor | -| | OccupancyDetectedState | | Switch, Contact | Occupancy sensor state (ON=occupied, OFF=not occupied) | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| ContactSensor | | | | Contact Sensor, An accessory with on/off state that can be viewed in HomeKit but not changed such as a contact sensor for a door or window | -| | ContactSensorState | | Switch, Contact | Contact sensor state (ON=open, OFF=closed) | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| SmokeSensor | | | | Smoke Sensor | -| | SmokeDetectedState | | Switch, Contact | Smoke sensor state (ON=smoke detected, OFF=no smoke) | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| LightSensor | | | | Light sensor | -| | LightLevel | | Number | Light level in lux | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| HumiditySensor | | | | Relative Humidity Sensor providing read-only values | -| | RelativeHumidity | | Number | Relative humidity in % between 0 and 100. additional configuration homekitMultiplicator = . | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| TemperatureSensor | | | | Temperature sensor | -| | CurrentTemperature | | Number | current temperature. supported configuration: minValue, maxValue, step. | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| CarbonDioxideSensor | | | | Carbon Dioxide Sensor | -| | CarbonDioxideDetectedState | | Switch, Contact | carbon dioxide sensor state (ON- abnormal level of carbon dioxide detected, OFF - level is normal) | -| | | CarbonDioxideLevel | Number | Carbon dioxide level in ppm, max 100000 | -| | | CarbonDioxidePeakLevel | Number | highest detected level (ppm) of carbon dioxide detected by a sensor, max 100000 | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| CarbonMonoxideSensor | | | | Carbon monoxide Sensor | -| | CarbonMonoxideDetectedState | | Switch, Contact | Carbon monoxide sensor state (ON- abnormal level of carbon monoxide detected, OFF - level is normal) | -| | | CarbonMonoxideLevel | Number | Carbon monoxide level in ppm, max 100 | -| | | CarbonMonoxidePeakLevel | Number | highest detected level (ppm) of carbon monoxide detected by a sensor, max 100 | -| | | Name | String | Name of the sensor | -| | | ActiveStatus | Switch, Contact | Working status | -| | | FaultStatus | Switch, Contact | Fault status | -| | | TamperedStatus | Switch, Contact | Tampered status | -| | | BatteryLowStatus | Switch, Contact | Battery status | -| Door | | | | Motorized door. One Rollershutter item covers all mandatory characteristics. see examples below. | -| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of motorized door | -| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of motorized door | -| | PositionState | | Rollershutter, String | Position state. Supported states: DECREASING, INCREASING, STOPPED. Mapping can be redefined at item level, e.g. [DECREASING="Down", INCREASING="Up"]. If no state provided, "STOPPED" is used. | -| | | Name | String | Name of the motorized door | -| | | HoldPosition | Switch | Motorized door should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | -| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | -| Window | | | | Motorized window. One Rollershutter item covers all mandatory characteristics. see examples below. | -| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of motorized window | -| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of motorized window | -| | PositionState | | Rollershutter, String | Position state. Supported states: DECREASING, INCREASING, STOPPED. Mapping can be redefined at item level, e.g. [DECREASING="Down", INCREASING="Up"]. If no state provided, "STOPPED" is used. | -| | | Name | String | Name of the motorized window | -| | | HoldPosition | Switch | Motorized door should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | -| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | -| WindowCovering | | | | Window covering / blinds. One Rollershutter item covers all mandatory characteristics. see examples below. | -| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of window covering | -| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of window covering | -| | PositionState | | Rollershutter, String | Currently only "STOPPED" is supported. | -| | | Name | String | Name of the windows covering | -| | | HoldPosition | Switch | Window covering should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | -| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | -| | | CurrentHorizontalTiltAngle | Number, Dimmer | Number Item = current angle of horizontal slats. values -90 to 90. A value of 0 indicates that the slats are rotated to a fully open position. A value of -90 indicates that the slats are rotated all the way in a direction where the user-facing edge is higher than the window-facing edge. Dimmer Item = the percentage of openness (0%-100%) | -| | | TargetHorizontalTiltAngle | Number, Dimmer | Number Item = target angle of horizontal slats (-90 to +90). Dimmer Item = the percentage of openness (0%-100%) | -| | | CurrentVerticalTiltAngle | Number, Dimmer | Number Item = current angle of vertical slats (-90 to +90) . Dimmer Item = the percentage of openness (0%-100%) | -| | | TargetVerticalTiltAngle | Number, Dimmer | Number Item = target angle of vertical slats. Dimmer Item = the percentage of openness (0%-100%) | -| Slat | | | | Slat which tilts on a vertical or a horizontal axis. Configuration "type:horizontal" or "type:vertical" | -| | CurrentSlatState | | String | Current slat state. possible values (FIXED,SWINGING,JAMMED). Custom mapping can be defined at item level, e.g. [JAMMED="JAM", FIXED="FIX"] | -| | | Name | String | Name of the slat | -| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED | -| | | CurrentTiltAngle | Number, Dimmer | Number Item = current angle of slats. values -90 to 90. A value of 0 indicates that the slats are rotated to a fully open position. Dimmer Item = the percentage of openness (0%-100%) | -| | | TargetTiltAngle | Number, Dimmer | Number Item = target angle of slats (-90 to +90). Dimmer Item = the percentage of openness (0%-100%) | -| Switchable | | | | An accessory that can be turned off and on. While similar to a lightbulb, this will be presented differently in the Siri grammar and iOS apps | -| | OnState | | Switch | State of the switch - ON/OFF | -| | | Name | String | Name of the switch | -| Outlet | | | | An accessory that can be turned off and on. While similar to a lightbulb, this will be presented differently in the Siri grammar and iOS apps | -| | OnState | | Switch | State of the outlet - ON/OFF | -| | InUseStatus | | Switch | Indicates whether the outlet has an appliance e.g., a floor lamp, physically plugged in. This characteristic is set to True even if the plugged-in appliance is off. | -| | | Name | String | Name of the switch | -| Lighting | | | | A lightbulb, can have further optional parameters for brightness, hue, etc | -| | OnState | | Switch | State of the light - ON/OFF | -| | | Name | String | Name of the light | -| | | Hue | Dimmer, Color | Hue | -| | | Saturation | Dimmer, Color | Saturation in % (1-100) | -| | | Brightness | Dimmer, Color | Brightness in % (1-100). See "Usage of dimmer modes" for configuration details. | -| | | ColorTemperature | Number | Color temperature represented in reciprocal megaKelvin. The default value range is from 50 to 400. Color temperature should not be used in combination with hue, saturation and brightness. It supports following configuration parameters: minValue, maxValue | -| Fan | | | | Fan | -| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | -| | | CurrentFanState | Number | Current fan state. values: 0=INACTIVE, 1=IDLE, 2=BLOWING AIR | -| | | TargetFanState | Number | Target fan state. values: 0=MANUAL, 1=AUTO | -| | | RotationDirection | Number, Switch | Rotation direction. values: 0/OFF=CLOCKWISE, 1/ON=COUNTER CLOCKWISE | -| | | RotationSpeed | Number, Dimmer | Fan rotation speed in % (1-100) | -| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED | -| | | LockControl | Number, Switch | Status of physical control lock. values: 0/OFF=CONTROL LOCK DISABLED, 1/ON=CONTROL LOCK ENABLED | -| Thermostat | | | | A thermostat requires all mandatory characteristics defined below | -| | CurrentTemperature | | Number | Current temperature. supported configuration: minValue, maxValue, step | -| | TargetTemperature | | Number | Target temperature. supported configuration: minValue, maxValue, step | -| | CurrentHeatingCoolingMode | | String | Current heating cooling mode (OFF, AUTO, HEAT, COOL). for mapping see homekit settings above. | -| | TargetHeatingCoolingMode | | String | Target heating cooling mode (OFF, AUTO, HEAT, COOL). for mapping see homekit settings above. | -| | | Name | String | Name of the thermostat | -| | | CoolingThresholdTemperature | Number | Maximum temperature that must be reached before cooling is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | -| | | HeatingThresholdTemperature | Number | Minimum temperature that must be reached before heating is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | -| HeaterCooler | | | | Heater or/and cooler device | -| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | -| | CurrentTemperature | | Number | Current temperature. supported configuration: minValue, maxValue, step | -| | CurrentHeaterCoolerState | | String | Current heater/cooler mode (INACTIVE, IDLE, HEATING, COOLING). Mapping can be redefined at item level, e.g. [HEATING="HEAT", COOLING="COOL"] | -| | TargetHeaterCoolerState | | String | Target heater/cooler mode (AUTO, HEAT, COOL). Mapping can be redefined at item level, e.g. [AUTO="AUTOMATIC"] | -| | | Name | String | Name of the heater/cooler | -| | | RotationSpeed | Number | Fan rotation speed in % (1-100) | -| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED | -| | | LockControl | Number, Switch | Status of physical control lock. values: 0/OFF=CONTROL LOCK DISABLED, 1/ON=CONTROL LOCK ENABLED | -| | | CoolingThresholdTemperature | Number | Maximum temperature that must be reached before cooling is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | -| | | HeatingThresholdTemperature | Number | Minimum temperature that must be reached before heating is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | -| Lock | | | | A Lock Mechanism. with flag [inverted="true"] the default mapping to switch ON/OFF can be inverted. | -| | LockCurrentState | | Switch, Number | Current state of lock mechanism (1/ON=SECURED, 0/OFF=UNSECURED, 2=JAMMED, 3=UNKNOWN) | -| | LockTargetState | | Switch | Target state of lock mechanism (ON=SECURED, OFF=UNSECURED) | -| | | Name | String | Name of the lock | -| Valve | | | | Valve. additional configuration: homekitValveType = ["Generic", "Irrigation", "Shower", "Faucet"] | -| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | -| | InUseStatus | | Switch | Indicates whether fluid flowing through the valve. A value of "ON"/"OPEN" indicates that fluid is flowing. | -| | | Duration | Number | Defines how long a valve should be set to ʼIn Useʼ in second. You can define the default duration via configuration homekitDefaultDuration = | -| | | RemainingDuration | Number | Describes the remaining duration on the accessory. the remaining duration increases/decreases from the accessoryʼs usual countdown. i.e. changes from 90 to 80 in a second. | -| | | Name | String | Name of the valve | -| | | FaultStatus | Switch, Contact | Accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | -| Faucet | | | | Faucet or shower. It should be used in combination with Valve or/and HeaterCooler. | -| | Active | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates faucet/shower is open. | -| | | Name | String | Name of the Faucet | -| | | FaultStatus | Switch, Contact | Accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | -| SecuritySystem | | | | Security system. | -| | CurrentSecuritySystemState | | String | Current state of the security system. STAY_ARM / AWAY_ARM / NIGHT_ARM / DISARMED / TRIGGERED. Mapping can be redefined at item level, e.g. [AWAY_ARM="AWAY", NIGHT_ARM="NIGHT" ] | -| | TargetSecuritySystemState | | String | Requested state of the security system. STAY_ARM / AWAY_ARM / NIGHT_ARM / DISARM. While the requested state is not DISARM, and the current state is DISARMED, HomeKit will display "Arming...", for example during an exit delay. Mapping can be redefined at item level, e.g. [AWAY_ARM="AWAY", NIGHT_ARM="NIGHT" ] | -| | | Name | String | Name of the security system | -| | | FaultStatus | Switch, Contact | accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | -| | | TamperedStatus | Switch, Contact | accessory tampered status. A status of "ON"/"OPEN" indicates that the accessory has been tampered with. Value should return to "OFF"/"CLOSED" when the accessory has been reset to a non-tampered state. | -| GarageDoorOpener | | | | A garage door opener. | -| | ObstructionStatus | | Switch | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | -| | CurrentDoorState | | String | Current door state. Possible values: OPEN, OPENING, CLOSED, CLOSING, STOPPED | -| | TargetDoorState | | Switch, String | Target door state. ON/"OPEN" = open door, OFF/"CLOSED" = closed door | -| | | Name | String | Name of the garage door | -| | | LockCurrentState | Switch | current states of lock mechanism (OFF=SECURED, ON=UNSECURED) | -| | | LockTargetState | Switch | target states of lock mechanism (OFF=SECURED, ON=UNSECURED) | -| Battery | | | | Accessory with battery. Battery can be chargeable (configuration chargeable:true) and non-chargeable (configuration chargeable:false) | -| | BatteryLevel | | Number | Battery level 0% to 100% | -| | BatteryLowStatus | | Switch, Contact | Battery low indicator. ON/OPEN = battery level is low. | -| | BatteryChargingState | | Switch, Contact | Mandatory only for chargeable battery. ON/OPEN = battery is charging | -| | | Name | String | Name of the battery accessory | -| Filter | | | | Accessory with filter maintenance indicator | -| | FilterChangeIndication | | Switch, Contact | Filter change indicator. ON/OPEN = filter change is required. | -| | | FilterLifeLevel | Number | Current filter life level. 0% to 100% | -| | | FilterResetIndication | Switch | Send "filter reset" action triggered by user in iOS home app to openHAB ("ON" = reset requested by user). | -| | | Name | String | Name of the filter accessory | -| Microphone | | | | Microphone accessory | -| | Mute | | Switch, Contact | Mute indication. ON/OPEN = microphone is muted | -| | | Name | String | Name of the microphone accessory | -| | | Volume | Number | Microphone volume from 0% to 100% | -| Speaker | | | | Speaker accessory | -| | Mute | | Switch, Contact | Mute indication. ON/OPEN = speaker is muted | -| | | Name | String | Name of the speaker accessory | -| | | Volume | Number | Speaker volume from 0% to 100% | -| | | Active | Switch, Contact | Working status | -| SmartSpeaker | | | | Smart speaker accessory with Play/Stop/Pause control | -| | CurrentMediaState | | String | Current smart speaker state. possible values (STOP,PLAY,PAUSE,UNKNOWN). Custom mapping can be defined at item level, e.g. [STOP="STOPPED", PLAY="PLAYING"] | -| | TargetMediaState | | String | Target smart speaker state. possible values (STOP,PLAY,PAUSE). Custom mapping can be defined at item level, e.g. [STOP="STOPPED", PLAY="PLAYING"] | -| | | Mute | Switch, Contact | Mute indication. ON/OPEN = speaker is muted | -| | | Name | String | Name of the speaker accessory | -| | | ConfiguredName | String | Name of the speaker accessory configured in iOS home app. User can rename speaker in iOS home app and this characteristic can be used to reflect change in openHAB and sync name changes from openHAB to home app. | -| | | Volume | Number | Speaker volume from 0% to 100% | +| Accessory Tag | Mandatory Characteristics | Optional Characteristics | Supported OH items | Description | +|:---------------------|:----------------------------|:-----------------------------|:------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| AirQualitySensor | | | | Air Quality Sensor which can measure different parameters | +| | AirQuality | | String | Air quality state, possible values (UNKNOWN,EXCELLENT,GOOD,FAIR,INFERIOR,POOR). Custom mapping can be defined at item level, e.g. [EXCELLENT="BEST", POOR="BAD"] | +| | | OzoneDensity | Number | Ozone density in micrograms/m3, max 1000 | +| | | NitrogenDioxideDensity | Number | NO2 density in micrograms/m3, max 1000 | +| | | SulphurDioxideDensity | Number | SO2 density in micrograms/m3, max 1000 | +| | | PM25Density | Number | PM2.5 micrometer particulate density in micrograms/m3, max 1000 | +| | | PM10Density | Number | PM10 micrometer particulate density in micrograms/m3, max 1000 | +| | | VOCDensity | Number | VOC Density in micrograms/m3, max 1000 | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| LeakSensor | | | | Leak Sensor | +| | LeakDetectedState | | Switch, Contact | Leak sensor state (ON=Leak Detected, OFF=no leak) | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| MotionSensor | | | | Motion Sensor | +| | MotionDetectedState | | Switch, Contact | Motion sensor state (ON=motion detected, OFF=no motion) | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| OccupancySensor | | | | Occupancy Sensor | +| | OccupancyDetectedState | | Switch, Contact | Occupancy sensor state (ON=occupied, OFF=not occupied) | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| ContactSensor | | | | Contact Sensor, An accessory with on/off state that can be viewed in HomeKit but not changed such as a contact sensor for a door or window | +| | ContactSensorState | | Switch, Contact | Contact sensor state (ON=open, OFF=closed) | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| SmokeSensor | | | | Smoke Sensor | +| | SmokeDetectedState | | Switch, Contact | Smoke sensor state (ON=smoke detected, OFF=no smoke) | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| LightSensor | | | | Light sensor | +| | LightLevel | | Number | Light level in lux | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| HumiditySensor | | | | Relative Humidity Sensor providing read-only values | +| | RelativeHumidity | | Number | Relative humidity in % between 0 and 100. additional configuration homekitMultiplicator = . | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| TemperatureSensor | | | | Temperature sensor | +| | CurrentTemperature | | Number | current temperature. supported configuration: minValue, maxValue, step. | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| CarbonDioxideSensor | | | | Carbon Dioxide Sensor | +| | CarbonDioxideDetectedState | | Switch, Contact | carbon dioxide sensor state (ON- abnormal level of carbon dioxide detected, OFF - level is normal) | +| | | CarbonDioxideLevel | Number | Carbon dioxide level in ppm, max 100000 | +| | | CarbonDioxidePeakLevel | Number | highest detected level (ppm) of carbon dioxide detected by a sensor, max 100000 | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| CarbonMonoxideSensor | | | | Carbon monoxide Sensor | +| | CarbonMonoxideDetectedState | | Switch, Contact | Carbon monoxide sensor state (ON- abnormal level of carbon monoxide detected, OFF - level is normal) | +| | | CarbonMonoxideLevel | Number | Carbon monoxide level in ppm, max 100 | +| | | CarbonMonoxidePeakLevel | Number | highest detected level (ppm) of carbon monoxide detected by a sensor, max 100 | +| | | Name | String | Name of the sensor | +| | | ActiveStatus | Switch, Contact | Working status | +| | | FaultStatus | Switch, Contact | Fault status | +| | | TamperedStatus | Switch, Contact | Tampered status | +| | | BatteryLowStatus | Switch, Contact | Battery status | +| Door | | | | Motorized door. One Rollershutter item covers all mandatory characteristics. see examples below. | +| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of motorized door | +| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of motorized door | +| | PositionState | | Rollershutter, String | Position state. Supported states: DECREASING, INCREASING, STOPPED. Mapping can be redefined at item level, e.g. [DECREASING="Down", INCREASING="Up"]. If no state provided, "STOPPED" is used. | +| | | Name | String | Name of the motorized door | +| | | HoldPosition | Switch | Motorized door should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | +| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | +| Window | | | | Motorized window. One Rollershutter item covers all mandatory characteristics. see examples below. | +| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of motorized window | +| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of motorized window | +| | PositionState | | Rollershutter, String | Position state. Supported states: DECREASING, INCREASING, STOPPED. Mapping can be redefined at item level, e.g. [DECREASING="Down", INCREASING="Up"]. If no state provided, "STOPPED" is used. | +| | | Name | String | Name of the motorized window | +| | | HoldPosition | Switch | Motorized door should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | +| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | +| WindowCovering | | | | Window covering / blinds. One Rollershutter item covers all mandatory characteristics. see examples below. | +| | CurrentPosition | | Rollershutter, Dimmer, Number | Current position of window covering | +| | TargetPosition | | Rollershutter, Dimmer, Number | Target position of window covering | +| | PositionState | | Rollershutter, String | Currently only "STOPPED" is supported. | +| | | Name | String | Name of the windows covering | +| | | HoldPosition | Switch | Window covering should stop at its current position. A value of ON must hold the state of the accessory. A value of OFF should be ignored. | +| | | ObstructionStatus | Switch, Contact | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | +| | | CurrentHorizontalTiltAngle | Number, Dimmer | Number Item = current angle of horizontal slats. values -90 to 90. A value of 0 indicates that the slats are rotated to a fully open position. A value of -90 indicates that the slats are rotated all the way in a direction where the user-facing edge is higher than the window-facing edge. Dimmer Item = the percentage of openness (0%-100%) | +| | | TargetHorizontalTiltAngle | Number, Dimmer | Number Item = target angle of horizontal slats (-90 to +90). Dimmer Item = the percentage of openness (0%-100%) | +| | | CurrentVerticalTiltAngle | Number, Dimmer | Number Item = current angle of vertical slats (-90 to +90) . Dimmer Item = the percentage of openness (0%-100%) | +| | | TargetVerticalTiltAngle | Number, Dimmer | Number Item = target angle of vertical slats. Dimmer Item = the percentage of openness (0%-100%) | +| Slat | | | | Slat which tilts on a vertical or a horizontal axis. Configuration "type:horizontal" or "type:vertical" | +| | CurrentSlatState | | String | Current slat state. possible values (FIXED,SWINGING,JAMMED). Custom mapping can be defined at item level, e.g. [JAMMED="JAM", FIXED="FIX"] | +| | | Name | String | Name of the slat | +| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED | +| | | CurrentTiltAngle | Number, Dimmer | Number Item = current angle of slats. values -90 to 90. A value of 0 indicates that the slats are rotated to a fully open position. Dimmer Item = the percentage of openness (0%-100%) | +| | | TargetTiltAngle | Number, Dimmer | Number Item = target angle of slats (-90 to +90). Dimmer Item = the percentage of openness (0%-100%) | +| Switchable | | | | An accessory that can be turned off and on. While similar to a lightbulb, this will be presented differently in the Siri grammar and iOS apps | +| | OnState | | Switch | State of the switch - ON/OFF | +| | | Name | String | Name of the switch | +| Outlet | | | | An accessory that can be turned off and on. While similar to a lightbulb, this will be presented differently in the Siri grammar and iOS apps | +| | OnState | | Switch | State of the outlet - ON/OFF | +| | InUseStatus | | Switch | Indicates whether the outlet has an appliance e.g., a floor lamp, physically plugged in. This characteristic is set to True even if the plugged-in appliance is off. | +| | | Name | String | Name of the switch | +| Lighting | | | | A lightbulb, can have further optional parameters for brightness, hue, etc | +| | OnState | | Switch | State of the light - ON/OFF | +| | | Name | String | Name of the light | +| | | Hue | Dimmer, Color | Hue | +| | | Saturation | Dimmer, Color | Saturation in % (1-100) | +| | | Brightness | Dimmer, Color | Brightness in % (1-100). See "Usage of dimmer modes" for configuration details. | +| | | ColorTemperature | Number | Color temperature represented in reciprocal megaKelvin. The default value range is from 50 to 400. Color temperature should not be used in combination with hue, saturation and brightness. It supports following configuration parameters: minValue, maxValue | +| Fan | | | | Fan | +| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | +| | | CurrentFanState | Number | Current fan state. values: 0=INACTIVE, 1=IDLE, 2=BLOWING AIR | +| | | TargetFanState | Number, Switch | Target fan state. values: 0/OFF=MANUAL, 1/ON=AUTO. Flag [inverted="true"] swaps the default mapping | +| | | RotationDirection | Number, Switch | Rotation direction. values: 0/OFF=CLOCKWISE, 1/ON=COUNTER CLOCKWISE. Flag [inverted="true"] swaps the default mapping | +| | | RotationSpeed | Number, Dimmer | Fan rotation speed in % (1-100) | +| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED. Flag [inverted="true"] swaps the default mapping | +| | | LockControl | Number, Switch | Status of physical control lock. values: 0/OFF=CONTROL LOCK DISABLED, 1/ON=CONTROL LOCK ENABLED.Flag [inverted="true"] swaps the default mapping | +| Thermostat | | | | A thermostat requires all mandatory characteristics defined below | +| | CurrentTemperature | | Number | Current temperature. supported configuration: minValue, maxValue, step | +| | TargetTemperature | | Number | Target temperature. supported configuration: minValue, maxValue, step | +| | CurrentHeatingCoolingMode | | String | Current heating cooling mode (OFF, AUTO, HEAT, COOL). for mapping see homekit settings above. | +| | TargetHeatingCoolingMode | | String | Target heating cooling mode (OFF, AUTO, HEAT, COOL). for mapping see homekit settings above. | +| | | Name | String | Name of the thermostat | +| | | CoolingThresholdTemperature | Number | Maximum temperature that must be reached before cooling is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | +| | | HeatingThresholdTemperature | Number | Minimum temperature that must be reached before heating is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | +| HeaterCooler | | | | Heater or/and cooler device | +| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | +| | CurrentTemperature | | Number | Current temperature. supported configuration: minValue, maxValue, step | +| | CurrentHeaterCoolerState | | String | Current heater/cooler mode (INACTIVE, IDLE, HEATING, COOLING). Mapping can be redefined at item level, e.g. [HEATING="HEAT", COOLING="COOL"] | +| | TargetHeaterCoolerState | | String | Target heater/cooler mode (AUTO, HEAT, COOL). Mapping can be redefined at item level, e.g. [AUTO="AUTOMATIC"] | +| | | Name | String | Name of the heater/cooler | +| | | RotationSpeed | Number | Fan rotation speed in % (1-100) | +| | | SwingMode | Number, Switch | Swing mode. values: 0/OFF=SWING DISABLED, 1/ON=SWING ENABLED | +| | | LockControl | Number, Switch | Status of physical control lock. values: 0/OFF=CONTROL LOCK DISABLED, 1/ON=CONTROL LOCK ENABLED | +| | | CoolingThresholdTemperature | Number | Maximum temperature that must be reached before cooling is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | +| | | HeatingThresholdTemperature | Number | Minimum temperature that must be reached before heating is turned on. min/max/step can configured at item level, e.g. minValue=10.5, maxValue=50, step=2] | +| Lock | | | | A Lock Mechanism. with flag [inverted="true"] the default mapping to switch ON/OFF can be inverted. | +| | LockCurrentState | | Switch, Number | Current state of lock mechanism (1/ON=SECURED, 0/OFF=UNSECURED, 2=JAMMED, 3=UNKNOWN) | +| | LockTargetState | | Switch | Target state of lock mechanism (ON=SECURED, OFF=UNSECURED) | +| | | Name | String | Name of the lock | +| Valve | | | | Valve. additional configuration: homekitValveType = ["Generic", "Irrigation", "Shower", "Faucet"] | +| | ActiveStatus | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates that the accessory is active and is functioning without any errors. | +| | InUseStatus | | Switch | Indicates whether fluid flowing through the valve. A value of "ON"/"OPEN" indicates that fluid is flowing. | +| | | Duration | Number | Defines how long a valve should be set to ʼIn Useʼ in second. You can define the default duration via configuration homekitDefaultDuration = | +| | | RemainingDuration | Number | Describes the remaining duration on the accessory. the remaining duration increases/decreases from the accessoryʼs usual countdown. i.e. changes from 90 to 80 in a second. | +| | | Name | String | Name of the valve | +| | | FaultStatus | Switch, Contact | Accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | +| Faucet | | | | Faucet or shower. It should be used in combination with Valve or/and HeaterCooler. | +| | Active | | Switch | Accessory current working status. A value of "ON"/"OPEN" indicates faucet/shower is open. | +| | | Name | String | Name of the Faucet | +| | | FaultStatus | Switch, Contact | Accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | +| SecuritySystem | | | | Security system. | +| | CurrentSecuritySystemState | | String | Current state of the security system. STAY_ARM / AWAY_ARM / NIGHT_ARM / DISARMED / TRIGGERED. Mapping can be redefined at item level, e.g. [AWAY_ARM="AWAY", NIGHT_ARM="NIGHT" ] | +| | TargetSecuritySystemState | | String | Requested state of the security system. STAY_ARM / AWAY_ARM / NIGHT_ARM / DISARM. While the requested state is not DISARM, and the current state is DISARMED, HomeKit will display "Arming...", for example during an exit delay. Mapping can be redefined at item level, e.g. [AWAY_ARM="AWAY", NIGHT_ARM="NIGHT" ] | +| | | Name | String | Name of the security system | +| | | FaultStatus | Switch, Contact | accessory fault status. "ON"/"OPEN" value indicates that the accessory has experienced a fault that may be interfering with its intended functionality. A value of "OFF"/"CLOSED" indicates that there is no fault. | +| | | TamperedStatus | Switch, Contact | accessory tampered status. A status of "ON"/"OPEN" indicates that the accessory has been tampered with. Value should return to "OFF"/"CLOSED" when the accessory has been reset to a non-tampered state. | +| GarageDoorOpener | | | | A garage door opener. | +| | ObstructionStatus | | Switch | Current status of obstruction sensor. ON-obstruction detected, OFF - no obstruction | +| | CurrentDoorState | | String | Current door state. Possible values: OPEN, OPENING, CLOSED, CLOSING, STOPPED | +| | TargetDoorState | | Switch, String | Target door state. ON/"OPEN" = open door, OFF/"CLOSED" = closed door | +| | | Name | String | Name of the garage door | +| | | LockCurrentState | Switch | current states of lock mechanism (OFF=SECURED, ON=UNSECURED) | +| | | LockTargetState | Switch | target states of lock mechanism (OFF=SECURED, ON=UNSECURED) | +| Battery | | | | Accessory with battery. Battery can be chargeable (configuration chargeable:true) and non-chargeable (configuration chargeable:false) | +| | BatteryLevel | | Number | Battery level 0% to 100% | +| | BatteryLowStatus | | Switch, Contact | Battery low indicator. ON/OPEN = battery level is low. | +| | BatteryChargingState | | Switch, Contact | Mandatory only for chargeable battery. ON/OPEN = battery is charging | +| | | Name | String | Name of the battery accessory | +| Filter | | | | Accessory with filter maintenance indicator | +| | FilterChangeIndication | | Switch, Contact | Filter change indicator. ON/OPEN = filter change is required. | +| | | FilterLifeLevel | Number | Current filter life level. 0% to 100% | +| | | FilterResetIndication | Switch | Send "filter reset" action triggered by user in iOS home app to openHAB ("ON" = reset requested by user). | +| | | Name | String | Name of the filter accessory | +| Microphone | | | | Microphone accessory | +| | Mute | | Switch, Contact | Mute indication. ON/OPEN = microphone is muted | +| | | Name | String | Name of the microphone accessory | +| | | Volume | Number | Microphone volume from 0% to 100% | +| Speaker | | | | Speaker accessory | +| | Mute | | Switch, Contact | Mute indication. ON/OPEN = speaker is muted | +| | | Name | String | Name of the speaker accessory | +| | | Volume | Number | Speaker volume from 0% to 100% | +| | | Active | Switch, Contact | Working status | +| SmartSpeaker | | | | Smart speaker accessory with Play/Stop/Pause control | +| | CurrentMediaState | | String | Current smart speaker state. possible values (STOP,PLAY,PAUSE,UNKNOWN). Custom mapping can be defined at item level, e.g. [STOP="STOPPED", PLAY="PLAYING"] | +| | TargetMediaState | | String | Target smart speaker state. possible values (STOP,PLAY,PAUSE). Custom mapping can be defined at item level, e.g. [STOP="STOPPED", PLAY="PLAYING"] | +| | | Mute | Switch, Contact | Mute indication. ON/OPEN = speaker is muted | +| | | Name | String | Name of the speaker accessory | +| | | ConfiguredName | String | Name of the speaker accessory configured in iOS home app. User can rename speaker in iOS home app and this characteristic can be used to reflect change in openHAB and sync name changes from openHAB to home app. | +| | | Volume | Number | Speaker volume from 0% to 100% | ### Examples diff --git a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java index d6729f7f0..633b67246 100644 --- a/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java +++ b/bundles/org.openhab.io.homekit/src/main/java/org/openhab/io/homekit/internal/accessories/HomekitCharacteristicFactory.java @@ -634,23 +634,12 @@ public class HomekitCharacteristicFactory { private static TargetFanStateCharacteristic createTargetFanStateCharacteristic(HomekitTaggedItem taggedItem, HomekitAccessoryUpdater updater) { - return new TargetFanStateCharacteristic(() -> { - final @Nullable DecimalType value = taggedItem.getItem().getStateAs(DecimalType.class); - @Nullable - TargetFanStateEnum targetFanStateEnum = value != null ? TargetFanStateEnum.fromCode(value.intValue()) - : null; - if (targetFanStateEnum == null) { - targetFanStateEnum = TargetFanStateEnum.AUTO; - } - return CompletableFuture.completedFuture(targetFanStateEnum); - }, (targetState) -> { - if (taggedItem.getItem() instanceof NumberItem) { - ((NumberItem) taggedItem.getItem()).send(new DecimalType(targetState.getCode())); - } else { - logger.warn("Item type {} is not supported for {}. Only Number type is supported.", - taggedItem.getItem().getType(), taggedItem.getName()); - } - }, getSubscriber(taggedItem, TARGET_FAN_STATE, updater), + return new TargetFanStateCharacteristic( + () -> getEnumFromItem(taggedItem, TargetFanStateEnum.MANUAL, TargetFanStateEnum.AUTO, + TargetFanStateEnum.AUTO), + (targetState) -> setValueFromEnum(taggedItem, targetState, TargetFanStateEnum.MANUAL, + TargetFanStateEnum.AUTO), + getSubscriber(taggedItem, TARGET_FAN_STATE, updater), getUnsubscriber(taggedItem, TARGET_FAN_STATE, updater)); }