HomeBridge, HomeKit, Piper, HomeHub, HomePod

If you’ve found this post I can conclude that you want to know if it is possible for Piper to work with Apple’s HomeKit ultimately a HomeHub like HomePod? The answer is yes.

There’s a few hoops you need to jump through to achieve this but the end result is something that works really well.

I’m using HomeBridge running on Raspberry Pi – something which acts as a bridge to turn non-homekit certified accessories into compatible devices. (sort of).

HomeBridge can be run on other things, but since I’m a Raspberry Pi fan why not on Pi.

Things I can remember about installing Homebridge – be aware of which linux user is running Homebridge and make sure to add it to startup. Why not give your Pi a static IP, change the default password and raspbian to non-gui.

Once you’ve managed to install HomeBridge and you’re confident it’s working.

Set up your Piper device with IFTTT as this is supported.

“I came across another blog post that worked with a IFTTT hook and relied on a static public IP and calling a unique URL (this is completely un-necessary, and I concluded whoever wrote it just got lost in their own ideas).”

Good news…Homebridge works with IFTTT. Useful commands:

sudo npm install -g homebridge-ifttt – Install IFTTT npm.

pi@homebridge:~/.homebridge $ cd /var/homebridge/ – where my config is.

pi@homebridge:~/.homebridge $ nano config.json – the homebridge config.

  • My config looks like this:

^ So what’s going on here:

  • I found it useful to use a JSON Validator
  • bridge is defined – HomeKit understands this.
  • platforms are defined these contain accessories
    • If you only add triggerOn the button is not state aware. Adding a triggerOff the button becomes state aware. This means you can turn your piper on and off and it stays lit up in Home App on iOs and WatchOS, for me I use this for Piper Disarm, Piper Armed Away. I called mine as you can see “Piper Away”
  • Once Piper is added to IFTTT (also works with Alexa this way).
  • Create 4 recipes with Maker that match Pipers status i.e. piper_0,1,2,3:
    • if Maker receives a web event with name defined action piper.
      • i.e. if piper_3 maker event change piper security mode disarmed.

sudo service homebridge start – reloads config.

Extras

If you have a HomeHub i.e. HomePod or an iPad you can do the following automation.

I also have an automation configured that is triggered by Geofence, for example I leave my home, my iPhone triggers my HomePod, Tells the HomeBridge to turn on my Piper Alarm, (Pi sends necessary commands to IFTTT and back to Piper) – This works flawlessly.

Security Advice – don’t put your HomePod near a door or window as someone could potentially disable your alarm by shouting “Hey Siri, Turn Off “Piper Switch”.

*It would be nice if Apple made it so that HomePod can mute when no person is in the house to stop unwanted guests shouting commands through a letterbox or window.

 


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *