Last weekend I spent almost half a day on the phone with Apple tech support (AppleCare). The issue? I was trying to switch my iCloud account over from 2-step verification to 2-factor authentication. What's the difference? 2-step verification is Apple's older way to add a bit more security to your iCloud or AppleID accounts and 2-factor authentication is the new way. Six Colors has a great piece explaining all the differences if you want to know more. The important thing to know is this...if you want to start using Apple's home automation system HomeKit, then you need to enable the newer 2-factor authentication. But that wasn't my problem. I was able to switch from 2-step to 2-factor just fine. But once I did switch over to 2-factor I couldn't turn on my iCloud Keychain on my iCloud account (iCloud Keychain is another thing that must be enabled to use HomeKit). When I would try to turn on the keychain, iCloud would ask me to authenticate from another trusted device, but then it would never send the authentication code.
The reason troubleshooting this process took so long was because Apple was trying to keep me from having to delete all of my health data in the cloud. You see, since I wasn't able to authorize turning on my iCloud Keychain the only other option was to reset the iCloud Keychain which would erase my health data from the cloud. So we went through a bunch of different troubleshooting methods like signing out of iCloud on all my devices and signing back in. Then we tried to turn off 2-factor authentication and turn on the iCloud Keychain first, but that didn't help either. Somewhere in iCloud there was a hiccup concerning my iCloud Keychain that we just couldn't clear.
This is hopefully not a problem that a lot of people will encounter, but I am writing this for the "lucky few" that are in the same boat I was in. As long as you didn't have any stored passwords in your iCloud Keychain previously, just go ahead and reset the keychain. In the end I didn't end up losing any of my health data because it grabbed the health data I had stored locally on my iPhone. I'm not sure what error caused all this pain on Apple's end, but once I reset the iCloud Keychain I was able to start using HomeKit.
Oh, and one other thing. Once you setup 2-factor authentication and enable iCloud Keychain on your iCloud account, your Apple TV (if you have a new 4th Generation one and it is signed into your iCloud account) should automatically show HomeKit as an option now. Except in my case it didn't. HomeKit wasn't enabled on my Apple TV until I actually turned on and setup a HomeKit enabled device on my network...then AppleTV showed that it was now my HomeKit hub. Everything I read out there said it was supposed to be automatic once you enable 2-factor authentication and the iCloud Keychain, even Apple said this was the case. But it took turning on a HomeKit device on my wireless network to trigger the AppleTV HomeKit features.
Hopefully my problem was an isolated incident, but just in case I thought I would share what I had to do to get home automation running in my house.