GithubHelp home page GithubHelp logo

datutax / esp8266-homekit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from homeaccessorykid/esp8266-homekit

0.0 1.0 0.0 765 KB

HomeKit server Native on ESP8266_RTOS with an API approach

Home Page: https://www.youtube.com/watch?v=Xnr-utWDIR8

License: Apache License 2.0

Makefile 0.77% Shell 0.16% C 99.07%

esp8266-homekit's Introduction

ESP8266-HomeKit Build Status

HomeKit server foundation on ESP8266 with an API approach

UPDATE 17 Dec 2017

Please read the message in issue 41 about the switchover to Maxim Kulkin code base.


Public Apple's HomeKit protocol code has been around for some time for more potent processors (notably HAP-NodeJS). This is a rewrite for the ESP8266 to make the server foundation. This project uses ESP8266_RTOS_SDK and WolfCrypt 3.9.8 for the crypto. It will however NOT deliver a certified HomeKit device.

For build instructions please refer to the wiki.

Demo

If you use the Demo Code from ESP8266-HomeKit-Demo you get this... HomeKit Demo

About the code

The code provides all the services required to pair iOS with an IP device and to operate that device once paired with multiple iOS devices. It runs on even the smallest ESP8266 device like the ESP-01. It creates an API level to create your HomeKit device without descending to the lower levels of the HAP protocol.
See the ESP8266-HomeKit-Demo for the details.

Timings

Here are some preliminary timings.

Pairing

Pairing is dominated by the SRP algorithm which is very slow and expensive. Fortunately this only happens once when the iOS device is being associated with the HomeKit device:

  • Time1: 25 seconds from boot till start of server, so that initial interaction is split second.

  • Time2: 30 seconds (based on a build with DEBUG logging which is slow).

Verify

Verify happens every time an iOS device reconnected to the HomeKit device. Ideally this should be as fast as possible.

  • Time: 1.2 seconds

Memory

The HomeKit code is approximately 400K and about 18K of RAM is left for other purposes. During Pairing so much RAM is used that it is required to launch most code after pairing is done.

Thanks

I want to thank a number of projects which made this possible:

  1. HAP-NodeJS - which documents the HomeKit protocols for IP and allowed me to guess how they were implemented.

  2. https://github.com/aanon4/HomeKit - which inspired this README and should inspire us to look into assembly.

  3. ESP8266_RTOS_SDK - Espressif for their great product

  4. WolfCrypt - For a great one stop crypto library

Notes

Please note that this software was produced without any reference to any proprietary documentation or information. I am not a MFi licensee, nor do I have access to any related information.

Espressif uses MIT license. WolfCrypt uses GPLv2 or higher license. For the purpose of this distribution you should use GPLv3.
This is based on the changes I had to make to Wolfcrypt and to be compatible with Apache-2.0 license.

License

Copyright 2016-2017 HomeACcessoryKid - HacK - [email protected]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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.