Controlling devices from multiply HA servers in different networks

Hi all,

I’m trying to control devices from 5 different HA (hassio) servers which are in different locations and naturally with different networks.

Is there any master/slave or some other tool which can enable the option for controlling other devices from other HA networks?

I have 5 stores which I would like to put some control for energy saving. I’m wondering if it is possible using Home assistant for this.

Take a look at this, might be what you need.

Eventstream or statestream components may be used to create master/slave relation

I use HA API.
I posted example at link

It seems working only if the HA servers are at the same network.
Any idea how can i configure it if each HA server is at different network with different duckdns access?

your slave server is at the same network as the master server?

NO. I have units in seperate vlan so different IP space.

bearer token is equal user/password login so network should not matter.
You may test that from command line using curl to your duckdns address. It should return current HA config data.

/usr/bin/curl -X GET -H "Authorization: Bearer your_token" -H "Content-Type: application/json" https://yourduckdns/api/config

https://developers.home-assistant.io/docs/en/external_api_rest.html

1 Like

Don’t know to be honest. Haven’t used it for a long time and never had the need for a control of a instance in an external location.

thanks. for some reason it doesn’t work. latter i will try remove the SSL and test again.

do you use reverse_ proxy like NGINX?

maybe check local function then verify external.
I verify from external network to https HA site and work without problem.

look like @Burningstone recommendation uses same rest api for function