I've successfully transitioned many devices to local control using Zigbee, Z-Wave, and ESPHome, but not all integrations have been straightforward. A notable exception has been the WeatherFlow integration for my Tempest weather station.
WeatherFlow offers two types of integrations. The first relies on the cloud, where the weather station sends data to the Tempest cloud service, and the WeatherFlow cloud integration then pulls this data into Home Assistant at intervals.
The second method utilizes the fact that the Tempest weather station broadcasts weather state changes via UDP on the local network. The local WeatherFlow integration in Home Assistant listens for these broadcasts. However, my setup had the Tempest weather station on a different network VLAN than my Home Assistant server. Since UDP broadcasts typically don’t cross VLAN boundaries, this local integration wasn’t working.
I had multiple reasons for placing the Tempest weather station on a separate VLAN. Primarily, the default behavior of sending frequent UDP broadcasts can lead to significant network traffic, especially impacting wireless networks. Additionally, I segment my network for security purposes, preventing devices on the Tempest's VLAN from scanning or connecting to computers on more secure VLANs.
To solve this issue, I discovered the udp-broadcast-relay-redux project. This tool listens for packets on a specified port and can relay them across different network interfaces. A key feature is the ability to select a target IP address, ensuring the relayed messages don’t flood the network.
Setting this up was straightforward. I created a Ubuntu 22.04 Linux container on my Proxmox server, configuring it with network interfaces for each VLAN I wanted to bridge.
LXC Network Configuration
In my setup, the eth55
interface connects to the VLAN with the Tempest weather station, and eth0
connects to the VLAN with my Home Assistant server.
LXC Network configuration |
After configuring the networks, I started the container, downloaded and compiled the udp-broadcast-relay-redux package. I then used the following command to redirect the Tempest broadcast packets to Home Assistant:
udp-broadcast-relay-redux --id 1 --port 50222 --dev eth55 --dev eth0 -t <home assistant ip address> -f
No comments:
Post a Comment