Today we will talk about how to DIY our devices with homekit. Our devices could connect with homekit through home assistant platform. Currently our wifi plug, bulb, bulb adapter, power strip support homekit.
Step1: Prepare Raspberry and install the home assistant
You need prepare an Raspberry PI. Here we test with Raspberry PI 3B+.
You need install the home assistant in the Raspberry. There are different ways to install the home assistant. We will not talk detail about how to install home assistant here. You could look for the data in the website to install. For example: https://www.home-assistant.io/hassio/installation/ . We test with Raspberry+Docker+Hass+Home assistant.
Step2:setup the parameter
After install the home assistant. There will be an file configuration.yaml.
Add the code like below, pls input your own app username, password and your country code.
You will get an homekit code in the home assistant UI and enter the code in homekit to install.
Now you could control your devices in the Lan by homekit.
Step3:setup an home hub
If you want to control these devices anywhere, you need to setup an home hub. You could set an apple tv, homepod or ipad as an center.
We set an ipad as home hub as exmple. First turn on the Two-Factor Authentication in Settings->Password & security.
Second turn on settings->home->uses this ipad as a home hub.
Now your other apple devices could login with this icloud ID to control the homekit remotely anywhere.