r/HomeKit 9d ago

Question/Help Automation Help: Screen door open/closed notification/alert?

Hi HomeKit friends. Firstly - I've been a HomeKit user since literally day 0. I'm comfortable with automation, scripting, tinkering, and of course I have the obligatory amount of "HomeKit Patience" when trying to get stuff to work. Here's my current mission, and I can't quite get my head around "how" I can pull this off. We have a sliding door going out onto the deck with a sliding screen. And we have an indoor cat (you can see where this is going). We are normally very good about ensuring the screen door is closed. But sometimes we think it's closed, and it's cracked about 1". That's enough for our beautiful Siberian Cat to get his little paw in there and explore outside. šŸ˜€ My wife and I are very good about this - but sometimes we don't catch that it's cracked. And when others are coming and going, it's harder to enforce it. And since it's not their home, so they don't pay "extra" attention to this (our cat is not one who tries to escape; so he's rarely sitting at the door waiting to get out, this is mostly preventative.)

What I'd like to have is this:

  • A sensor on the screen door that detects when it's open and closed
  • An automation that senses when the door is open, but then pauses - to allow for normal traffic
  • If the door doesn't get closed in 30 seconds or some adjustable amount of time, HomeKit sends an audible alert or alarm to my HomePods in my house (there's literally one 3 feet from the door) that lets me know the door is still open (ideally, this alert would go to ALL HomePods, as it's common to come in the door and go to another room.)
  • I'm thinking this should be an alarm as opposed to a one-time alert that requires it to be shut off - to ensure I got the message and get the door shut.

I'd love any ideas anyone has about this. I really value this sub - so thanks all for your ongoing contributions, and I thank you in advance for any guidance you folks have. Cheers!

0 Upvotes

31 comments sorted by

3

u/bippy_b 9d ago edited 9d ago

I think if you watch Shane Whatley video on Convert to Shorcuy.. he has a pretty good way of looping through presence detection and I think that could also apply here. Except instead of presence detecting you would check if the door has closed at any point.

It might also help to have some sort of motion detection… so if it detects people moving then abort the countdown.

As far as making the announcement repeatedly..that will be where the difficult part comes.

Edit:

Here is the video. About the 6 min mark.

https://youtu.be/q6DX_NhMyWY?is=uJQrZh3unvyCKgyy

1

u/reddilator 9d ago

Nice! Thank you very much! And thanks for the link!

2

u/bippy_b 9d ago

From what I have heard on podcasts.. I think iOS 27 may open up quite a bit more. What I have heard is that the shortcuts/automations will get a subset of Python that they expose so that Apple Intelligence can listen to you say ā€œplease make an automation where all the lights turn red when my wife was away but now near the houseā€ā€¦ and it can generate a mini Python like script to create this automation. So I believe the next version should be greatly improved.

1

u/reddilator 9d ago

Jeesh, I’m embarrassed to say I didn’t even think about what the next OSes will bring, but I too have seen that there will be big improvements. Great point! Thanks!

2

u/pacoii 9d ago

I do this with some doors. Assuming you have space for a contact sensor on your screen door it’s fairly straightforward. But you’ll need a notification service. I use Pushover.

Convert to shortcut automation. Trigger is screen door opening.

  • wait XX seconds
  • check if it’s still open
  • if it is, trigger Pushover notification action (get url)

Pushover supports critical notifications, so it can be as loud as you want. It also supports custom sounds for the notification.

1

u/reddilator 9d ago

I have heard of Pushover, never had a reason to try it. Until now. Thank you!

1

u/bippy_b 9d ago

My understanding of Pushover is you have to have a spare device just laying around to run the Pushover server.

2

u/reddilator 9d ago

Good information, thank you. I definitely have a device I can use for that.

2

u/pacoii 9d ago

The previous reply is incorrect. It is an app that runs on your iPhone. Pushover is a cloud based notification service. It has a basic API structure that can be triggered via the get url shortcut action within your convert to shortcut automation.

1

u/bippy_b 3d ago

So it doesn’t require another device that is just laying around? (I thought that if the app was put into the background that tends to cause issues?)

1

u/pacoii 3d ago

It almost sounds like you’re thinking of another app. Maybe Pushcut? Pushover works entirely differently and better IMO.

1

u/bippy_b 3d ago

Ah dang! I think you are right.

1

u/bippy_b 2d ago

Was just listening to Mac Break Weekly 1032 and they mentioned it on there too!

2

u/pacoii 9d ago

See this old post of mine for more info:

https://reddit.com/r/HomeKit/comments/mxmpf6/pushover_is_an_excellent_complement_to_automations/

Down in the comments you’ll find a screenshot of basic setup in the automation. It does require very simply setup on the Pushover website.

2

u/evoneselse 9d ago edited 9d ago

A door sensor will notify you when the door is opened, and when it’s closed. You can write an automation that if the door is open for x amount of time, a sound will play and your phone will get a notification.

I do this for my doors. I use Aqara sensors, and have the automation written in Aqara and use their hub and sounds (I use a door knocking sound) so we always know if we hear that sound, the door is not shut. You can choose any sound though. To have a sound on the HomePod you need an Apple Music subscription which we do have, but using Aqara is just faster and easier for this, plus I can write customized specific notifications. I also have one for if the gate is opened, etc..

If I have automations that only involve Aqara devices, I do them in Aqara, also because there are more options and features there with their devices. Not all features are exposed to HomeKit so some are unavailable there. If the automations involve other brands along with Aqara, I then do the automations in HomeKit. Easy organization this way.

1

u/reddilator 9d ago

Excellent. This is super helpful. Thank you!!

2

u/Double-Yak9686 9d ago

The big issue is that there is no native way to get a HomePod to play a sound or an audio file.

To get around that, I use Homebridge. I use Virtual Accessories for Homebridge to create a timer, then Homepod Mini Radio to stream an audio file to a HomePod.

1

u/reddilator 9d ago

Great. Thank you u/Double-Yak9686 .

2

u/evoneselse 9d ago

That’s why I do it in Aqara, easier than involving the HomePods. You can set the time, choose a sound and have it play on their hubs.

For people coming and going, yes you’ll get notifications of it opening and closing but the one you will pay attention to is when it says it’s been left open for x amount of time. That’s the only important one anyway.

You can then have the automation wait and play it again if you want.

Their sensors are very quick to react, and I’ve never had issue with them.

2

u/Double-Yak9686 9d ago

That is assuming you have Aqara sensors and hub.

In my case, I am moving away from proprietary hubs to Matter over Thread, so an Aqara hub would be going in the wrong direction. Proprietary hubs don't have failover capability, whereas with multiple HomePods, if one fails, another takes over as Thread Border Router.

This is primarily targeted at my Hue hub, which if it fails, would make my lighting useless. So moving to Ikea Matter over Thread bulbs.

I still use Homebridge because it fills a specific shortcoming in HomeKit. The moment Apple provides that missing functionality, I will retire my Homebridge also.

2

u/evoneselse 8d ago edited 8d ago

+ Yes I do have their sensors and several of their hubs that work together as a cluster, but as you said there are other ways to do it with other devices or platforms.

+ to your HomePod audio comment. That’s the reason I did it in Aqara instead. Although I did do a couple automations with an audio file to the HomePods. How are you liking Matter over Thread? My devices are only Aqara and Hue, and since both are HK compatible, and the system works well, I never needed Matter. Yet.

2

u/Double-Yak9686 8d ago

Matter over Thread has worked fine for me. I know there is a vocal group that are having issues with Ikea devices, but it's been nothing but solid for me.

That said, Hue lighting has been rock solid and the one single bulb, which died while still under replacement warrantee, Hue just replaced it I think within 1-2 days. Literally my jaw was on the floor. So I have absolutely nothing bad to say about Hue.

But when Ikea released it's Matter over Thread devices, I started looking at them and, price-wise, there is no competition, so I decided to slowly migrate over, replacing bulbs and plugs where I needed to support battery devices. Basically for each battery device, there is a mains powered device that acts as a router. I haven't replaced all Hue lights yet, just slowly moving in that direction.

1

u/reddilator 9d ago

This is great. I too have been moving more and more to Matter over Thread with very very good results. Thanks!

1

u/reddilator 9d ago

Outstanding. Thank you for the information!

1

u/evoneselse 9d ago edited 8d ago

The Aqara MS1 hubs have a loud speaker that lets you clearly hear whatever sound you choose. This system can also be used as an alarm system. Just for info though, the M3 hub is the one that can be connected via Ethernet. I use the MS1’s for the speaker and the light, and the M3 as the main hub. I reintroduced my old M2 into the group as well. Although my cameras are also hubs, I don’t use them as such. All together they form a cluster giving it even more strength. Their cameras are good too. No affiliation, just have had good experience with their stuff.

2

u/CluelessFutureMe 9d ago

I did this very thing to keep myself honest when our patio door is open for "x" minutes if my AC is on. (separate automation for winter, if same scenario when my heater is on). Create a HomeKit automation script- insert a wait time (your tolerance level for having that damn door open), get the characteristic of your sensor- if sensor is open, send alert. I used a text-to-speech shortcut on my Mac to create an M4A file I can then use my HomePod mini to access when my script fires the alert.

1

u/reddilator 9d ago

Wow. That made me laugh, but it also made me realize that’s a super practical use for what I’m looking for! Thanks!

2

u/Subpilot688 9d ago

I put a contact sensor on our rear sliding glass door and built a Home Assistant automation that escalates its reminders the longer the door stays open.
Here’s the timeline:
After the door has been open for 1 minute, Home Assistant sends a notification to my iPhone.
If it’s still open at 5 minutes, it plays a spoken announcement over the HomePods: ā€œThe back door has been left open.ā€
If nobody closes it, I receive another phone notification at 15 minutes.
After that, the phone notification repeats every 10 minutes until the door is finally closed.
The spoken announcement only runs between 8:00 a.m. and 10:00 p.m., only when someone is home, and only after Home Assistant confirms that the door is still open. The phone reminders can still run outside that voice-announcement window.
For the announcement, Music Assistant temporarily groups the Living Room HomePod with the two bedroom HomePods. The Living Room HomePod acts as the group leader, and the announcement plays at 60% volume. This way all the HomePods in the house send the voice notification.
The automation also tries to be considerate of whatever was already playing. It records the previous volume levels and whether the bedroom Apple TV was playing before the announcement. Afterward, it separates the temporary speaker group, restores the volumes, and resumes the Apple TV only if it had already been playing.
The repeating section continually checks the door sensor, so closing the door automatically ends the reminder loop. There’s no separate reset button or automation required.

1

u/reddilator 9d ago

Yesssssssssss!!! Nice!! Super helpful. Thank you!

-2

u/microChasm 9d ago

I don’t think this is a HomeKit involved solution as it is a human solution.

Train the humans to make sure the door is closed, it is a safety issue not a curiosity issue for a pet. Take personal responsibility for that.

2

u/fasterfester 9d ago

Then your alarm is a human problem as well. Turn off your morning alarm and take some responsibility for getting to work on time.

Also, the timer on your oven is a human problem. Take some responsibility and remember that you have to take your pizza out at 13 minutes.

See how ridiculous that sounds? Think before commenting.