How Home Assistant found my Thread Thermostats
Tags: thread, smarthome, proxmox
Published: 2023-02-11 12:03:05

---
title: How Home Assistant found my Thread Thermostats
published: true
date: 2023-02-05 00:00:00 UTC
tags:
  - thread
  - smarthome
  - proxmox
canonical_url: https://carstenrn.com/2023/02/proxmox-vlan-vmbr/
---

The smart home can be a wonderful thing once everything works, nothing changes, and everyone “behaves” as the “smart home automator” anticipated. And then there is the cruel reality torturing us with breaking changes due to software upgrades, hardware failures, network brainteasers, and a general lack of automation in what usually is just our hobby project.

## My Intent

I had a very simple addition to my smart home setup in mind: I own a couple of [Eve thermostats](https://www.evehome.com/en-us/eve-thermo), which I very much like. Since I got them, I had them kinda “integrated” into my smart home via Apple Homekit, which essentially meant that I can control them from my Apple devices, but they are essentially uncontrollable from my smart home hub, [Home Assistant](https://www.home-assistant.io). Although Home Assistant could see my Apple accessories through the [Apple HomeKit integration](https://www.home-assistant.io/integrations/homekit/), it’s a read-only integration. What I _actually_ had in mind, though, was Home Assistant as the controlling instance for my thermostats.

## Integrations To The Rescue?

Fortunate me, clever and assiduous developers came the [Apple HomeKit Controller integration](https://www.home-assistant.io/integrations/homekit_controller/) for Home Assistant. Even better, this integration claimed to allow [integrating **Thread-devices into Home Assistant**](https://www.home-assistant.io/integrations/homekit_controller/#thread-device-support)! 🤯 “What a wonderful time to live in”, I thought and went straight to the integration.

## The Complications

Initially, everything seems to run smoothly. To get Home Assitant to recognize my thermostats, I first had to remove them from HomeKit: I opened the Home app (either an Apple device of your choice), opened the setting of the thermostat to remove (long-press on iOS, right-click on macOS), scrolled to the bottom of the setting and selected _Remove Accessory_.

Now I headed to my Home Assistant installation and checked under _Settings_ → _Devices & Services_ → _Integrations_ tab if the thermostat was listed there. I wasn’t immediately, hence I woke it up by simply touching any of its controls.

![Home Assistant recognized my thermostat](https://carstenrn.com/2023/02/proxmox-vlan-vmbr/ha-recognized-thermostat.png)

Being _very_ happy and thrilled about the super smooth experience, I selected _Add Integration_, leaned back and waited for a couple of seconds… and got **a timeout error**. From what the UI showed and what I found in the Home Assistant logs it first appeared to me to be an IPv6-related problem. This could have made sense as [Thread is indeed an IPv6-based protocol](https://openthread.io/guides/thread-primer). Having had a very technical view of the problem, I spent a couple of hours fiddling with the configuration of [IPv6 subnets](https://www.internex.at/de/toolbox/ipv6). And while I learned a bit about IPv6 through this journey, I missed one point which came to me only after putting my network problem aside for a day: My thermostats and Home Assistant don’t communicate directly but through [Thread border routers](https://openthread.io/guides/border-router), which in my setup are two HomePod Minis. And as my private network is IPv4 based, I likely tried to solve the wrong problem, or a symptom of it at best.

## My Setup

To understand what has been the problem, let’s take a look at an excerpt of my home’s network topology:

![My home&rsquo;s network topology](https://carstenrn.com/2023/02/proxmox-vlan-vmbr/home-network-topology.jpg)

What’s important here is that my HomePod Minis live in a **VLAN different from my Home Assistant instance**. This hasn’t been an issue with the [Apple HomeKit integration](https://www.home-assistant.io/integrations/homekit/), but hey, maybe it’s worth taking a second look into the documentation of the [Apple HomeKit Controller integration](https://www.home-assistant.io/integrations/homekit_controller/).

## The Actual Solution

Turns out, I should have indeed paid _a bit closer_ attention to the documentation of the [Apple HomeKit Controller integration](https://www.home-assistant.io/integrations/homekit_controller/) (emphasis is mine):

> In order to use HomeKit over Thread you need a working border router (like a HomePod mini). Your Home Assistant instance will need to be on **the same VLAN as the border router**.

Argh. 🤦‍♂️ This was actually an issue in my setup: I had to virtually move my HomeAssistant container into the same VLAN as my HomePods. I knew about [inter-VLAN routing](https://getlabsdone.com/how-to-tag-vlan-on-proxmox-bridge-interface/) and VLAN tagging, but haven’t thought about how to let my Proxmox server send traffic to multiple VLANs via the single network interface it is connected with to my network. Lucky enough, [other people had the same question](https://forum.proxmox.com/threads/vlan-ubiquiti.89917/) and shared the solution: To move my HomeAssistant instance from its current VLAN to the VLAN my HomePods are part of, I had to configure the Linux Bridge to be **VLAN aware** and, most importantly, change the **Bridge ports from `<interface>` to `<interface>.<vlan-tag>`** :

![Bridge configuration in Proxmox including the VLAN ID](https://carstenrn.com/2023/02/proxmox-vlan-vmbr/proxmox-vmbr-vlan.png)

Et voilà, this change did wonders:

![Successfully added thermostat to HomeAssistant](https://carstenrn.com/2023/02/proxmox-vlan-vmbr/ha-thermostat-success.png)