I am adding here to share my experience with setting up an Ecobee Thermostat but the main difference for me is my HA runs in a docker container.
In a docker container “being on the same network” is not trivial. The docker network is typically a 172.0.0.0/16 range and the host machine is sitting on the same range as your network router. The mDNS broadcasts from the HA container to auto-discover the thermostat do not make it to the router’s network where the thermostat lives.
To get around this the easiest method is to add network_mode: host to your compose config for HA. However I have many containers running and already configured a lot of integrations in HA using the docker domain names so i would have to reconfigure a lot of I change the network mode. I also have HA behind a reverse proxy so i want to continue to use the proxy to pass traffic to the HA container and dont want to change that.
So how do I get only mDNS discovery pings to get to my host machine’s network?
I used an mdns repeater aptly named mdns-repeater docker container found here. I then configured this docker container using the following compose settings:
The important part is configuring the command. The two parameters passed are the network interfaces I want this container to repeat. So br-77625678b050 is the docker network my HA lives on and eno1 is the network my host machine lives on.
You can find the host interface by:
Run ifconfig on your host machine
Find the ip range your host machine lives on
Record the interface name
You can find the docker network interface by:
Run docker network inspect <network-name> on your host machine
Search for what interface name matches the subnet range
Once you boot the container it will repeat the mDNS discovery from your HA container’s network to the host machine’s network. After this i was able to setup the Homekit Controller normally and the mDNS found me thermostat
One more thing! The pairing code for my thermostat was not in the format specified in the original post nor the documentation. It was simply 8 numbers with no hpyhens.
Thanks for posting this Homekit procedure as it worked perfect for me. The ecobee cloud update was always so delayed it was unusable for automations. Since I have 2 thermostats but only one furnace, I had struggled trying to get accurate runtimes since ecobee stats treat each thermostat as a separate entity. After using your procedure I set up an automation that would activate a virtual switch using as a trigger the status hvac_current action going from idle to heat for both thermostats. Created a second automation that triggers on ecobee going back to idle. The idle automation had a condition statement making sure both thermostats were in idle before toggling the switch to off.
At this point the virtual switch has the perfect run time statistics since it’s tracking both thermostats. I then created daily, weekly, monthly, and quarterly utility meter historical sensors so the stats are not gone after the standard 10 days I have within HA. I just completed all this but will need to see if the stats stay after 10 days but I have no reason to believe they won’t. I then replicated the above to track the central air system using “cooling” instead of “heating” havac action.
Thanks @automateit for the write-up, this is super helpful! I am considering buying an Ecobee thermostat and was curious if it is still true that the only valid options are home, away, or sleep that can be called from the HomeKit Controller?
Does it matter where the custom scenes are created to be able to call from HomeKit?
From this video, it seems like more HomeKit scenes can be created, but it must be done from the Ecobee app? I also see a note in ecobee’s support that says “The ecobee app features additional scene functionality not available in the Apple Home app”. I was wondering if creating the scenes in this way affected your ability to call those custom scenes from Home Assistant via HomeKit? Thanks!
I have an older Ecobee3. You might want to add as a prerequisite that you need a HomeKit-compatible Ecobee (the original Ecobee3 does not appear to be compatible.)
I assume nobody has figured out a way to communicate locally with the non-HomeKit Ecobees since they are presumably designed only to communicate with the Ecobee servers?
I am migrating from Ecobee cloud. I recommended the device from the ecobee cloud site … reset the device, then configured it back onto the network. When it was discovered I used the Homekit code displayed on the device … and it now appears in HA. But when I check out the Home app, it says accessory not responding.