Thanks to LYN member Rizvanrp for the first DD-WRT VLAN tagging guide for UniFi internet connection !!
Initial guide was posted on his site here.
I was trying to get the DD-WRT to create both VLAN 500 & 600 for UniFi, unfortunately it seem like impossible at this moment ......
There were a lot of discussion and confirmation by DD-WRT developers with regards to Broadcom VLAN tagging:
At this moment, Broadcom base is able to create multiple vlans at port level, however it can only handle VLAN ID up to 15, therefore it's unable to create VLAN 500 & 600 for UniFi usage. Whereas most Atheros & Ralink devices seem able to create 3 digits VLAN ID, however it seem like they are still unable to create multiple VLAN at port level like Broadcom.
I could be wrong, perhaps currently only Atheros & Ralink base DD-WRT device is able to create VLAN 500 for UniFi internet purpose only. For IPTV to work, still need to follow Rizvanrp guide to configure the DIR-615 as bridge mode for the STB only.
If you decide to go DD-WRT, I would suggest to follow Rizvanrp's guide to configure TM's DIR-615 as bridge for IPTV, then get another Atheros/Ralink router (NOT Broadcom!!) as per supported devices here for DD-WRT flashing.
You may refer here for example on how to flash and setup DD-WRT.
Some DD-WRT devices with UniFi Vlan Tagging setup example here.
A Broadcom base DD-WRT (ASUS RT-N12) Network setup screen, notice it has the "VLANs" tab setting to allow user to create & tag VLAN at port level
An Atheros base DD-WRT (TP-Link TL-WR941ND), no VLANs tab
A Ralink base DD-WRT (Buffalo WHR-G300N V1), also no VLANs tab