Govee Lan integration with Vlans?

I was just curious if anyone has been able to get the govee lan integration working across vlans?

Mine don’t seem to be showing up and I know the docs said they have to be on the same network but I was hoping someone had a work around or some firewall rules to still get it working.

2 Likes

I am curious as well. I have 2 separate VLANs (Trusted, IOT) in my Unifi Setup, where Home Assistant is in my trusted network as a docker container (with network_mode “host”) and my Govee lights are part of IOT.
Using the govee-lan-hass integration I am not able to control the lights via LAN API.

Sorry to bump this - but I am also looking into this.
I guess you might need to masquerade the Home Assistant server IP into the IOT network so Govee thinks it is on the same VLAN. It’s not something I have experience in though.

Has anyone managed this?

Seconding the bump. I’m still struggling to overcome this limitation myself.
Particularly as it’s now the only remaining device I can’t “localise” within my HA world.

Anyone?

Bump. Anyone ever make this work. Read this guide and opened all required addresses but cannot get it to work and don’t even see HA sending anything to mDNS address.

https://app-h5.govee.com/user-manual/wlan-guide

I am STRUGGLING with this. Spent hours in my router trying to get multicast working across interfaces. The frustrating thing is that I have the IP address of the light, but there’s no way to give that info to the integration. The multicast is only needed for IP discovery, and according to the local API’s documentation there’s no real need for multicast once the IP address has been communicated. It’s so frustrating, because the lamp I got (Govee Floor Lamp 2) also has Matter support, but getting Matter to work across interfaces is ALSO an absolute nightmare. Stick to Zigbee/Z-Wave/ESPHome, kids.

For what it’s worth, I got this to work across interfaces (e.g. Home Assistant on LAN1, 192.168.1.1/24, and Govee lights on LAN2, 192.168.2.1/24). I played around with a few pfSense packages (IGMP Proxy and PIMD) but had no success. I discovered the UDP Broadcast Relay package and that did the trick. Here are roughly the steps I took:

  1. Enable UDP Broadcast Relay
  2. Set up and enable 2 UDP Broadcast Relay instances to forward ports 4001 and 4002, respectively. Both with multicast group 239.255.255.250 and across the interfaces I need (LAN1 and LAN2 above). I left Spoof Source as the default (Keep Original) and set the instance numbers to 1 and 2 (don’t think this matters as long as they’re different).
  3. Add a firewall rule to allow the Govee lights to access UDP port 4002 of Home Assistant.
  4. Add a firewall rule so that Home Assistant can access the Govee lights. I’m not sure what exactly this would look like, as my firewall allows Home Assistant unfettered access to the subnet the Govee lights are on.
  5. If running, stop the Govee2MQTT addon, else I got “error 98” or something like that.
  6. Add the “Govee lights local” integration.

I don’t know enough about multicast/networking to know why this worked, but it worked. I read many people suggesting that you need a firewall rule to “allow IP options” (in the “advanced” section of a pfSense firewall rule), but I don’t believe this was the case for me. It seemed many people had success making this work with PIMD, but it was much more complex than the UDP forwarder and I couldn’t figure it out. Perhaps my method has some downsides but I have not found them yet.

Hope this helps someone!

Edit: Oh, also, I found iperf to be invaluable for debugging this to test whether multicast traffic is going through. I’m not too familiar with iperf, but I found these commands from someone with a similar issue.

  1. Start a server listening to 239.255.255.250 on port 4001. You may find it useful to try different addresses and ports (particularly, port 4002 since that’s the second one Govee uses):
    iperf -s -u -B 239.255.255.250 -i 1 -p 4001
  2. In a second terminal, start a client:
    iperf -c 239.255.255.250 -u -T 32 -t 3 -i 1 -p 4001
    Obviously, be sure that the IP address and port match the server. If the connection succeeds, you’ll see the server start to print out a series of messages. The client will print out messages in either case. It’s useful to try this first in two terminal windows on the same machine so that you can see what a successful connection looks like. Second, you can start the server on your Home Assistant machine (or another machine on that subnet) and the client on your local machine (or another machine on the same subnet as your Govee lights).

I use opnsense and literally only have a firewall rule to allow Hass host on main lan to talk to the govee light on VLAN 25. I do have multicast broadcasting enabled for other reasons, idk if that has anything to do with it working.

So basically an any protocol, IPv4 rule that allows Hass IP (or govee2mqtt host) to talk to govee device ip on the VLAN interface.