Homekit accessory protocol specification

Содержание

HomeKit Accessory Protocol Specification

When I’m coding a new ESP-HomeKit accessory I use the free HomeKit Accessory Protocol Specification (Non-Commercial Version) form Apple. To see how to use the characteristics and what type of options there are for a specific type of accessory. All you need or want to know can be found in this protocol.

Overview

HomeKit Accessory Protocol (HAP) is Apple’s proprietary protocol that enables third-party accessories in the home (e.g., lights, thermostats and door locks) and Apple products to communicate with each other. HAP supports two transports, IP and Bluetooth LE. The information provided in the HomeKit Accessory Protocol Specification (Non-Commercial Version) describes how to implement HAP in an accessory that you create for non-commercial use and that will not be distributed or sold.

How do I access the specification?

The HomeKit Accessory Protocol Specification (Non-Commercial Version) can be downloaded from the HomeKit Apple Developer page. Before downloading the file, you will need to sign in with your Apple ID, then review and execute a click-through agreement.

How will a commercial HomeKit accessory be different from an accessory that I create using this specification?

Unlike a non-commercial HomeKit accessory, a HomeKit accessory that will be distributed or sold must incorporate the Apple Authentication Coprocessor, obtain Wi-Fi Alliance certification or Bluetooth SIG certification depending on the transport used, and complete HomeKit certification under the MFi Program. At a user level, a non-commercial accessory will use a different process for on-boarding an IP-based accessory to the network, and will present a warning dialog in iOS that the user must acknowledge before continuing.

Where can I ask more questions about implementing HAP?

To ask technical questions and discuss the HomeKit Accessory Protocol with other developers and smart home enthusiasts, visit the Apple Developer Forums.

Источник

Using the HomeKit Accessory Protocol Specification

(Noncommercial Version)

HomeKit Accessory Protocol (HAP) is Apple’s proprietary protocol that enables third-party accessories in the home (such as lights, thermostats, and door locks) and Apple products to communicate with each other. HAP supports two transports, IP and Bluetooth LE . The information provided in the HomeKit Accessory Protocol Specification (Noncommercial Version) describes how to implement HAP in an accessory that you create for noncommercial use and that won’t be distributed or sold.

How do I access the specification?

Sign in with your Apple ID to access the HomeKit Accessory Protocol Specification (Noncommercial Version). Before downloading the file, you’ll need review and execute a click-through agreement.

How will a commercial HomeKit accessory be different from an accessory that I create using this specification?

Unlike a noncommercial HomeKit accessory, a commercial HomeKit accessory that will be distributed or sold must incorporate the Apple Authentication Coprocessor, obtain Wi-Fi Alliance certification or Bluetooth SIG certification depending on the transport used, and complete HomeKit certification under the MFi Program. At a user level, a non-commercial accessory will use a different process for onboarding an IP-based accessory to the network, and it will present a warning dialog in iOS that the user must acknowledge before continuing.

How do I develop or manufacture a HomeKit-enabled accessory for distribution or sale?

Your company must first enroll in the MFi Program. HomeKit accessories that are distributed or sold to third parties must comply with MFi Program requirements, including completion of HomeKit certification, before being manufactured, distributed, or sold.

No, the logo may only be used in connection with commercial accessories that have completed HomeKit certification under the MFi Program.

Technical

Will I be able to control my accessory using the Home app and Siri, and create scenes?

Yes, if you implement HAP using the Apple-defined HomeKit services and characteristics documented in the specification and are running iOS 10 or later, you’ll be able to use all of these features. Learn more about using the Home app.

Can I create an accessory that isn’t yet supported through an Apple-defined HomeKit service?

Yes, you can create an accessory that implements HAP using custom characteristics. In order to control this accessory, you’ll need to develop a custom app that uses HomeKit APIs. You won’t be able to control it through the Home app or Siri.

How will I pair my accessory with an iOS device?

For IP accessories, the accessory and iOS device must first be on the same Wi-Fi network. The method for getting the accessory on the network will vary depending on the development platform you’re using. Then you’ll be able to complete the pairing process through the Home app or through your custom app. For BLE accessories, pair your iOS device with the accessory in iOS as you normally would.

Will I be able to remotely control my accessory and set up automations using the Home app?

Yes, you’ll be able to do this if the accessory uses Apple-defined characteristics and you have an iPad or Apple TV (4th generation) set up as your home hub. Learn about controlling your HomeKit accessories through the Home app.

What security features does HAP use?

All sessions between HomeKit accessories and Apple products over HAP are end-to-end encrypted and mutually authenticated.

Does an IP-based HomeKit accessory have to implement Bonjour?

Yes, it must implement Bonjour to enable discovery of the accessory. View Bonjour source code and specifications.

Does a Bluetooth LE-based accessory have to adhere to the Bluetooth core specification?

Adherence to the Bluetooth core specification is strongly recommended to ensure proper functioning of the accessory.

Is a HomeKit SDK available from Apple?

No, not at this time.

Why does my accessory trigger a warning dialog on the iOS device?

Accessories that don’t incorporate the Apple Authentication Coprocessor will trigger a warning dialog in iOS indicating that the accessory is not certified to work with HomeKit. The user can acknowledge the warning in iOS in order to continue using the accessory.

Can I put an Apple Authentication Coprocessor in my accessory?

No, the authentication coprocessor is only intended for use in commercial HomeKit accessories. This component is available to companies that are enrolled in the MFi Program.

Where can I ask more questions about implementing HAP?

To ask technical questions and discuss the HomeKit Accessory Protocol with other developers and smart home enthusiasts, visit the Apple Developer Forums.

Источник

Developing apps and accessories for the home

Let people communicate with and control connected accessories in their home using your app. With the HomeKit framework, you can provide ways to configure accessories and create actions to control them. Users can even group actions together and trigger them using Siri.

Developing with HomeKit

Whether you’re an app developer, smart home enthusiast, or manufacturer, you can learn how to use HomeKit to create apps and accessories for the home.

Learn how iOS, iPadOS, tvOS, and watchOS apps seamlessly integrate with HomeKit accessories.

Accessories

Learn and explore how to create accessories for your home using the HomeKit Accessory Protocol.

Works with Apple Home badge

The Works with Apple Home badge can be used to visually communicate that your accessory is compatible with the Apple Home app and Siri on Apple devices.

HomeKit

If you plan to develop or manufacture a HomeKit accessory that will be distributed or sold, your company will need to enroll in the MFi Program.

MFi licensees get access to:

  • HomeKit Accessory Protocol Specification (commercial version).
  • Third-party SDKs for commercial development.
  • Works with Apple Home certification and tools.
  • Logo artwork and identity guidelines.

Matter

For Matter-certified accessories, requirements to use the badge will be available soon, along with downloadable artwork files and identity guidelines for packaging and marketing communications.

Get ready for Matter

With the beta version of iOS 16.1 and iPadOS 16.1 , you can test your smart home apps and accessories with Matter , the unifying open connectivity standard designed to increase the compatibility of smart home accessories. Existing HomeKit APIs automatically work with Matter-enabled accessories, so you don’t need to make any changes to your apps that support HomeKit. Find out more about Matter standard and open source implementation on GitHub .

Источник

Apple Opens HomeKit Accessory Protocol Specification to Non-Commercial Projects

HomeKit is a software framework that allows Apple users to control smart devices with their iPhone or iPad. But so far, you had to become an MFI licensee to design a HomeKit compatible device, you product had to be tested by Apple, and – according to a story on Hackster.io – also required a special cryptographic chip for authentication. Developers creating commercial devices still need to become an MFI license, but Apple has now opened HomeKit Accessory Protocol Specification for non-commercial projects, meaning you can now use the Framework on Arduino, ESP8266 boards, Raspberry Pi, and other development boards using software authentication.

You could already use HomeKit on Raspberry Pi board previously using HomeBridge, but the advantage now is that you don’t need to breach Apple’s terms and conditions, and you can talk directly to your phone without the need for a bridge.

If you want the specifications got to HomeKit’s developer page, click on “HomeKit Accessory Protocol Specification”, login with your Apple ID, and download the specs after the following disclaimer and agreeing with a license agreement:

HomeKit Accessory Protocol Specification

This document describes how to create HomeKit accessories that communicate with Apple products using the HomeKit Accessory Protocol for non-commercial purposes.

Companies that intend to develop or manufacture a HomeKit-enabled accessory that will be distributed or sold must be enrolled in the MFi Program.

Continue to License agreement.

Thanks to Harley for the tip.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.

Источник

Как создать свои собственные аксессуары с поддержкой HomeKit |

Apple открыла спецификацию протокола аксессуаров HomeKit для всех разработчиков! Что такое «Спецификация протокола аксессуаров HomeKit»? Это средство, с помощью которого подключенные аксессуары для дома обмениваются данными с устройствами Apple через HomeKit. Другими словами, вы можете создавать собственные аксессуары с поддержкой HomeKit и управлять ими с помощью Siri и приложения Home для iOS.

До настоящего времени только компании, которые намеревались распространять свои аксессуары с поддержкой HomeKit на коммерческой основе, могли использовать спецификацию Apple HomeKit Accessory Protocol. Разработчики должны были запросить лицензирование через программу Apple MFi и пройти тщательное тестирование, чтобы заявить о себе Работает с Apple HomeKit значок. Теперь, если вы хотите создавать аксессуары с поддержкой HomeKit для некоммерческих целей (например, если вы любитель или считаете себя «создателем»), вы можете! Вот как вы получаете мяч катится.

Перво-наперво: вы должны быть зарегистрированным разработчиком. Вам нужна зарегистрированная учетная запись разработчика, чтобы получить доступ к дополнительному протоколу HomeKit (здесь и далее упоминается как HAP). Предполагая, что вы зарегистрированный разработчик, вот первые шаги:

  1. Перейдите на страницу разработчиков Apple для спецификации HAP: https://idmsa.apple.com/IDMSWebAuth/signin.html?path=%2F%2Fhomekit%2Fspecification%2FappIdKey=891bd3417a7776362562d2197f89480a8547b108ff9340101759019
  2. При появлении запроса войдите в систему, используя свой Apple ID и пароль.
  3. Нажмите Продолжить лицензионное соглашение.
  4. Прочитайте ограниченное лицензионное соглашение и установите флажок чтобы подтвердить, что вы прочитали это.
  5. Нажмите Я согласен.
  6. Нажмите Скачать скачать спецификацию HAP.

HAP Specification — это 256-страничный PDF-файл, содержащий всю необходимую информацию о создании аксессуаров с поддержкой HomeKit, которые могут взаимодействовать с устройствами Apple. Существуют определенные требования, которым должен соответствовать ваш аксессуар, чтобы использовать платформу HomeKit, но они не так строги, как требования к коммерческим аксессуарам HomeKit.

  • Apple заявляет, что коммерческие аксессуары должны иметь сопроцессор Apple Authentication, должны соответствовать спецификации ядра Bluetooth или получить сертификат Wi-Fi Alliance и должны быть сертифицированы в рамках программы Apple MFi.
  • Некоммерческие аксессуары HomeKit не смогут рекламировать Работает с Apple HomeKit значок. Любой, кто добавит некоммерческий аксессуар HomeKit в свою настройку HomeKit, увидит приглашение, указывающее, что он не сертифицирован для работы с HomeKit, но это всего лишь предупреждение — вы все равно сможете добавить аксессуар.

После того, как вы прочитали спецификацию HAP и узнали, что можете создать устройство, которое соответствует всем необходимым спецификациям, пришло время взломать!

Создание собственного аксессуара с поддержкой HomeKit

Спецификация протокола HomeKit теперь открыта для всех разработчиков! Может создавать интеллектуальное устройство с использованием Arduino и управлять им через HomeKit без получения лицензии MFI

— Виктор Ильюкевич (@ yas375) 7 июня 2017 г.

Как отметил Виктор Ильюкевич в Twitter, это означает покупку или настройку аксессуара с помощью Arduino и управление им с помощью Apple HomeKit.

Вы можете, например, получить Arduino MKR1000, который предлагает следующие функции:

  • SAMD21 Cortex-M0 + 32-битный ARM MCU малой мощности
  • WINC1500 с низким энергопотреблением 2,4 ГГц IEEE® 802.11 b / g / n Wi-Fi
  • ECC508 CryptoAuthentication

Посмотреть на Arduino

Вы можете использовать его для создания любого количества аксессуаров с поддержкой HomeKit, если они соответствуют спецификации HAP. После того, как вы определились со своей идеей, подписали лицензионное соглашение, прочитали спецификацию HAP и настроили Arduino (или другой коммуникационный аксессуар), вы просто захотите убедиться, что ваше устройство соответствует спецификации HAP и может общаться с Apple HomeKit. Все, что вам нужно знать, можно найти в спецификации HAP, которую вы можете скачать, выполнив следующие действия.

Мысли, вопросы?

Как вы думаете? В восторге от того, что каждый может создать свои собственные аксессуары с поддержкой HomeKit и управлять ими с помощью приложения Home для iOS и Siri? Я знаю, что я есть! Я попытаюсь погрузиться в спецификацию HAP и посмотреть, не могу ли я получить свой собственный свернутый аксессуар с поддержкой HomeKit (устройство доставки лакомства для собак, кто-нибудь?). По пути я буду делать заметки, поэтому обязательно зайдите в будущее, чтобы узнать, как это сделать!

Источник

Adblock
detector