Skip to content

Commit e61fccc

Browse files
J-N-KEugen Freiter
andauthored
add more accessories, characteristics and fixes (#8)
* reduce log leve. align more with OH guidance on logging Signed-off-by: Eugen Freiter <freiter@gmx.de> * add service label service and hap protocol version service. fix Mute characteristic Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix the Id for TargetHorizontalTiltAngleCharacteristic Signed-off-by: Eugen Freiter <freiter@gmx.de> * add Faucet and HeaterCooler Signed-off-by: Eugen Freiter <freiter@gmx.de> * add humidifier dehumidifier accessory Signed-off-by: Eugen Freiter <freiter@gmx.de> * add irrigation system, clean up javadocs Signed-off-by: Eugen Freiter <freiter@gmx.de> * remove reference to spec Signed-off-by: Eugen Freiter <freiter@gmx.de> * add support for custom min/max values for temperatures Signed-off-by: Eugen Freiter <freiter@gmx.de> * fix typos. add support for custom min/max values for threshold temperatures Signed-off-by: Eugen Freiter <freiter@gmx.de> * add constants for default min/max values Signed-off-by: Eugen Freiter <freiter@gmx.de> Co-authored-by: Eugen Freiter <freiter@gmx.de>
1 parent 824957f commit e61fccc

File tree

196 files changed

+1896
-671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+1896
-671
lines changed

CHANGES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# HAP-Java 2.0.0
22
* major refactoring to support optional characteristics
3-
* structure and names are adapted to HAP spec structure and naming.
3+
* structure and names adapted to HAP spec structure and naming.
44
* structure is following
55
* `accessory` package include basis accessory as the listed in HAP spec, plus interfaces for optional characteristics. clients should extend the accessory classes. e.g. `WindowCoveringAccessory` or `AccessoryWithBrightness`
66
* `characteristics` package consists of all characteristics, optional and mandatory. e.g. `TargetHorizontalTiltAngleCharacteristic`. The naming is done in accordance to HAP spec.
7-
* `services` package consists of services, which grouping characteristics. e.g. `WindowCoveringService` defines mandatory and optional characteristics for a window covering service as it is defined in HAP spec.
8-
* `server` package consists classes to run homekit server and handle communication
9-
* the process is following: client, e.g. Openhab bindings, extends accessory classes, e.g. `WindowCoveringAccessory` and implements all required methods. WindowCoveringAccessory is linked already to WindowCoveringService, that in turn is link to single characteristics.
7+
* `services` package consists of services, which grouping characteristics. e.g. `WindowCoveringService` defines mandatory and optional characteristics for a window covering service as it is defined in HAP spec.
8+
* `server` package consists classes to run HomeKit server and handle communication
9+
* the process is following: client, e.g. openHAB bindings, extends accessory classes, e.g. `WindowCoveringAccessory` and implements all required methods. WindowCoveringAccessory is linked already to WindowCoveringService, that in turn is link to single characteristics.
1010

1111
# HAP-Java 1.1.5
1212

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
HAP-Java
22
=========
3-
HAP-Java is a Java implementation of the Homekit Accessory Protocol.
3+
HAP-Java is a Java implementation of the HomeKit Accessory Protocol.
44

5-
Using this library, you can create your own Homekit Accessory or Homekit Accessory Bridge.
5+
Using this library, you can create your own HomeKit Accessory or HomeKit Accessory Bridge.
66

77
This library would not have been possible without [Tian Zhang](https://github.com/KhaosT) who did a lot of the hard work of figuring out how the protocol works in his NodeJS implementation.
88

99
Usage
1010
=========
1111
Include HAP-Java in your project using maven:
12+
1213
```
1314
<dependency>
1415
<groupId>io.github.hap-java</groupId>
@@ -17,15 +18,14 @@ Include HAP-Java in your project using maven:
1718
</dependency>
1819
```
1920

20-
After that, read the [Javadoc](http://beowulfe.github.io/HAP-Java/apidocs/) and check out the [Sample](https://github.com/beowulfe/HAP-Java/tree/sample).
21+
After that, check out the [Sample](https://github.com/hap-java/HAP-Java/tree/sample).
2122

2223
Supported HomeKit Accessories
2324
=========
2425

25-
Current implementation is based on HAP specification Release R2 (published 2019-07-26) and
26-
fully supports 31 out of 48 HomeKit accessories defined there.
26+
Current implementation fully supports 37 HomeKit accessory/services.
2727

28-
| HomeKit Accessory | Supported by Java-HAP |
28+
| HomeKit Accessory & Service type | Supported by Java-HAP |
2929
|--------------------|--------------------|
3030
| Accessory Information | :white_check_mark: |
3131
| Air Purifier | :white_check_mark: |
@@ -40,14 +40,14 @@ fully supports 31 out of 48 HomeKit accessories defined there.
4040
| Door | :white_check_mark: |
4141
| Doorbell | :white_check_mark: |
4242
| Fan | :white_check_mark: |
43-
| Faucet | :x: |
43+
| Faucet | :white_check_mark: |
4444
| Filter Maintenance | :x: |
4545
| Garage Door Opener | :white_check_mark: |
46-
| HAP Protocol Information | :x: |
47-
| Heater Cooler | :x: |
48-
| Humidifier Dehumidifier | :x: |
46+
| HAP Protocol Information | :white_check_mark: |
47+
| Heater Cooler | :white_check_mark: |
48+
| Humidifier Dehumidifier | :white_check_mark: |
4949
| Humidity Sensor | :white_check_mark: |
50-
| Irrigation System | :x: |
50+
| Irrigation System | :white_check_mark: |
5151
| Leak Sensor | :white_check_mark: |
5252
| Light Bulb | :white_check_mark: |
5353
| Light Sensor | :white_check_mark: |
@@ -58,7 +58,7 @@ fully supports 31 out of 48 HomeKit accessories defined there.
5858
| Occupancy Sensor | :white_check_mark: |
5959
| Outlet | :white_check_mark: |
6060
| Security System | :white_check_mark: |
61-
| Service Label | :x: |
61+
| Service Label | :white_check_mark: |
6262
| Siri | :x: |
6363
| Slat | :white_check_mark: |
6464
| Smoke Sensor | :white_check_mark: |
@@ -69,6 +69,6 @@ fully supports 31 out of 48 HomeKit accessories defined there.
6969
| Target Control Management | :x: |
7070
| Temperature Sensor | :white_check_mark: |
7171
| Thermostat | :white_check_mark: |
72-
| Valve | :white_check_mark: |
73-
| Window | :white_check_mark: |
74-
| Window Covering | :white_check_mark: |
72+
| Valve | :white_check_mark: |
73+
| Window | :white_check_mark: |
74+
| Window Covering | :white_check_mark: |

src/main/java/io/github/hapjava/accessories/AirPurifierAccessory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
import java.util.Collections;
1010
import java.util.concurrent.CompletableFuture;
1111

12-
/**
13-
* An air purifier.
14-
*
15-
* @author Eugen Freiter
16-
*/
12+
/** An air purifier. */
1713
public interface AirPurifierAccessory extends HomekitAccessory {
1814
/**
1915
* Mandatory: Retrieves the current active state of the fan'.

src/main/java/io/github/hapjava/accessories/AirQualityAccessory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
import java.util.Collections;
99
import java.util.concurrent.CompletableFuture;
1010

11-
/**
12-
* An air quality accessory which can include several sensors.
13-
*
14-
* @author Eugen Freiter
15-
*/
11+
/** An air quality accessory which can include several sensors. */
1612
public interface AirQualityAccessory extends HomekitAccessory {
1713

1814
/**

src/main/java/io/github/hapjava/accessories/Bridge.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.hapjava.accessories;
22

3+
/** HomeKit bridge service. */
34
public interface Bridge extends HomekitAccessory {
45

56
@Override

src/main/java/io/github/hapjava/accessories/CarbonDioxideSensorAccessory.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@
88
import java.util.Collections;
99
import java.util.concurrent.CompletableFuture;
1010

11-
/**
12-
* A carbon dioxide sensor reports whether carbon dioxide has been detected or not.
13-
*
14-
* <p>Carbon dioxide sensors that run on batteries will need to implement this interface and also
15-
* implement {@link BatteryAccessory}.
16-
*
17-
* @author Eugen Freiter
18-
*/
11+
/** A carbon dioxide sensor reports carbon dioxide level. */
1912
public interface CarbonDioxideSensorAccessory extends HomekitAccessory {
2013

2114
/**

src/main/java/io/github/hapjava/accessories/CarbonMonoxideSensorAccessory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
/**
1212
* A carbon monoxide sensor reports whether carbon monoxide has been detected or not.
1313
*
14-
* <p>Carbon monoxide sensors that run on batteries will need to implement this interface and also
15-
* implement {@link BatteryAccessory}.
16-
*
1714
* @author Gaston Dombiak
1815
*/
1916
public interface CarbonMonoxideSensorAccessory extends HomekitAccessory {

src/main/java/io/github/hapjava/accessories/ContactSensorAccessory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
* A contact sensor that reports whether contact is detected or not. Typical contact sensors are
1313
* window/door sensors. When contact is detected it means that the door/window is closed.
1414
*
15-
* <p>Contact sensors that run on batteries will need to implement this interface and also implement
16-
* {@link BatteryAccessory}.
17-
*
1815
* @author Gaston Dombiak
1916
*/
2017
public interface ContactSensorAccessory extends HomekitAccessory {

src/main/java/io/github/hapjava/accessories/DoorAccessory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
import java.util.Collections;
99
import java.util.concurrent.CompletableFuture;
1010

11-
/**
12-
* A door with status
13-
*
14-
* @author Eugen Freiter
15-
*/
11+
/** A motorized door with current and target position. */
1612
public interface DoorAccessory extends HomekitAccessory {
1713

1814
/**

src/main/java/io/github/hapjava/accessories/DoorbellAccessory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88
import java.util.Collections;
99
import java.util.concurrent.CompletableFuture;
1010

11-
/**
12-
* The Doorbell accessory describes a doorbell.
13-
*
14-
* @author Eugen Freiter
15-
*/
11+
/** doorbell accessory with a switch (button push) event. */
1612
public interface DoorbellAccessory extends HomekitAccessory {
1713

1814
/**

0 commit comments

Comments
 (0)