I’ve recently setup HomeAssistant (HA) and everything has been going well except for one thing.
I have my network segmented using vlans and have a total of 3 networks. LAN, IoT, and Guest. It’s been working great for me for several years now. I only use 3 devices on my LAN. My phone, my laptop, and my PS4. I have the firewall configured so that the LAN network can access the IoT and the WAN, but the IoT network can only access the WAN.
I have the HA on my IoT network to simplify configuring and for the ease of use using its discovery to find all my IoT devices. All of that has worked excellent.
However, now I want to add the PS4 integration to HA. The easy way is to simply put my PS4 on the IoT network, yes, this is I know. But I’m a knucklehead and don’t want to do that. I want to keep it on my LAN network if at all possible. I’ve tried setting Traffic Rules in the firewall so only the HA can access LAN devices, but to no avail.
Does anyone have any advice for how I would/could achieve this? Or is this a pipe dream because I have the main firewall config setup so that IoT network can’t access LAN network and there’s no way around it without changing the main config. I’m hoping I can do this with a simple traffic rule.
This is easily possible with some firewall rules. Let’s see your config files, and we also need to know the ip of your ha server.
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
config rule
option name 'HA to LAN'
option src 'IoT'
option src_ip '172.18.6.200'
option dest 'lan'
option target 'ACCEPT'
but it didn't work... or maybe it did but it's not the culprit for my issue. The PS4 integration for HA requires a third party app (I'm using iPhone) called "PS4SecondScreen" and upon further research, some apps require hardware to be on the same network/subnet depending on the protocol it uses for discovery. So I might just be SOL if that happens to be the reason why HA doesn't discover my PS4 during the config process.
I've tried something similar but just allowing access to the LAN entirely with no luck. I mention a possibility as to why in the post above. I will try defining the PS4 ip in the rule to see if that helps.
Does the PS4 + HA integration work using direct IP address access, or does it expect to be able to function based on autodiscovery/mdns type methods? The latter will only work when both devices are on the same subnet, but you may be able to use an mdns reflector/repeater to allow this traffic to be routed between the two networks.
Yes, I've put the PS4 on the IoT network and it works as it should. That's exactly what I'm thinking. In my research, I haven't been able to find out what discovery method the third party app uses. I've tried a plethora of different rules and routes with no success, which leads me to assume that the app is wanting the HA and the PS4 to be on the same subnet because the issue is actually a discovery limitation of the app. I'll have to look into mdns reflector/repeater as a possible workaround. I've no idea where to start with that other than a Google search and searching on this forum. Thanks for the tip.
I tried IGMP proxy with no luck as well. I'm in over my head trying to wrap my head around this. I guess I'll do without for now and try again another time. Oh well...
I’m not sure if you are still trying to solve the issue with your devices being on a different subnet than your home assistant instance. Maybe my reply a few days ago wasn’t clear enough due to the lack of time I had so I will try again…
As I told you before:
How to do that? By simply adding a second (virtual) nic to your home assistant assigned to another network... in your case your LAN network. How can you add a second nic to HA? This probably depends what version/installation method of HA you use. I’m using HAOS = Home Assistant OS in a virtual machine on my proxmox Server and this is what I did (maybe it will help you):
I first created a new Vlan aware network bridge in Proxmox
added the bridge as a new network device to my HA VM and rebooted the VM
After that I went to HA/Settings/System/Network and unchecked “Auto configure” under Network Adapter and activated my new network adapter. Looks like this:
Now I can control any devices in both networks (LAN and IOT) via HA event though my firewall is blocking forwarding from IOT zone to LAN.
Hope this helps in any way...
You hit the nail on the head. I happened upon a tutorial to do this and went this route and got it working. Yes, your initial comment went right over my head lol. But I appreciate it nonetheless.