How to get info from far sensors - over the Internet without the vpn

Hello,
HA is great and very interesting platform.

But… I really need to aggregate sensors from remote, far away sensors. I don’t have an idea if that is possible?

For example - from other flat which I would like to monitor temperature :
I would get information about the temperature in 15 minutes frequency.

I know that will utilise the bandwith. There are Lte connections beteen locations, so it should be enough.

The remote sensors will be in the other district, on the other internet connection, with another remote op.

My HA server instance could be available thru the public IP address in the office location.

What can I do? Maybe on the sensors can I point an target IP address?

Regards

1 Like

Is there any specific reason that you want to do this without a VPN?

You could use Cloudflare with IP address restrictions, a high port number and SSL, but a VPN is still safer.

Not sure of your exact situation ie if you two instances of HA. I have a remote camp with wireless internet (LTE modem). I have a variety of sensors and I send lake water, refrigerator, outdoor and indoor temperatures every hour to io.adafruit.com MQTT server. I run a single instance of Hassio at my main house and have subscribed to pull these values into my Hassio.

I used to use dweet.io as the ‘middleman’ but have recently migrated to adafruit MQTT.

4 Likes

Thank you for your posts ! :slight_smile: That are very helpfull and shows me some techniques about usage MQTT :wink:

@BillRandolph - can’t use VPN -as I haven’t find to made VPN on ESP (which is rather true - regarding low CPU frequencies and resources to be rather ‘thin’ device).

The second part is not understable for me - sorry - could you let me know where you wan’t to use cloudflare?
In the office, where I would to publish HA on public IP address I have WAN routed by firewall where I wan’t to limit unwanted sonnections.

@jhart003 Thank you ! That’s exactlt is my problem.
So, am I correct the architecture looks

  1. Camp - Remote ESP sends MQTT messages to adafruit.io which acts as a middleware
  2. Hassio connects to adafruit.io to download data stored on adafruit.io into local HA instance?

If yes, that is would need !

But, after writing this yesterda’s post I have found https://github.com/esphome/esphome-docs/pull/463/files which looks very attractive.
From my perspective - the IoT hub from Azure is fine as would be cheap (or free) ?
And all looks like functional out of the box :slight_smile:

But I would like to discuss for the best method - as I rather would like to do it safe and working. I have not possibilites to visit the remote locations frequently if the remote/camp ESP will have a problems :slight_smile:

You don’t need the VPN to run on the device, you would run it on your router, or using something like PiVPN on a Pi Zero. This would/could allow full access to your entire LAN from anywhere in the world, without having to risk directly opening ports.

Cloudflare has a free service level that allows you to restrict a lot of aspects of incoming connections to your network, so that if you did open it up (or even if you went with a VPN, which would be better) you could set up ACLs of different sorts, and get some nice reporting showing who/what connected, or tried to connect. There is a useful integration for Cloudflare, and also some addons that leverage different things in different ways.

There’s a ZeroTier addon for home assistant that should make the remote home assistant look like it is connected to your office LAN.

How do you pull data from Adafruit IO into Home Assistant?

Mark your feed as public. Then you can use REST API to pull from Adafruit (i.e. https://io.adafruit.com/api/v2/…). Actual API URL is visible under “Feed Info” - Current Endpoints on Adafruit webpage.

I run a standalone local Mosquito MQTT server and I added io.adafruit as a bridge.

Let me know if you need more details.

1 Like

This is the part i can’t do.
Could you please post a screenshot of your MQTT yaml code, please?

I set my feed to public then added this to my mosquito config:


# Connection name
connection adafruit

# Insecure
address io.adafruit.com:1883

# Credentials
remote_username (insert username here)
remote_password (insert AIO key here)
clientid (insert unique id here)

# Config options for bridge
start_type automatic
cleansession false
bridge_attempt_unsubscribe false
notifications false

# Also important. if set to True the connection will fail,
# it seems io.adafruit.com doesn't support this
try_private false

# list topics to subscribe to here - Note, this grabs all my feeds
topic (adafruit username)/feeds/# in

Would it be possible to achieve this with Telegram? I don’t have an actual implementation. It’s just something that came to my mind as an alternative solution.

If you have remote sensor locations even without IP coverage LoRaWAN amy be another option for you. It was implemented with exactly this idea in mind.