Setting up VLAN via Ubiquiti gear

My network currently consists of an odroid running home assistant in a docker container. I have nginx running on a raspberry pi 4 which directs traffic to home assistant running on the odroid n2+ (running ubuntu mate 20.04). My odroid has no wifi dongle.

I have an ubiquiti switch running an Ubiquiti WAP. I have setup a separate LAN and wifi network for wifi smart devices on my switch. The LAN network is setup with a VLAN ID of 2. I want to connect my tasmota flashed athom wifi smart switch to the new wifi network but it doesn’t seem to work. It doesn’t seem to connect to my wifi router. I can connect my laptop to the new network, but I have no access to the internet when I do (which is probably a good thing).

I tried to setup my VLAN on the odroid using these instructions:- vlan - Ubuntu Wiki. However, I found that this stopped all access to my odroid. My question is how do I setup my VLAN so that:-

  1. I can still access my odroid from other parts of my network
  2. devices like my athom smart switch works but is isolated from my main network.

I am pretty new to Linux and network administration, so apologies if I have missed giving a key piece of information. I know that there are a lot of moving parts here, so if someone can tell me how to simplify things, that would be good.