https://github.com/hansemannn/titanium-homekit
Support for the HomeKit framework in Appcelerator Titanium
https://github.com/hansemannn/titanium-homekit
appcelerator home-automation homekit ios javascript native titanium
Last synced: about 1 year ago
JSON representation
Support for the HomeKit framework in Appcelerator Titanium
- Host: GitHub
- URL: https://github.com/hansemannn/titanium-homekit
- Owner: hansemannn
- License: other
- Created: 2017-04-10T20:42:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T13:20:28.000Z (over 8 years ago)
- Last Synced: 2025-04-15T20:53:47.996Z (about 1 year ago)
- Topics: appcelerator, home-automation, homekit, ios, javascript, native, titanium
- Language: Objective-C
- Size: 265 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏡 iOS HomeKit in Appcelerator Titanium
Ti.HomeKit is an open-source project to support the HomeKit API in Appcelerator's Titanium.
## Requirements
- Titanium Mobile SDK 5.5.1.GA+
- iOS 8.0+
- Xcode 7.3+
## Download + Setup
### Download
* [Stable release](https://github.com/hansemannn/titanium-homekit/releases)
* [](http://gitt.io/component/titanium-homekit)
### Setup
Unpack the module and place it inside the `modules/iphone/` folder of your project.
Edit the modules section of your `tiapp.xml` file to include this module:
```xml
ti.homekit
```
Ensure that the HomeKit- and Wireless Configuration capabilities are added to your entitlements (example):
```xml
com.apple.developer.homekit
com.apple.external-accessory.wireless-configuration
```
Also ensure that the HomeKit- and location usage permissions are set in the tiapp.xml
```xml
NSLocationWhenInUseUsageDescription
HMCatalog needs your location to search for relevant places in your area.
NSHomeKitUsageDescription
HMCatalog needs access top your HomeKit devices.
```
## Example
- [x] app.js - Adding new homes, making a home primary
- [x] accessoryBrowser - Browsing accessories already added to your home
- [ ] Feel free to provide more examples!
## Supported API's
### Top-Module
#### Methods
- [x] `addHome`
- [x] `removeHome`
- [x] `updatePrimaryHome`
- [x] `createAccessoryBrowser`
#### Properties
- [x] `homes`
#### Events
- [x] `didAddHome`
- [x] `didRemoveHome`
- [x] `didUpdateHomes`
- [x] `didUpdatePrimaryHome`
### Home
#### Properties
- [x] `uniqueIdentifier`
- [x] `name`
#### Methods
- [x] `updateName`
- [x] `addAccessory`
- [x] `removeAccessory`
- [x] `assignAccessory`
- [x] `addAndSetupAccessories`
- [x] `manageUsers`
- [x] `addUser`
- [x] `removeUser`
- [x] `currentUser`
- [x] `homeAccessControlForUser`
- [x] `addRoom`
- [x] `removeRoom`
#### Events
- [x] `homeDidUpdateName`
- [x] `didAddAccessory`
- [x] `didRemoveAccessory`
- [x] `didAddUser`
- [x] `didRemoveUser`
- [x] `didAddRoom`
- [x] `didUpdateRoom`
- [x] `didUpdateNameForRoom`
- [x] `didRemoveRoom`
- [x] `didAddZone`
- [x] `didUpdateNameForZone`
- [x] `didRemoveZone`
- [x] `didAddRoomToZone`
- [x] `didRemoveRoomFromZone`
- [x] `didAddServiceGroup`
- [x] `didUpdateNameForServiceGroup`
- [x] `didRemoveServiceGroup`
- [x] `didAddServiceToServiceGroup`
- [x] `didRemoveServiceFromServiceGroup`
- [x] `didAddActionSet`
- [x] `didUpdateNameForActionSet`
- [x] `didUpdateActionsForActionSet`
- [x] `didAddActionSet`
- [x] `didAddTrigger`
- [x] `didUpdateTrigger`
- [x] `didUpdateNameForTrigger`
- [x] `didRemoveTrigger`
- [x] `didUnblockAccessory`
- [x] `didEncounterErrorForAccessory`
### AccessoryBrowser
#### Methods
- [x] `startSearchingForNewAccessories`
- [x] `stopSearchingForNewAccessories`
#### Properties
- [x] `discoveredAccessories`
#### Events
- [x] `didFindNewAccessory`
- [x] `didRemoveNewAccessory`
### Accessory
#### Properties
- [x] `uniqueIdentifier`
- [x] `name`
- [x] `isReachable`
- [x] `isBridged`
- [x] `isBlocked`
- [x] `room`
- [x] `services`
#### Events
- [x] `didUpdateName`
- [x] `didUpdateNameForService`
- [x] `didUpdateAssociatedServiceTypeForService`
- [x] `didUpdateServices`
- [x] `didUpdateReachability`
- [x] `didUpdateValueForCharacteristic`
### Service
#### Properties
- [x] `uniqueIdentifier`
- [x] `name`
- [x] `serviceType`
- [x] `localizedDescription`
### Room
#### Properties
- [x] `uniqueIdentifier`
- [x] `name`
- [x] `accessories`
### User
#### Properties
- [x] `uniqueIdentifier`
- [x] `name`
## Author
Hans Knoechel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](http://hans-knoechel.de))
## License
Apache 2.0
## Contributing
Code contributions are greatly appreciated, please submit a new [pull request](https://github.com/hansemannn/titanium-homekit/pull/new/master)!