Home Assistant in Mac M1

You could just run directly on macOS in a Python virtualenv.

Are you able to run approx 10 docker containers in a python venv? Iā€™ve not tried anything like that, seems strange, but then I wasnā€™t aware you could run docker on dockerā€¦

HA Core runs in a virtual env without Docker. You could still run your other containers in Docker.

Thanks, Iā€™m trying to run HA Supervised so I have a single management interface. I can then also use whole VM snapshots for instant restore around major upgrades if needed.

On a separate point I have noted that I am getting occasional reboots of the M1 box. I essentially run it headless running Plex and HA (and some other bits and pieces), but starting it up using an HDMI connection. I see people complaining of HDMI causing problems on the M1, so Iā€™ve ordered a USB-C to DisplayPort cable, which Iā€™m hoping will solve the problem. I need the server to run stable before I migrate.

FWIW, Iā€™m running HA inside a VM using Oracle Virtualbox on a 2018 Mac mini and it is excellent.

With 4 cores and 4Gb assigned to the VM is really quick and the clone option is a really nice safety net.

From a performance standpoint, it knocks the Rpi with SSD into a cocked hat.

Itā€™s a very easy install too.

This guide is very useful for having the VM auto-restart after a power off.

Agreed. I currently run on a 2013 Mini, I forget the vm spec, but it is using Virtualbox. The M1 is using Parallels because when I set it up virtualbox didnā€™t support M1 (not sure if it does now). I did originally use an RPi, but it was just too slow. That said I do use one for a very small setup I have at a remote location, which links back to my main one. Also use a small pi for monitoring a ups using nut.

Hi @RogTP I just wanted to say what a fantastic guide, I was able to follow this step by step and got my HA migrated from an old Raspberry PI 3 to my Mac mini M1 absolutely perfectly. After following your steps on Parallels 17, being the cheap skate that I am, tried it a 2nd time on UTM and again, worked absolutely no problem. Only downside to UTM over Parallels is lack of automatic starting of the VM on boot (which I donā€™t do often anyway as the Mac stays on 24/7), and also needing to reconnect my USB Z-Wave and Zigbee sticks on boot every time also, other than that its spot on as far as I can tell. Thanks very much!

2 Likes

Good to know that they work. Iā€™ve a z-wave stick, but havenā€™t tried it yet. Been a bit busy, and going away for two weeks, so should get to the migration in mid-december.

@RogTP @tcork: Thanks for the Mac M1 HA trail breaking, your posts kept me at it. Iā€™ve managed to get HA running well on a new M1 Mac-Mini with the bare bones debian-11.1.0-arm64-netinst.iso install on UTM (I guess Iā€™m cheap too) I have usb working with a Nortek HUSBZB-1 Wave/Zigbee radio stick and HA sees it no problem.

Next on My List:
(1)I really want to get the VM to boot in case of a power loss and the Mac restarting
(2) I want the VM to connect to the USB ZWAVE/ZIGBEE stick.

Just wondering if anybody was able to figure out how to do this with UTM, especially item 2)

1 Like

Good guide. I was able to get Home Assistant Supervised working on a Mac Mini M1. Iā€™m coming from an Unraid installation. Everything went pretty smoothly.

I have an Aeotec Z-Stick Gen 5 passed through to the Debian VM. It mostly works, but I have had issues where statuses donā€™t update consistently. Iā€™m not sure if itā€™s a zwavejs2mqtt issue, Z-Wave network issue, or a VM issue. When enabling the debug in zwavejs2mqtt, nothing shows up in the log when the issue occurs.

As far as performance goesā€¦ again, Iā€™m coming from an Unraid setup that had 64GB DDR4 ECC, Intel Xeon 6238T CPU, and the dockers ran from a Samsung 980 Proā€¦ the M1 is stupid fast for Home Assistant. I was having database slowness with the Unraid build that has magically gone away with the M1. Best thing with the change is my power consumption went from around 200W down to 6W and the room where it was running is significantly cooler and quieter.

I still havenā€™t migrated my production install to the M1 yet, itā€™s still running on a nearly 10 year old mini. I did do a trial run of the Aeotec Z-Stick Get 5 on the M1, and it didnā€™t seem to connect to it every time, not quite sure why. But it did start up after a couple of trials, so Iā€™m planning to migrate next week. If I can get it stable and reasonably reliable to start (given I basically only restart that container when there is an update), then Iā€™ll stick with it. Alternatively I can always put the zwavejs2mqtt onto a Pi, so I can decommission the old mini.

I will of course post back here, and Iā€™ll comment on whether the ZWave reports reliably.

It did not want to work correctly through a hub, which is rough because the Mac Mini is so IO limited.

Iā€™m just plugging straight in and passing through with parallels to the vm.

Hi :slight_smile:
First, I want to thank @RogTP for the incredible work that youā€™ve done in spearheading the installation of Home Assistant on an M1 Mac Mini.

I have a Aeotec Z-Stick Gen 5 and I wasnā€™t able to make it work. Itā€™s plugged in directly to the back on the Mac and I can see it find in the VM when running ā€œslushā€ and even on Home Assistant. I also have the option to select it in the Z-Wave JS Integration (Using the /dev/serial/by-id/usb-0658_0200-if00 path, as this is how my stick is listed), although, when I start the integration, hereā€™s what I see :


I just canā€™t seem to get it to work. Iā€™ve looked only and I swear I donā€™t have 2 instances of Z-Wave running or any other integration using the stickā€¦
Any ideas?

This is the unreliability of startup I get. If I restart the addon a couple of times, it will eventually start up ok.

I tried my Aeotec stick again today in the M1, and it connected just fine. Maybe the issues were solved by the recent zwave2mqtt update.

So, Iā€™ve done the migration. To be honest it went really well and took much less time than I thought it would. Previous migrations have needed a tidy up, whilst this one just required a restore, firewall change and NGINX change. Job done.

Iā€™ll let you know if I come across any issues down the line.

Thanks for the information! I wasnā€™t able to get it to work :frowning: It looks like youā€™re using zwave2mqtt, is there anything specific that I should be doing?

I just prefer to use zwavejs2mqtt instead of whatever the other addon is because it has a control panel so you can manage the zwave network.

I donā€™t enable the mqtt part though, because the standard HA zwave integration can talk to the web socket provided by the addon.

There was a new version a few days ago, not sure if that fixed it, but seems to be connecting ok.

I was able to install on an M1 Mac running UTM using these instructions. Thank You!

Hi,

Can some of you post performance numbers, for example :

  • Parallels or UTM
  • Debian VM or VirtualEnv
  • CPU Load averages 1m 5m 15m
  • Number of Addons
  • Number of integrations
  • Startup time
  • Core restart time

Just to get an idea how an M1 is performing.

Thanks

V.