HomeKit and Siri¶
With HomeKit integration you will be able to control your IoT projects from your iOS or macOS device. After you have your device in your Home app, you can control it using Siri. In the end of article you will ask Siri for temperature in your bedroom and she will tell you back temperature from your HARDWARIO temperature sensor!
If you want to use following integration on HARDWARIO Hub or on Debian and Ubuntu system, you have to install few dependencies. Connect to command line of HARDWARIO Hub, use article Rasperry Pi Login. After you login in, copy, paste and run commands.
sudo apt-get update
sudo apt-get install libavahi-compat-libdnssd-dev
Open HARDWARIO Hub in your Browser (Linux and macOS can use hub.local, on Windows you have to use IP address of HARDWARIO Hub). In menu select functions and on top right corner click on hamburger menu. Click on manage palette and select Install card, where search:
When message with title Installing ‘node-red-contrib-homekit-bridged’ pops up, just click Install. After Installation you will see module in advacted group.
Step 1: Flash firmware¶
We have installed HomeKit plugin to Node-RED. Now open HARDWARIO Playground on your computer. Prepare microUSB cable, Core Module and battery module (standard or mini). Connect Core Module to computer via microUSB cable. Click on Firmware tab in menu, use hardwario/bcf-radio-push-button and Click Flash.
Step 2: Pair Hardware¶
Open HARDWARIO Hub page in browser same as in chapter Instalation and select Device tab in menu and click on Start pairing button.
Step 3: Assembly Hardware¶
Now unplug Core Module from microUSB cable and connect it to battery module (standart or mini).
Step 4: Ending¶
You have to see connected device now. You can look at Messages tab and see that temperature is incoming now.
Make it functional¶
Step 2: Place Homekit node from advanced group and connect it to template node in flow¶
Step 3: Double-click on HomeKit node in flow, settings should popup¶
Step 4: Setup bridge¶
Let’s setup bridge. Bridge is basically, bridge, between our Hardware sensors and your iPhones, iPads, Macs, etc… So Click on little pencil icon next to the bridge chapter of setting and fill it as following and click Add:
Step 5: Fill the rest of the settings according to the screenshot below. Click Done and Deploy¶
Step 6: Pairing¶
Now as you can see on your screen and screenshot bellow. Device is waiting for pairing with code 111-11-111. So open Home app on your iPhone or iPad and click Add Accessory > Don’t Have a Code or Can’t Scan > HARDWRIO bridge. Add anyway on next screen. In screen where you have to input code, input just 1 to all boxes:
Step 7: Setup¶
Now just setup where is your bridge and temperature sensor and your sensor is added!
If you have some device in Home app, you can control it or get infromation via Siri. So if you want to get temperature from Core Module which we just set up, just ask Siri “what’s the temperature in bedroom?” (or what room you selected).
With HomeKit plugin you are able to simulate real HomeKit devices. This plugin can also control things. So you can use it to control Relay Module, etc… This plugin have little issue. Every time, you Deploy flow, you have to reset all Node-RED, or the HomeKit plugin won’t work. You can do it by following command (you have to do it on HARDWARIO hub if the plugin is installed there):
pm2 restart node-red