GithubHelp home page GithubHelp logo

libhap's Introduction

libhap

License: MIT

Minimalist C library for with Apple HomeKit accessories.

Note: This is still in active development, but works well enough for simple accessories such as a light bulb.

External dependencies

  • openssl >= 1.1.1
  • avahi-client

Note: OpenSSL 1.1.1 is relatively new and is only available on releases such as Ubuntu 18.04+, Raspbian Buster, etc.

libhap itself includes these excellent libraries:

Building

make

Running example

./hap

Building (and installing) a library

make solib
sudo make install # Installs in /usr/local

make install PREFIX=/some/other/path # Install in ${PREFIX} instead

Using

The API is documented in src/hap.h

The example in src/main.c contains a few examples for how to create:

  • A light-bulb accessory using the hap_light_builb_create() convenience function.
  • An RGB light accessory using the hap_rgb_light_create() convenience function.
  • A Bridge combining the accessories above.

To create more complex accessories, please read Apple's Using the HomeKit Accessory Protocol Specification to understand the relationship between accessories, services and characteristics.

The plan is to add many more convenience functions to ease usage.

Made By

Andreas Smas - https://lonelycoder.com - https://twitter.com/andoma

libhap's People

Contributors

andoma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

libhap's Issues

libhap without avahi-client

Thank you for the lib. I trying to create an accessory based on OpenWRT (for old Kankun SP3 Smart Plug).
The OpenWRT already has a MDNS daemon (procd_add_mdns) and in the same time very limited in disk size.
Is it possible to make libhap without avahi?
Or maybe you can recommend some other library

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.