Skip to content

Setup Home Assistant Supervised (with Supervisor) on MacOS with Lima.

License

Notifications You must be signed in to change notification settings

maxarndt/homeassistant-lima

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Home Assistant Lima Setup

This repository can be used to setup Home Assistant Supervised with Lima VMs on MacOS. The Home Assistant Supervisor allows to use Home Assistant Add-ons and some other features, see docs. With this you can do extensive testing of Home Assistant without needing additional hardware.

Getting started

This was tested successfully on a MacBook M1.

Install Lima

brew install lima

Create Debian VM

The lima_homeassistant.yaml Lima template reflects the requirements specified in the Home Assistant Supervised requirements but still contains lots of default values. You can use it as it or adjust it to your specific needs.

limactl create --name homeassistant https://raw.githubusercontent.com/maxarndt/homeassistant-lima/main/lima_homeassistant.yaml
# OR ALTERNATIVELY after cloning this repository locally
limactl create --name homeassistant lima_homeassistant.yaml

Start the VM

limactl start homeassistant

Install Home Assistant Supervised

limactl shell homeassistant
sudo su -

Follow Step 1, Step 3 and Step 4 of the Home Assistant supervised-installer guide. You can skip Step 2 because Docker is already included in your Lima VM.

Help for `Step 3`: At the time of writing these docs the latest version was `1.6.0`:
cd /tmp
wget https://github.com/home-assistant/os-agent/releases/download/1.6.0/os-agent_1.6.0_linux_aarch64.deb
dpkg -i os-agent_1.6.0_linux_aarch64.deb
Help for `Step 4`: Select `qemuarm-64` if the configuration UI appears in your terminal.

Make sure to restart your Lima VM

This is currently needed to apply cgroup related changes to grub.

systemctl poweroff
# wait a second until machine is down and restart via limactl
limactl start homeassistant

Once your Lima VM is up and running again, you might want to start again a shell session and if needed switch the user.

limactl shell homeassistant
sudo su -

Open Home Assistant UI in your browser

Open http://localhost:8123 in your browser. It may take some time until all Home Assistant containers are up and running.

Troubleshoot

journalctl -f

Execute this inside your Lima VM to watch the logs of your Home Assistant setup.

Known issues

  1. WARNING (MainThread) [supervisor.jobs] 'BackupManager.do_restore_partial' blocked from execution, system is not healthy - privileged -> Solved by restarting the VM with limactl stop homeassistant followed by limactl start homeassistant on the host machine.
  2. WARNING (MainThread) [supervisor.jobs] 'BackupManager.do_restore_partial' blocked from execution, no host internet connection -> Solved by executing ha network reload inside the VM.

About

Setup Home Assistant Supervised (with Supervisor) on MacOS with Lima.

Topics

Resources

License

Stars

Watchers

Forks