Getting home assistant to commuicate using Tailscale

Collecting sensor data from remote site.

I have two water pumping stations that I want to be able to monitor various information, e.g. amount of water int the tanks, water flow out of the pumpstations, pump status. The first station (Pumphouse 1) is physically close so that is hard wired to my own WiFI and I can connect it to my local lan. The second station (Pumphouse 2)is some distance away (+/- 1 km) and there is no possibility of a wired connection. That pump house has been equipped with a Teltonika router using 4g mobile data to connect with the internet.

Pumphouse 1 has the following equipment:

Teltonika router lan 192.168.15.0/24
Pi 3 hosting Tailscale
Pi 4 hosting my instance of Home Assistance, The Tailscale app is also installed on HA
Shelly Uni Plus equipped with a Denver temperature sensor. This is just temporary and only to help with proof of concept.

Pumphouse 2 has the following equipment

Teltonika router lan 192.168.10.0/24

Pi Zero hosting Tailscale
Shelly Uni Plus equipped with a Denver temperature sensor. This is just temporary and only to help with proof of concept.
HA is working 100% at Pumphouse 1 and can read the sensor information coming from the Shelly sensor at the same location.

If I connect locally to the Pumphouse 2 lan I can read the sensor data from the Shelly there.

Tailscale is working fine. I can see all three units on the Tailscale administration page

And now, finally, my main issue. I have not been able to access sensor data from Pumphouse 2 and include it in HA at Pumphouse 1.

I would really be grateful for any input as to how to enable HA to accept the remote data. HA at Pumphouse 1 cannot see the sensor at Pumphouse 2. And of course if my strategy is wrong and there is a better way to achieve my goal I would be open to any suggestions.

How is the data from the second sensor arriving at your HomeAssistant server? Via a routed direct network session? MQTT packets? How is it transversiing your two VLANs? How have you configured it to do so? Can your second router be configured as a bridge to the first?

You have pinpointed the problem exactly. At the moment HA at Pumphouse 1 cannot see any data from Pumphouse 2. My understanding was that HA, Pumphouse 1 and Pumphouse 2 are all included in Tailscale that HA would be able to read the data from Pumphouse 2, but it cannot. I really need advice on the best practice of allowing this to happen.

A little more explanation. Thanks to Tailscale all the units are connected.

Using my iMac on a separate lan and also connected to Tailscale I can connect to the Shelly sensors at both the Pumphouse locations and also HA at Pumphouse 1. So its not an interconnectivity problem, its a question of how to get HA at Pumphouse 1 to read sensor at Pumphouse 2

You can use site to site networking for tailscal3 and your HA should be able to get the data if both pump work via WiFi. Or there is a custom integration called GitHub - custom-components/remote_homeassistant: Links multiple home-assistant instances together · GitHub maybe this can help.

Do you have access to the HA terminal? If so, can you ping the IP of the Pumphouse 2 sensor from HA? If you cannot ping it, try DISABLING userspace networking in the Tailscale app using

userspace_networking: false

Thats a good idea however my ambition is to only have ONE instance of HA and the component you suggest is to link multiple Home-Assistant instances together. Or have I missunderstod the compoinents?

Thanks fot the link. I will check through this and ensure my Tailscale is correctly configured.

Then tailscale is your best bet. Is your pump wifi? And how would you add it to home assistant? I have two different servers in 2 countries. And one of them i added my remote devices thorugh tailscale on my HA.

Hi Inventor7777

Just some observations. At the moment I am trying this system on a workbench. I have the two pump houses connected direct to the modem of my incoming fiber so they have their own public IP addresses and no physical connection locally. If I join the Pumphouse 2 lan with my iMac I can ping the Pi hosting Tailscale on Pumphouse 1 both using the local address 192.168.10.xx and also Tailscale IP 100.70.85.xx I can also ping the pi hosting Home Assistant using the Tailscale IP 100.11..43.xx So no problems communicating via Tailscale from the remote site.

If I join the Pumphouse 1 lan I can ping the Pi Zero hosing Tailscale both on the local ip 192.168.15.xx and also the Tailscale IP 100.71.51.xx. I can also ping the Shelly sensor using the local IP 192.168.15.xx.

So it’s clear that I can communicate in both directions between the Pump houses thanks to Tailscale. Now to your question about the Home Assistant terminal. The answer is NO!

If I join the Pumphouse 1 lan with my iMac and connect locally to Home Assistant no problems. The Shelly that is installed on the same lan shows up and is giving vales as expected. The Tailscale integration is installed on Home Assistant and its showing as connected and running.

If I go inte integrations/Shelly and try to add the Shelly from Pumphouse 2 it cannot find the address. That Shelly does not have its own Tailscale IP address so I can only use the local address192.168.15.xx

If I open the Home Assistant terminal I cannot ping any Tailscale addresses. I can ping local addresses (192.168.15.xx) but nothing on Tailscale.

So your suggestion ’userspace_networking: false’ Where should line be inserted?

1 Like

Have been looking at the Tailscale app in my instance of Home Assistant and found the item Inventor7777 is talking about. Under the configuration there is a swith for User Mode. Switching this 'OFF' has solved the problem. Now I can access the senor at the other Pumphouse. Bg shout out to Inventor7777 - THANK YOU!

1 Like

Awesome! I'm very glad that fixed it!