mikeman
(Mike Man)
February 10, 2020, 2:04pm
1
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.
tmjpugh
(Tmjpugh)
February 10, 2020, 2:39pm
3
Eventstream or statestream components may be used to create master/slave relation
I use HA API.
I posted example at link
@tmjpugh
Hi, can you please post examples of Restful switch how you implemented these. Documentation is lacking details on this. Thanks
mikeman
(Mike Man)
February 10, 2020, 5:17pm
4
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?
mikeman
(Mike Man)
February 10, 2020, 5:19pm
5
your slave server is at the same network as the master server?
tmjpugh
(Tmjpugh)
February 10, 2020, 6:29pm
6
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.
mikeman
(Mike Man)
February 11, 2020, 4:57am
8
thanks. for some reason it doesn’t work. latter i will try remove the SSL and test again.
tmjpugh
(Tmjpugh)
February 12, 2020, 8:50pm
9
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