Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Core for Android (Termux)

A simple installer to run Home Assistant Core on Android devices using Termux - no root required!

Repurpose old Android devices by hosting Home Assistant on them!

⚠️ Important Notes

  • This installs Home Assistant Core only (not Supervised or OS)
  • Add-ons are NOT available in Core installation (requires HA OS or Supervised)
  • However, you can still use integrations and custom components via HACS
  • Works on non-rooted Android devices
  • Requires stable internet connection for installation
  • Installation takes 30-60 minutes depending on device

📋 Prerequisites

  1. Android device
    • ARM64/aarch64 (recommended - most modern devices)
    • ARMv7 (32-bit ARM - supported with limitations)
    • x86_64 (rare but supported)
  2. Termux app - Install from F-Droid (NOT Google Play Store)
    • The F-Droid version is more stable and recommended by Termux developers
  3. At least 2GB free storage
  4. Stable internet connection

🚀 Quick Installation

  1. Install Termux from F-Droid

  2. Open Termux and run these commands:

# Update Termux packages
pkg update && pkg upgrade -y

# Install git
pkg install git -y

# Clone this repository
git clone https://github.com/clutchthrower/Home-Assistant-For-Android.git

# Navigate to the directory
cd Home-Assistant-For-Android

# Make the installer executable
chmod +x install.sh

# Run the installer
./install.sh
  1. Wait for installation (30-60 minutes)

  2. Access Home Assistant at http://localhost:8123 or http://YOUR_DEVICE_IP:8123

📱 Usage

Starting Home Assistant

cd ~/Home-Assistant-For-Android
./start.sh

Or manually:

source ~/homeassistant/bin/activate
hass

Stopping Home Assistant

Press Ctrl+C in the Termux session running Home Assistant, or:

./stop.sh

Updating Home Assistant

cd ~/Home-Assistant-For-Android
./update.sh

Auto-start on Termux Boot

cd ~/Home-Assistant-For-Android
./setup-autostart.sh

Then enable "Run at boot" in Termux settings.

🔧 What Gets Installed

  • Python 3.12 with required dependencies (auto-detected)
  • Home Assistant Core (version matched to your Python version)
  • Pre-compiled packages (numpy, cryptography) for faster installation
  • Required system libraries:
    • Build tools (gcc, make, rust)
    • Image processing (libjpeg-turbo)
    • Cryptography libraries
    • FFmpeg for media
    • OpenBLAS for numerical computing
    • And more...

Special handling:

  • ARMv7 devices: Some optional components skipped to avoid compilation issues
  • Uses system-site-packages for pre-compiled libraries

📂 Directory Structure

~/Home-Assistant-For-Android/  # This repository (scripts)
~/homeassistant/               # Python virtual environment
~/.homeassistant/              # Home Assistant configuration

🐛 Troubleshooting

Installation fails with package errors

pkg update && pkg upgrade -y
rm -rf ~/homeassistant
cd ~/Home-Assistant-For-Android
./install.sh

Home Assistant won't start

Check logs:

source ~/homeassistant/bin/activate
hass -v

Connection refused at localhost:8123

  • Wait 5-10 minutes after first start (dependencies are being installed)
  • Check if Home Assistant is still running
  • Try accessing via your device's IP address instead

Termux keeps stopping/killing the process

  • Disable battery optimization for Termux in Android settings
  • Acquire wakelock: termux-wake-lock (already included in start script)
  • Keep device plugged in

🔄 Version Compatibility

This installer automatically detects your Python version and device architecture, then installs the appropriate Home Assistant version:

Python Version Home Assistant Version (ARM64/x86_64) Home Assistant Version (ARMv7) Status
3.13+ 2024.12.x 2024.3.3 ✅ Latest
3.12 2024.11.3 2024.3.3 ✅ Recommended
3.11 2024.3.3 2024.3.3 ✅ Stable
3.10 2023.12.x 2024.3.3 ⚠️ Older

Important Notes:

  • Termux now includes Python 3.12, so most users will get Home Assistant 2024.11.3
  • ARMv7 (32-bit ARM) devices: Limited to Home Assistant 2024.3.3 due to Rust compilation issues with newer versions
    • Newer HA versions require the uv package which fails to compile on 32-bit ARM
    • 2024.3.3 is a tested, stable version that works well on ARMv7 devices
    • Most modern Android devices use ARM64 and are not affected by this limitation

❓ FAQ

Q: Can I install add-ons? A: No, add-ons require Home Assistant OS or Supervised, which cannot run on Termux. However, you can use integrations and HACS custom components.

Q: Does this require root? A: No! Works on stock Android devices without root access.

Q: Can I use HACS? A: Yes! Install HACS manually following their official documentation.

Q: Will this drain my battery? A: Yes, running HA continuously will use battery. Consider:

  • Keeping device plugged in
  • Using an old phone/tablet as dedicated HA server
  • Disabling battery optimization for Termux

Q: Can I access this remotely? A: Yes, but you'll need to:

  • Set up port forwarding on your router
  • Use Nabu Casa Cloud or a reverse proxy
  • Consider security implications

Q: What integrations work? A: Most integrations work! Some that require special hardware access or system-level features may not work.

📚 Additional Resources

⚖️ License

MIT License - Feel free to modify and distribute

🙏 Credits

Created by: Claude Code (Anthropic AI) - Installer scripts and comprehensive documentation

Based on research from:

⚠️ Disclaimer

This is an unofficial installation method. Home Assistant Core on Termux is not officially supported by the Home Assistant team. Use at your own risk.

🤝 Contributing

Issues and pull requests welcome! This project aims to make Home Assistant accessible on Android devices.

About

Repurpose old android devices by hosting Home Assistant on them.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages