Siri=>HASSIO help needed (WAF at high risk!)

Siri control of all my HASSIO devices was working perfectly until a few months ago when suddenly something changed. Now, when I am outside my LAN (after a few hours, connected via LTE) and request Siri to do anything from either my iPhone or Apple Watch, here’s what happens:

Getting in Touch… One Moment… I’m Sorry, but I didn’t hear back from your devices.

Now, here’s the strange part: better than 50% of the time, the request actually worked but was reported as failed. Then, if I ask a second time, the request works 100% of the time immediately and reports back as such. Then, any requests will continue to work perfectly for quite some time. The trouble is only on the first request. It’s as if the Homekit=>HASSIO connection times out and thus the first ask always fails but re-esatblishes the connection for subsequent requests.

Here’s my setup:

  • HASSIO on Raspi 3 (updated to current)
  • Duck DNS/Let’s Encrypt
  • Apple TV 4K for Homekit Hub.
  • Google Wifi system

Here’s what I’ve tried so far:

  • Deleted homekit.state file and re-paired HASSIO with apple tv
  • signed out/back in to iCloud on all apple devices
  • filtered HomeKit yaml to include one entity only (a desk light) for testing
  • connected HASSIO raspi and appletv via ethernet to same switch (which is plugged into primary Google Wifi puck).

I am very hopeful someone here can direct me towards a solution or actions for further troubleshooting. The WAF decreased dramatically when this broke, especially since we bought Apple Watches to control the house and Siri is her primary interface to HassIO. If I don’t fix this very soon, her confidence in the entire HA system is at risk!

Thank you in advance for your help.

Posted Jan 19, 2020, 1:32 PM UTC

630
atxbyea•

Sounds like something we can help you troubleshoot faster on our discord, join today

4
mfbomber•

I have the same problem with google home using the Nabu Casa Cloud. Found no solution so far.

2
mldkfa•

It’s easy enough to setup google home without using casa cloud. Check out the documents for the “old” way of google home integration. I use this and it’s been rock solid for 2+ years.

2
fyton2v•

Are you sure you don’t have Siri reliability issues when you’re at home (on your own WiFi)? It sounds like your HomeKit instance is having communication issues with your ATV4K. Maybe it’s just a WiFi problem. If all that is known good, factory reset your ATV4K.

I’ve been running homeassistant on a Synology NAS with a HomeKit connector for quite a while and it’s generally reliable. I use an Apple TV as a hub.

1
skiplaneOP•

OK, tried Siri connected to wifi a few times in the middle of the night (to assure timeout issue) and it works perfectly (even on first request). So trouble is probably related to ATV as hub providing remote access.

Before I factory reset this thing, I've unplugged it and set up an iPad as a hub to compare results. Will post back.

2
skiplaneOP•

I’ll test this. The problem only exists on first request after everything has been idle for awhile (such as triggering I’m Home script) so always connecting via LTE at this point.

I’ll try it in the middle of the night connected to Wifi and see what happens.

1
gijoecool•

I noticed the same thing. A couple months ago Siri would often tell me to check back later when un/locking a door. I’m interested if there’s a solution too. I figured the issue was all on Apple’s side.

1
Sarcasm_Chasm•

I had this happen and no matter what I did it wouldn’t go back to normal. I had to completely delete my home in HomeKit and recreate it for the connection issues to stop. In my instance I know networking wasn’t the issue because everything is hardwired and a Siri request from the Apple Tv to the Hassio box would still fail.

It’s been rock solid since I did that.

1
skiplaneOP•

Already tried deleting/recreating my home in Homekit. Now I've unplugged my ATV and trying an iPad as a hub for comparison.

If the iPad works, I'll try to factory reset the ATV and recreate the home once again.

1
Sarcasm_Chasm•

I also had to start the Homekit integration with an automation on a 5 minute delay to get things to be stable. There’s an example in the docs to do this if you’re not already.

1
fyton2v•

Heads up, location based automations using geofencing with your phone’s location data as a trigger are a bit of a lost cause. At least, I could never get them to work reliably. And from a security perspective, using location to unlock doors and such is iffy at best. Not sure if that’s your goal.

I commonly use Siri to open my garage, and then trigger light automations based on a new garage door state. Works well.

Have fun.

0
skiplaneOP•

This is a bit of a thread drift, but I found native iOS Homekit presence detection to be excellent, and one of the most accurate and reliable methods available. Actually, this is one of the reasons I want to use iCloud (vs VPN) to link my Hassio and Apple world together.

Best way to accomplish this is set up an input boolean in Hassio for each person in the house with an iPhone. That way, you can add them to your home via Homekit and don't have to install Home Assistant iOS on their device. Then, set up an automation in Apple's Home app based on location to simply turn that input boolean on/off based on arriving/leaving home. Then, with Hassio (or Node Red) automations, the sky is the limit.

I have another input boolean called "magic doors" I can cycle on or off as desired. If off, HA doesn't do anything when I roll up. If on, garage door opens, lights come up, front door unlocks, ect. Yes, I could just do this with a Siri command but I think it's bad-ass to have it all happen automatically yet I have an easy way to disable it too. It has been very reliable for both me and better 1/2.

Now if only Siri would do as she is told without having to ask twice. A digital female shouldn't ignore me more than the real one in my life!

2
fyton2v•

Interesting. Will explore this. Using Apple Home will be quite a bit easier for my family.

1
skiplaneOP•

Yes, and you can filter which entities get passed to HomeKit for them to control and you get good native iOS location detection.

I’ve heard HA iOS app location is excellent in version 2 but don’t want to install the app on everyone’s phones - plus the added risk of them curiously poking around with full access.

1
TravelingMeow•

Heads up, location based automations using geofencing with your phone’s location data as a trigger are a bit of a lost cause. At least, I could never get them to work reliably.

The official iOS app works perfectly for this for most people.

0
fyton2v•

Interesting. Would be cool to know if that’s a common impression. I haven’t tried location based anything with the new app. The old version didn’t work perfectly. The iOS Home app wasn’t reliable either. And I guess when it comes to cover and lock reliability, perfect is quite important.

1
TravelingMeow•

Yeah I guess I didn’t mean perfect for locks and stuff, but that could depend on your area and setup. If you try the beta version of the app (I think it’s not in the release version too, but it might be) there are settings to display a notification when location changes are triggered and also a log in the app that shows every location update with coordinates, accuracy, and why it didn’t qualify for updating the device_tracker. I’ve found it useful for determining zones and stuff.

2
mldkfa•

Two thing.

  1. HomeKit is an intranet protocol. It is not designed to go outside of your network (outside of your WiFi). You can set this up with external devices like your iPhone, but it requires a properly configured vpn.

  2. you do not need your Apple TV to be a hub for you. Hassio has the ability with just 2 or 3 lines to be the HomeKit hub. I would suggest this method as it would reduce your troubleshooting considerably.

Edit: after researching, it looks like it is possible without vpn to use HomeKit externally from your intranet. Sorry

-7
vmtyler•

Just delete the whole comment. Both your points are wrong. HA acts as a HomeKit bridge. To work outside the house you still need a hub (iPad or AppleTV).

4
mldkfa•

Sorry, my terminology might be off. I use hassio to communicate with local HomeKit accessories and then serve those devices along with all my non HomeKit devices up via HomeKit to my Apple phones home app. I’ve gotten remote access working with a vpn on my phone into my local network.

If an iPad or Apple TV allows remote access, I’m guessing it’s just tunneling the HomeKit protocol through it via an Apple cloud sever.

So my use of hub for hassio I believe is correct because it is not an accessory.

-2
vmtyler•

your terminology is off. There's homekit accessories, bridges, and hubs. hassio is a bridge. Go into your home app on ios, tap the home in the top left, and then open hubs and bridges. you'll see it as a bridge. bridges are allowed to publish multiple accessories. a hub allows remote access to homekit bridges and accessories- yes, via icloud. It can be an appletv, ipad, or i also forgot- a homepod.

1
dippnerd•

Devices are independent of the hub, the hub enables HomeKit automations (the iOS Home app has an automations section, but it won’t work without a hub) and accessibility from outside the house without VPN or extra steps/tools. I haven’t fiddled with the HASS hub part, so it may provide those steps, just wanted to help clarify

2
mldkfa•

Hmm I guess I don’t know what functionality I may be missing from not having an iPad or Apple TV as a hub. I have set up automations on my phones app and it triggers when I get home or I tell it I’m going to bed. Though most automations for me are done via hassio or nodered.

Remote access is accomplished via vpn for me. I don’t have to be reliant on a 3rd party for remote connection.

2
dippnerd•

Yeah, it’s not needed for everyone, I just wanted to help give some clarity to it 🙂 The main purpose is so people who don’t know how to setup tools like HASS or VPNs can get remote access and automations without much effort. For the most part, if you’re using HASS you probably can accomplish way more than the HomeKit automations offer anyway, and otherwise yeah, probably use a VPN or similar methods for external access.

The HomeKit hub method relies on a 3rd party, sure, but its at least a popular/reliable enough one for the people who don’t have a means to host it themselves etc. Not for everyone, but it is really nice that it exists, I know far too many people who would never be able to go the HASS route but still want basic automations and remote access at least.

1
mldkfa•

Thanks for the explanations!

I agree that “simple” home automation is good for some. However I would still argue that reliance on any cloud service is against what most people what from hass. Hosting your own vpn via hass.io takes about 5 minutes to set up and is a much more secure system than iCloud.

2
JCae2798•

If I can ask a question based on your reply... I recently just enabled HomeKit and working good but I am using home assistant version only. I thought enabling HomeKit enables devices to show up on iOS hub not actually act as a hub. Am I wrong?

1
mldkfa•

My hassio is my hub. I think I’m using the terminology correctly as I have no Apple TV or iPad and my phones all connect to hassio and populate their status and scenes.

0
skiplaneOP•

midkfa, your hassio is not acting as a HomeKit hub, but rather your vpn is allowing your phone to be connected remotely as if it is on your lan, where a HomeKit hub is not required.

To clarify the terminology, your hassio is a BRIDGE, not a HUB. A bridge allows HomeKit to control other connected devices it can’t natively. A hub allows access from outside your LAN and additional automations within the Home app itself.

A HomeKit hub can only be an ATV, iPad or HomePod. To use HomeKit devices (even hassio) WITHIN your lan, no hub is required.

This is a great setup you have but unfortunately not relevant to the problem at hand here.

1
JCae2798•

Thanks. This is what I was thinking and makes sense. I’m sure others could easily make the mistake but yes HASS would never replace the Apple HomeKit hub

1