What’s a good plan for remote access to my smart home during a power outage when I’m on an extended vacation?
Jump to What I Did.
Since you’ll be away for a while, you need a robust failover plan to ensure continuous remote access to your smart home and Proxmox cluster. Here’s a multi-layered approach using your existing equipment:
🌐 1️⃣ Internet Failover
Since you have:
- Primary ISP: AT&T Fiber (Nokia BGW320-505)
- Backup ISP: T-Mobile 5G Hotspot (30GB/month before throttling)
- Spare ASUS RT-AC68U Router (WAN Failover Capable)
🛠 Steps to Set Up Failover
- Enable Dual WAN Failover on ASUS Router
- Set AT&T as primary WAN and T-Mobile Hotspot as secondary WAN
- Choose failover mode (not load balancing)
- Adjust health check settings to detect AT&T failures
- Avoid Double NAT Issues
- If AT&T’s Nokia router is in router mode, enable bridge mode on the ASUS router
- Assign static routes if needed to prevent conflicts
🔌 2️⃣ Power Resilience
Since you have a UPS, ensure:
- Proxmox nodes, routers, and modem are on the UPS
- Use a smart plug on your modem & router (in case they lock up)
🛠 Automation Ideas
- Smart Plug Auto-Reboot
- Use a TP-Link Kasa or Tasmota plug
- Set up a rule: If internet is down for 10+ min, cycle power to the router/modem
🔐 3️⃣ Remote Access Setup
🛠 VPN Options
- Tailscale VPN (Easiest & Most Reliable)
- Run Tailscale on your Raspberry Pi (or Proxmox VM)
- Enables access even if your IP changes
- No port forwarding needed
- PiVPN (WireGuard or OpenVPN)
- Run on a Raspberry Pi
- Requires port forwarding, so it may fail if your ISP changes your IP
- Cloudflare Tunnel (Great Backup Plan)
- Provides a free tunnel to access your smart home services
- Works even if your public IP changes
🚨 4️⃣ Automatic Recovery from Failures
🛠 Proxmox & Server Auto-Recovery
- Use Smart Plugs for Power Cycling
- Watchdog Timer on Proxmox
- If a Proxmox node stalls, it will auto-reboot
🛠 Network Watchdog on Raspberry Pi
Run a simple script to detect network failures and auto-reboot devices:
#!/bin/bash
if ! ping -c 5 8.8.8.8 &> /dev/null; then
echo "Internet down! Rebooting router..."
ssh user@smartplug "turn off && sleep 10 && turn on"
fi
(Schedule with crontab -e to run every 10 minutes)
📌 Summary: Best Remote Access Plan
✅ Failover Internet → ASUS RT-AC68U handles automatic switch to T-Mobile 5G
✅ UPS Protection → Keeps critical devices online during power outages
✅ Smart Plug Automation → Auto-reboots router/modem if unresponsive
✅ VPN Access (Tailscale) → Provides secure access even if ISP changes IP
✅ Proxmox Watchdog → Ensures servers auto-recover from crashes
✅ Cloudflare Tunnel (Optional) → Secondary remote access method
🚀 Next Steps
- Do a test run before your trip
- Monitor logs remotely (Tailscale + Home Assistant)
- Set up alerts (Home Assistant + Pushover/Telegram)
Would you like help setting up any of these steps? 🚀
I implemented dual Wan on the ASUS router and used IP passthrough on the Nokia router. Failover mode works. Most of my automation works with Alexa. I have the UPS. I’ll implement the RPi watchdog. I think I’ll shutdown Proxmox during a power outage to preserver the UPS. I think I can get the temperature from my Ambient Weather station if it’s on the UPS. Two of my blink cameras work on batteries. I’ll need an Echo on UPS.
That sounds like a solid plan for maintaining remote access and automation during an outage. If your ASUS router supports custom scripts, you might consider adding automation to gracefully shut down Proxmox when the UPS battery level gets too low. Let me know if you want help setting that up!
how would you detect the battery level?
You can detect the UPS battery level using Network UPS Tools (NUT), which allows you to monitor your UPS from a Raspberry Pi, your Proxmox servers, or another system on your network. Here’s how you can set it up:
Step 1: Install NUT on Proxmox or a Raspberry Pi
On your Proxmox node or Raspberry Pi (whichever is connected to the UPS via USB):
sudo apt update
sudo apt install nut nut-client
Step 2: Configure NUT to Read UPS Data
Edit the NUT configuration file to recognize your UPS:
sudo nano /etc/nut/ups.conf
Add an entry for your UPS. For example, if it’s an APC UPS, it may look like this:
[myups]
driver = usbhid-ups
port = auto
desc = "My UPS"
Save and exit.
Restart the NUT service:
sudo systemctl restart nut-server
Step 3: Check Battery Status
Run the following command to check UPS status:
Look for a value like:
This tells you the current battery percentage.
Step 4: Automate Proxmox Shutdown on Low Battery
Create a script (/usr/local/bin/ups-shutdown.sh) that will shut down Proxmox when the battery is low:
#!/bin/bash
BATTERY_LEVEL=$(upsc myups battery.charge)
if [ "$BATTERY_LEVEL" -lt 20 ]; then
echo "Battery low ($BATTERY_LEVEL%). Shutting down Proxmox..."
/usr/sbin/poweroff
fi
Make it executable:
chmod +x /usr/local/bin/ups-shutdown.sh
Step 5: Run This Script Periodically
Add this to cron to check the battery level every minute:
Add this line at the bottom:
* * * * * /usr/local/bin/ups-shutdown.sh
This setup will ensure Proxmox shuts down when the UPS battery gets too low.
Would you like help with setting up email or push notifications when the power goes out?
To get email or push notifications when the power goes out, you can integrate the UPS monitoring system with sendmail (for email notifications) or use Pushover or Telegram (for mobile push notifications).
1. Send Email Notification on Power Outage
You’ll need msmtp and mailutils to send emails from the Raspberry Pi or Proxmox server.
Install Required Packages
sudo apt update
sudo apt install msmtp mailutils
Configure msmtp
Edit the configuration file:
Add the following, adjusting for your SMTP provider (Gmail, Outlook, etc.):
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp.log
account default
host smtp.gmail.com
port 587
from your-email@gmail.com
user your-email@gmail.com
password your-email-password
Save and exit.
Test Email Sending
Try sending an email:
echo "Test email from Raspberry Pi" | mail -s "UPS Test Email" your-email@example.com
If you receive the email, the setup is working.
Modify the Shutdown Script to Send an Email
Edit the /usr/local/bin/ups-shutdown.sh script to send an email when the UPS is on battery:
#!/bin/bash
BATTERY_LEVEL=$(upsc myups battery.charge)
ONLINE_STATUS=$(upsc myups ups.status)
if [[ "$ONLINE_STATUS" != "OL" ]]; then
echo "Power outage detected! UPS running on battery. Battery level: $BATTERY_LEVEL%" | mail -s "Power Outage Alert" your-email@example.com
fi
if [ "$BATTERY_LEVEL" -lt 20 ]; then
echo "Battery low ($BATTERY_LEVEL%). Shutting down Proxmox..." | mail -s "Critical Battery Alert - Shutting Down" your-email@example.com
/usr/sbin/poweroff
fi
2. Push Notifications Using Telegram
If you prefer mobile push notifications, you can use Telegram bots:
Create a Telegram Bot
- Open Telegram and search for
BotFather.
- Start a chat and use the command
/newbot.
- Give your bot a name and username.
- Copy the API token from BotFather.
Find Your Chat ID
- Open
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates in a browser.
- Send your bot a message.
- Refresh the browser; your chat ID will appear.
Modify the Shutdown Script to Send Telegram Messages
Edit /usr/local/bin/ups-shutdown.sh:
#!/bin/bash
BATTERY_LEVEL=$(upsc myups battery.charge)
ONLINE_STATUS=$(upsc myups ups.status)
TELEGRAM_BOT_TOKEN="YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID="YOUR_CHAT_ID"
send_telegram() {
curl -s -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-d chat_id="$TELEGRAM_CHAT_ID" \
-d text="$1"
}
if [[ "$ONLINE_STATUS" != "OL" ]]; then
send_telegram "⚠️ Power outage detected! UPS running on battery. Battery level: $BATTERY_LEVEL%"
fi
if [ "$BATTERY_LEVEL" -lt 20 ]; then
send_telegram "🔴 Critical Battery Alert! Battery level: $BATTERY_LEVEL%. Shutting down Proxmox."
/usr/sbin/poweroff
fi
3. Running the Script on a Schedule
Edit cron:
Add this line:
* * * * * /usr/local/bin/ups-shutdown.sh
This checks the UPS status every minute.
Would you like to add any additional notification methods, like Pushover or Home Assistant alerts?
What I Did
Sure! Here’s a quick and clear guide to set up SSH key-based login from your local machine to a remote Linux server, so you can skip password prompts.
🔑 Step-by-Step: SSH Key Setup
1. Check for existing SSH keys on your local machine
If it exists, skip to step 3.
2. Generate a new SSH key pair (if needed)
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
- Press Enter to accept defaults.
- You can set a passphrase (or leave it blank for no prompt).
This creates:
- Private key:
~/.ssh/id_rsa
- Public key:
~/.ssh/id_rsa.pub
3. Copy your public key to the remote server
ssh-copy-id user@remote-host
- Replace
user with your username and remote-host with the IP or hostname.
- It will prompt for your password once to copy the key.
Alternate method (if ssh-copy-id isn’t available):
cat ~/.ssh/id_rsa.pub | ssh user@remote-host 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh'
4. Test it
You should now log in without entering a password.
✅ Optional: Configure Passwordless sudo
If you want to run shutdown commands via SSH without typing the sudo password:
- On the remote server, run:
- Add this line at the bottom (change
user to your username):
user ALL=(ALL) NOPASSWD: /sbin/shutdown, /sbin/poweroff
Now your remote shutdown command works like this:
ssh user@remote-host 'sudo /sbin/shutdown -h now'
Crontab
- timedatectl # check time zone
- timedatectl set-timezone America/Chicago
- * * * * * date >> /home/pi/tz.txt #verify how crontab sees time