1

I've been looking through the various npms that mention MyQ and HomeKit to try and find a way to trigger flows when my garage door opens or closes, but everything I've found seems to just support querying for status and sending open/close commands. I'd rather not have to poll my garage door every 30 seconds to be able to trigger flows to run upon open/close events.

I have homebridge installed. I can thus control my garage door with Siri. There are 3 things that (can) happen when my garage door opens or closes:

  1. I get an email from chamberlain
  2. I get a push notification from chamberlain
  3. I get a push notification from HomeKit

Since I added the garage door to homebridge, I had the thought that there might be a homekit node I could add that could receive the event notifications from homebridge.

Aside: I kind of also thought that by adding a homekit node that is configured to talk to homebridge, that I might be able to automatically create nodes that can send commands to homebridge so that I can control all the devices configured in homebridge. That would be a bonus. However, I tried out one of the homekit nodes and I'm not sure that they have the functionality I imagine they would.

So, is there a homekit or myq node that can receive open/close events that I can use to trigger flows?

A work-around to demonstrate what I'm looking for... I was thinking that I could rig a hacky solution for this using the email notification. I already have a mail rule (in Apple's Mail.app) to send an email to IFTTT when I receive an email from chamberlain. I could setup a webhook post to webhookrelay in order to trigger a flow in nodered, but I don't like having to rely on Apple Mail running on an always on computer...

hepcat72
  • 285
  • 4
  • 18

2 Answers2

1

I'm not familiar with homebridge but a quick search indicates there is an MQTT add-in which together with Mosquitto on the Pi should enable you to accomplish everything you require using node-red

Bra1n
  • 1,261
  • 7
  • 8
1

Given the existing actionable signals (email and push notification), the only ways to trigger node-red flows that I've discovered are the following (which trigger an IFTTT webhook POST to nodered via webhookrelay):

  • IFTTT Office 365 Mail (using the "new email from" trigger). You must include the subject in the JSON POST in order for Node Red to decide what to do with it.^
  • Apple Mail Rule that runs an AppleScript to send an email (with a specific subject) to trigger@applet.ifttt.com when new mail meets rule criteria. Again, you must include the subject in the JSON POST in order for Node Red to decide what to do with it.
  • Code-up a bluetooth app that can act on push notifications^^
  • Use a physical sensor that is capable of detecting the garage state and of triggering NodeRed via something like MQTT or webhook POST

The IFTTT Gmail service used to be the perfect solution, but IFTTT's Gmail service no longer fully meets Google's API security standard, and the ability to trigger via received email that matches search criteria is going or has gone away (which was the event that prompted this stack question in the first place).

The downside of the Apple Mail Rule solution is that it must be on a computer that is always running. Apple's iCloud Email web app does not have the ability to run the applescript necessary for propagating the triggering event.

(Note, it's likely also possible to simply issue the webhook post to webhookrelay directly from the AppleScript, but you wouldn't be able to as easily enable/disable the automation from anywhere.)

I have opted for the Apple Mail solution, and it works well, though be away that the subject ingredient removes hashtags automatically in the trigger that receives any mail sent to trigger@applet.ifttt.com.

I look forward to a future app that can use push notifications as triggers for actions. (Android actually has this capability, from what I saw during my search.) And honestly, I'm surprised that there's not a "notification to webhook" app out there that can convert any notification into an action.

^The IFTTT Office 365 Mail solution cannot be configured specifically for subjects containing a search term, but there may possibly be an IFTTT ingredient that allows you to include the email subject in some JSON of a webhook POST.

^^ It turns out that iOS push notifications are encrypted and the only codified way of being able to know what notifications are what is to write code for a bluetooth device. Apple supports display of encrypted notifications on Bluetooth devices so that things like AppleWatch can display the notification. All other ways of intercepting push notifications are locked down for security reasons. (See https://www.quora.com/Is-there-a-way-for-an-app-to-detect-any-incoming-push-notifications-on-iOS)

hepcat72
  • 285
  • 4
  • 18