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.
Thank you for your posts ! That are very helpfull and shows me some techniques about usage MQTT
@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
Camp - Remote ESP sends MQTT messages to adafruit.io which acts as a middleware
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
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
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.
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.
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.