Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

4nthony

macrumors newbie
Original poster
Nov 16, 2020
24
5
tl;dr

I'm noticing there's a significant lag -- 30 to 60 seconds -- between when an accessory event occurs and the automation runs a scene that plays audio.

Is it possible to decrease the lag time?

My Setup:

I've got 4 HomeKit hubs (1 ATV4K, 3 HomePod Minis).
- The ATV4K is the "connected" hub. The HomePods are in Standby.​
I have a Yale Assure 2 deadbolt.
2 Automations
- Kitchen Door Unlock​
- Kitchen Door Lock​
Each automation has a corresponding scene (below)​
2 Scenes
- Kitchen Door Unlocked​
- Kitchen Door Locked​
Each scene has all my HomePods as accessories and plays a custom audio file when activated​

When the door is locked/unlocked manually with the knob, via the Yale app, or when using Home, the automations fire and the scenes are run. The HomePods throughout the house all play the audio file, which is either "Kitchen Door, Unlocked" or "Kitchen Door, Locked".

The Problem:
There is a significant lag when the audio is played on the HomePods. It can take anywhere from 30 to 60 seconds for the audio to play on the HomePods. I read that HomePods enter into a low power mode. I'm thinking this is what might be happening.

Potential Solution:
I created an automation that runs every 5 minutes and executes a scene called "HomePod Ping". This scene plays a muted sound file. My reasoning is that this will keep the HomePods active on the network and (hopefullly?) prevent them from entering low power mode. If they're awake, maybe they will run automations faster.

I do NOT have Siri and Intercom enabled. I'm currently only using the HomePods as speakers.

I don't know if this solution is working. I'll get a shorter lag time then it will revert back to the longer lag time. I may try decreasing the ping interval. I will also attempt to enable Siri and/or Intercom. Maybe if they're always listening, they'll wait longer to enter low power mode. Just a hunch.


What can be done to decrease the automation lag time?


Other Issues:
Playing an audio file via an automation will interrupt any music or podcast that is playing on the HomePods. Maybe there's a way to pause the currently playing music, play the automation audio, then resume playing the music?
 

dotme

macrumors 65816
Oct 18, 2011
1,218
273
Iowa
I could see where this would be laggy. The trigger is a BTLE device so there's the inevitable handshake delay there. Then you have selected multiple HomePods on which to play an audio file, and my guess is that they have to work together to both fetch it, and play it "as one" (meaning there's AirPlay sync lag too as the units all compare notes and line up to all play the audio at the exact same moment).

I use hue lights for open door indicators (A play bar in a few rooms that glow different colors depending on what's open or unlocked) and that seems to work reasonably well. I'm not convinced that pinging HomePods is really doing much for you other than keeping your WiFi network busy, to be honest. Even if you AirPlay a song from your iPhone to the HomePods, you'll see a few seconds delay before audio plays. If your automation also sets volume levels, that's additional lag too.

You can measure the AirPlay portion of the lag by temporarily enabling push notifications on the lock. The delay before the push notification is BTLE lag, and the difference in time between the push reaching the iPhone/Apple Watch and the HomePods playing the audio is AirPlay-related (and WiFi-related) lag.

Having said all that, 60 seconds sounds like a massive delay. I could see 15-20 seconds, but not a full minute. Is the WiFi network happy and optimized?
 

4nthony

macrumors newbie
Original poster
Nov 16, 2020
24
5
I spent some time yesterday making tweaks to my home network* and the lag time has come down into the 10-15 second range, as you expected it to be.

The door lock also has a Wi-Fi connection, and the push notifications on my phone happen almost instantly. What you're saying about the HomePods downloading the file, coordinating, etc. also makes perfect sense. The audio files played by the HomePods are relatively small in size (76kb) but my automation also sets volume levels. It's looking like I've set myself up for additional lag by doing this.

Also, the scenes don't always execute synchronously. Usually what happens is I unlock the door, walk in, and lock the door. This happens within a few seconds. I'll sometimes hear one of the audio events, but rarely do I hear both.

I also disabled my ping automation. I think I wanted to see improvement while it was running, but your comment about it just adding unnecessary traffic makes sense.

I have Hue lights throughout the house and they've been working well. A few of them are on time and/or motion automations. I'll experiment with including them into the door automations and see how it goes.

Thanks again for your feedback!

Cheers,
Anthony

* About 2 weeks ago, I updated my fiber connection from 2Gb to 5Gb and switched from an older Orbi 6 mesh network to a vendor supplied TP-Link AXE300 with a mesh extender. I made a Wi-Fi survey map and spent some time investigating for signal noise, channel selection, network speed, etc. and I'm seeing big improvements. Hopefully, I'm fully optimized but time will tell.
 
  • Like
Reactions: dotme
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.