Ok guru’s of the Hubitat community I’ve got a noobish question. We are an apple centric household. So, I now have Hubitat and rpi with homebridge using tonesto app plugin to expose Hubitat devices to homebridge. But from what I understand communication from Hubitat to Homebridge is a one way street. For example I can’t move some devices ( ie Bond fans) to homebridge and still write automations for them in Hubitat?
So if I somehow layer a node red installation on my homebridge rpi and install the correct homebridge plugins on the rpi and the correct apps on Hubitat. I then would then have communication each way between homebridge to Hubitat.
If I am correct or not in this thinking please let me know. And if I am correct could you point me in the right direction with proper homebridge/ node red / Hubitat installation for my rpi.
Unfortunately what I have learned is that there are no good ways to have 2-way communication between Homekit devices and Hubitat. There are 2 cumbersome ways of having the 2-way communication for many (but probably not all) Homekit devices.
Option 1: Create a virtual switch in Hubitat, connect that to Homebridge. Then build rules inside Homekit to synch the virtual switch with what you want to control that is Homekit only. This only really works if you are doing binary on/off type controls.
Option 2: Add even more complexity by introducing Home Assistant into the mix. Setup the Homekit controller integration in HASS. Join the Homekit devices to it (they will think they are joined to an apple device). Then connect HASS via Node Red to Hubitat. Also join HASS to the actual Apple Home. (I have done this at an experimental level, but with so many interacting pieces, I can't promise it will work consistently, though it shows promise).
As others have said, Homebridge/Homekit are not intended to provide 2 way integration. You can kludge your way around that with virtual switches or Home Assistant, but if the device has good Hubitat-native integration, that will almost always get you better results. I do use virtual switches to control a few Homekit-only devices. (Hunter Cavera Fans, Nanoleaf Essentials Bulbs), but generally speaking, if I can control it directly with Hubitat, I do.
I agree with this in principal but I've found a lot of my less technical clients (and even some that are!) are Apple-centric and prefer Apple Home to anything else.
EDIT: I've found I can STILL provide a great Apple experience with HE/HB/NR.
@KarenAG - echoing what others have said - I have the same setup (HE->HB-HK). Before I started using Node-RED, all my "automations" were done in HE (Hubitat) Rules engine or simple automation. Apple Home was a way to give a better end user experience (turn on lights, open doors etc.) and also enable remote operation, but no automation. Since then, I have duplicated all my automations in Node-RED (they are currently disabled in HE) but still use Apple Home if I need to operate any of the devices while I am away.
The only "automation" that I have in Apple Home is to turn a virtual switch (Hubitat switch) on at night when my Ring Doorbell activates for motion. I then have Node-RED turn on outside lights.
Do you have native Apple Homekit devices that you want to control from either Node-RED or HE?
I have only recently (as of this year) gotten into the cult of Apple having gone from virtually no iGear to having iPads, Homepod Minis and an M1 Macbook Pro... you know for "testing" and to placate my SO. Family still on Android phones though much to the chagrin of my teenage daughter.
Interestingly I was using Homebridge before my Apple purchases. That sequence picture I posted has been active well before then...
Apologies @KarenAG! Was getting a little off track. Here is my installation - you don't need to go with Ubuntu 64 or do the m.2 thing - just the standard Raspberry Pi OS Lite - recommend not installing the GUI as it adds overhead but you can if needed.
For the installation I used an RPi4 with 4 GB Memory. I am using a case called the Argon ONE m.2 and booting off an m.2 sata drive with the sdcard as backup.
My distribution is Ubuntu Server for RPi - 64 Bit.
I installed node-red and homebridge using the installation instructions here:
@erktrek Thank you, Thank you for your links and guidance. Got my pi up and running with node red and homebridge. If ya lived near me I would buy you a beer or three
@erktrek Been thinking about setting up a local box for this stuff since Docker Desktop on my laptop is pretty flaky and keeps locking up. Do you find the RPi is powerful / stable enough? I was thinking about an Intel NUC, but that's considerably more expensive.
I was also wondering about your flow above with the Ring doorbell going from HB to HE... Is there an advantage to hooking it into HB vs. the Ring integration in HE?
Yes the RPi is plenty powerful - I am running 3 different server apps on mine (Node-RED/HomeBridge/Wireguard and have had no performance issues. In fact the 4 GB model might even be overkill for this purpose but I like the extra memory.
In terms of my reasoning with that sequence.. I prefer to keep the resource usage as low as possible on the HE. This means keeping custom apps to a minimum if possible. On my C-7 I only have Homebridge V2, Package Manager, Z-Wave Mesh details and Maker running. All the rules etc live in NR.
My current resource usage on that hub: Local apps: 18m 19s busy / 4d 15h 16m 52s total (0.3%)
Yep - My only issues there are the larger form factor and greater power draw but otherwise that can work as well. Another thought is an old laptop. Built in power protection.