Giter VIP home page Giter VIP logo

homekitbridge's Introduction

Demo

https://www.youtube.com/watch?v=n1Yr9xclh8w

HomeKitBridge

An API designed to easily allow you to hook up existing devices and services to HomeKit using the private "HomeKit Accessory" Framework bundled with the HomeKit Accessory Simulator. Basically just wraps the private HomeKitAccessoryKit framework API's in a way designed to bridge across to other products APIs.

All accessories are their own accessory with this API. It doesn't simulate a HomeKit "bridge" but instead pretends all the accessories natively support HomeKit.

Accessories aren't persisted to file and reloaded each time. This is on purpose as it is presumed you'll be using an existing API to discover and setup devices each time.

Accessories do cache their "Transport and Transport Manager" to file though, as you can see in HKBAccessory.m:147. The reason for this is because each time a "transport" object is created it generates a new password. If it wasn't saved to file then on your iPhone you'd have to reconnect to and setup all your devices each time this application starts up.

Instead the "Transport" objects are saved to file before they have any accessories or characteristics attached to them (so those don't save as well).

Supported Devices

Building

Make sure you have the HomeKit Accessory Simulator installed in "/Applications" The project reaches inside it and grabs the private framework as it builds.

The easiest way to get the HomeKit simulator is to go in Xcode to the menu bar > Xcode > Open Developer Tool > More Developer Tools... > And then download "Hardware tools for Xcode 6.1".

On your iOS device

To setup the HomeKit accessories on your device you'll need a HomeKit app. Apple doesn't provide one and I don't know of any in the AppStore. I'm currently using this one: https://github.com/KhaosT/HomeKit-Demo

TODO

Support other device types besides lights.

Documentation (I'll write some soon). For now just read "HKBAccessory.h" for an overview. Look in AppDelegate.m to see how to use the API once everything is in place (very simple). Look at "HKBLightAccessory" to see an example of how to write an accessory subclass.

The HKBLightAccessory class is abstract and doesn't link to any devices API directly. Instead look at HKBLightAccessoryLIFX.m to see a self contained subclass that links a light object from LIFX's API to the HomeKit API.

Thanks

homekitbridge's People

Contributors

antoinelamy avatar jeffreyjackson avatar kylehowells avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.