Skip to content

Instantly share code, notes, and snippets.

@adapowers
Last active June 19, 2023 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adapowers/4797c36d2c77d80c2fc4dd50df695ca2 to your computer and use it in GitHub Desktop.
Save adapowers/4797c36d2c77d80c2fc4dd50df695ca2 to your computer and use it in GitHub Desktop.
Home Assistant on M1 Mac

Prerequisites

Homebrew

Install and load into zsh

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/server/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

(I'm using zsh, you'll get different instructions for bash or other terms)

MiniConda

Install

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh
chmod +x ./Miniconda3-latest-MacOSX-arm64.sh
./Miniconda3-latest-MacOSX-arm64.sh

If it fails, run it again with update flag:

./Miniconda3-latest-MacOSX-arm64.sh -u

Update base system

conda update -n base conda

Cleanup

rm ./Miniconda3-latest-MacOSX-arm64.sh

Create and activate Python environment

conda create --name hass
conda activate hass

HomeAssistant

Install HomeAssistant via pip

Original instructions involved conda-forge, but there were weird errors, and I went with pip3 instead: https://stackoverflow.com/questions/56895109/how-to-fix-unsatisfiableerror-the-following-specifications-were-found-to-be-in

pip3 install homeassistant

Install HomeAssistant dependencies

No idea why they didn't get installed; you can look at ~/Library/logs/homeassistant.log to see what might be holding up your own installation

  • aiohttp_cors is necessary to get HA to start
  • PyNaCl is necessary to use the HA mobile app and other default integrations
pip3 install aiohttp_cors
pip3 install pynacl

Install HACS

wget -O - https://get.hacs.xyz | bash -

Start HomeAssistant and load as service

hass --script macos install

This will create ~/Library/LaunchAgents/org.homeassistant.plist.

Open HomeAssistant

Navigate to: http://localhost:8123

And you should be good!

Troubleshooting

  1. Check the logs (~/Library/logs/homeassistant.log)
  2. Install anything else you might need through brew or pip3
  3. Restart the service with:
launchctl unload ~/Library/LaunchAgents/org.homeassistant.plist
launchctl load org.homeassistant.plist

Resource guides

https://community.home-assistant.io/t/guide-macos-m1-and-home-assistant-including-zwave/398183 https://www.vanderlaanscience.nl/posts/home-assistant-core-on-mac-m1-ventura

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment