Giter Site home page Giter Site logo

foxcat007 / esp8266-homekit-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from homeaccessorykid/esp8266-homekit-demo

0.0 2.0 0.0 55 KB

User part of the ESP8266-HomeKit foundation

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

License: Apache License 2.0

Makefile 13.22% C 77.47% Shell 9.31%

esp8266-homekit-demo's Introduction

ESP8266-HomeKit-Demo Build Status

User part of the ESP8266-HomeKit foundation

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 for you to play with. Note that this does not get you a certified HomeKit accessory!

For the latest build instructions please refer to the wiki or go into the Demo directory.

Demo

HomeKit DemoRGB led lamp

About the code

The Demo code provides an example of how to create a basic accessory with a dimmable light and an on/off led (GPIO2). It uses the ESP8266-HomeKit API to create your HomeKit device without descending to the lower levels of the HAP protocol.

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.

Practical HardWare

There is a repository for practical HardWare to deploy your code.

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

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.

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.

esp8266-homekit-demo's People

Contributors

adysan avatar homeaccessorykid avatar

Watchers

 avatar  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.