HAP-Java is a Java implementation of the HomeKit Accessory Protocol.
Using this library, you can create your own HomeKit Accessory or HomeKit Accessory Bridge.
This library would not have been possible without Tian Zhang who did a lot of the hard work of figuring out how the protocol works in his NodeJS implementation.
Include HAP-Java in your project using maven:
<dependency>
<groupId>io.github.hap-java</groupId>
<artifactId>hap</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
After that, check out the Sample and read the Javadoc
Current implementation fully supports 38 HomeKit accessory/services.
HomeKit Accessory & Service type | Supported by Java-HAP |
---|---|
Accessory Information | ✅ |
Air Purifier | ✅ |
Air Quality Sensor | ✅ |
Audio Stream Management | ❌ |
Battery Service | ✅ |
Camera RTP Stream Management | ❌ |
Carbon Dioxide Sensor | ✅ |
Carbon Monoxide Sensor | ✅ |
Contact Sensor | ✅ |
Data Stream Transport Management | ❌ |
Door | ✅ |
Doorbell | ✅ |
Fan | ✅ |
Faucet | ✅ |
Filter Maintenance | ✅ |
Garage Door Opener | ✅ |
HAP Protocol Information | ✅ |
Heater Cooler | ✅ |
Humidifier Dehumidifier | ✅ |
Humidity Sensor | ✅ |
Irrigation System | ✅ |
Leak Sensor | ✅ |
Light Bulb | ✅ |
Light Sensor | ✅ |
Lock Management | ❌ |
Lock Mechanism | ✅ |
Microphone | ✅ |
Motion Sensor | ✅ |
Occupancy Sensor | ✅ |
Outlet | ✅ |
Security System | ✅ |
Service Label | ✅ |
Siri | ❌ |
Slat | ✅ |
Smoke Sensor | ✅ |
Speaker | ✅ |
Stateless Programmable Switch | ✅ |
Switch | ✅ |
Target Control | ❌ |
Target Control Management | ❌ |
Temperature Sensor | ✅ |
Thermostat | ✅ |
Valve | ✅ |
Window | ✅ |
Window Covering | ✅ |