I have a hollidayhome and primary home in different ends of Europe. Both have some smartdevices and is connected together with lan2lan vpn. I want to manage both locations in the same instance of HomeAssistent.
Unfortunately it seems like multiple homes is not supported by homeassistant. I can define the locations as different zones, but I find some limitations:
There are no connection between areas and zones. As a (dirty?) workaround i can use prefix but it is not smoth.
Sunrise/-fall-plugin only use one location (but it is unclear for me which one of the zones is used)
Are there any functions in Homeassistent related to multiples homes or is the support for multihome more or less not existing?
I have used Remote Home Assistant successfully, to pull in the sensors from our second home. It works well for monitoring but it is one-way - you can see all the data and you can use it to trigger actions locally but you cannot trigger actions at the remote (secondary) location from the primary location. It also does not expose any video you may have integrated in the remote location (at least I could not get it to work). If you only want to monitor a remote location and use that data in local automations it works great.
What I found that is best for me is to take advantage of a feature in my Samsung Note 10+. This model as well as some others allow you to have separate profiles for personal vs work apps. With this feature I have 2 separate HA Mobile apps installed, one for our primary home and another one for our second home. The beauty is it exposes all the same info to HA so things like location data, battery, etc are all available. Bonus is I can also see my cameras in the mobile apps. I currently have security cameras integrated in my HA at each location that I display in each locations respective mobile app. This has been my standard way of working for ~1 year.
I have seen some comments that imply that you can have multiple homes in the HA App for the iPhone but I am not in the Apple universe so I cannot add more that that.
Thanks; for several reasons I dont want to set up a separate HA-instance in my secodary home but link everything (throught vpn) to my primary installation.
I have a similar situation with two homes and a single instance managing both. It took a while to figure out the setup, but the general idea is to have a tunnel that acts as if home assistant had a network interface on the other network. It can then detect devices as if it was on its network.
Iāve put a openvpn server en raspberry pi in the other location and configured it to use tap. The server running home assistant has openvpn installed and connects to the server. Thereās a setting to add in home assistant to make sure both network interfaces are used.
Hey, Iād like to know more about how you set your network up, I didnāt see an option to message you directly, you can pm or just respond to this if youāre good with it. Thanks!
Itās been a while but Iāll try to explain as much as my memory serve me.
Iām currently managing 4 locations under one HA app. I donāt have anything crazy. I only have a few switches in each location.
My setup contains a main server at the primary location running docker. I use a free DNS service with my Asus Router. You can use Afraid DNS if your router isnāt equipped with that service. Next, open the ports on the router for the MQTT client to communicate with Home Assistant MQTT server. Once you have established an MQTT communication remotely, then you can add switches, sensors, or what have you from anywhere in the world. Just make sure to setup SSL certificate to secure your connection. You definitely donāt want people to sniff your package and control your device.
Create an automation on your phone device tracker that says when state is zone Home2, run set state to update person.you to āhomeā
Personally i think using one ha for multiple buildings is not ideal unless you are tracking area occupancy
I just use this because i run a cloud HA for all cloud connected integrations and just want my phone updating one HA, i then sync each entity thatās relevent at each physical building with remote home assistant.
This will still do what you want
description: ""
trigger:
- platform: state
entity_id:
- device_tracker.phone
condition:
- condition: state
entity_id: device_tracker.phone
state: Home2
action:
- service: python_script.set_state
data:
entity_id: person.you
state: home
mode: single
It"s probably a bit late now, but it may be useful to someone eventually.
Iām using OpenVPN to have a tunnel (layer 2 I think) between the two locations. Client should be where HA is, server should be in the other location. Previously, when I was running HA in docker, I would use the following configuration on the server side:
port 1195
proto udp
dev tap0
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/jupiter.crt
key /etc/openvpn/keys/jupiter.key
dh /etc/openvpn/keys/dh.pem
tls-auth /etc/openvpn/keys/ta.key 0
tls-server
server-bridge 192.168.2.1 255.255.255.0 192.168.2.3 192.168.2.4
keepalive 10 120
;cipher AES-256-CBC
comp-lzo adaptive
user nobody
group nobody
you obviously need to put the server public IP and port, and manage any firewall /router related topics to port forward / open ports
using tap (rather than tun) is acting as if you had a physical cable linking HA to the other location. tun is possible too, but requires to setup routing and discovery doesnāt work well unless you put some kind of multicast proxy, which I never got to work
itās better to use UDP rather than TCP (the proto command) for reasons I only partially understand
in the docker setup, you need the ifconfig / server-bridge command to set the IP of the tunnel on the other network (where the OpenVPN server is / where the HA server is not). Iāve now move to HAOS in a VM, configured the OpenVPN client on the host and pass through the interface to the VM, so I removed those two commands and setup the IP in HAās configuration
in both cases, also in HAās network configuration, you need to uncheck auto-configure and select the network interfaces (otherwise it just takes the first one)
with this, the HA web interface will be accessible from both networks and it can access/discover devices on both networks
dev tap0 on the server allows to have a fixed tap device, but you may as well put dev tap (itās maybe implicit with proto udp) if you donāt need to reference the device