custom-components / remote_homeassistant

Links multiple home-assistant instances together
Apache License 2.0
905 stars 82 forks source link

Homeassistants in different networks #300

Open Lukas67 opened 2 months ago

Lukas67 commented 2 months ago

Hi,

can you provide documentation for synching two instances in two different networks?

I would like to send power generation data from one house to another.

Thanks in advance and best regards Lukas

bluearcher-bc commented 2 months ago

This probably isn't going to be in scope for this project to document, but you're going to want to build a VPN between the sites, or the cooler solution in 2024 would be to set up Headscale or Tailscale or ZeroTier or Cloudflare Tunnel or any number of other mesh VPN technologies that are around now.

WayneManion commented 1 month ago

I have been trying to use Remote Home Assistant in conjunction with Tailscale. I have not had much luck getting it to work.

When I SSH into each Home Assistant box I can ping the other one by Tailscale IP address. DNS does not resolve. When I try to use the IP address when setting up the Remote Home Assistant it always says "Failed to connect to server".

lxp17 commented 1 month ago

https://github.com/custom-components/remote_homeassistant/issues/258

WayneManion commented 1 month ago

I had tried that already.

What turned out to be the problem was that I had configured the http section of my Home Assistant configuration.yaml file incorrectly. The traffic on port 8123 was https instead of http. I fixed it and then my two Home Assistant instances were able to chat back and forth like a couple of schoolgirls.

I would have thought maybe the "secure" option on the Remote Home Assistant configuration dialog would have been able to account for this, but I guess not.

Thanks

Smith37549 commented 1 month ago

I can't get tailscale to work, either. Can you post an example of your configuration.yaml? I think I'm missing something.

jaym25 commented 1 month ago

This whole Tailscale and Cloudflare thing is new to me and I just haven't had time to investigate it. I'm just using SSL over the internet and it works fine in my use case. I made some fixes a while back to keep this thing going, but I don't see being able to spend any real time on this for at least a couple of months. If someone would like to do a pull request and can fix these issues, even with yaml only, I will be happy to push it out in a release... If it's simply a configuration issue, post it in this thread and let's share what we know. Thank you!