Guide macOS M1 and Home Assistant including ZWave

Agree, I just changed it. Thanks for the suggestion.

@JoshuaHolmes, hopefully you saw this too.
This was something I ended up having to figure out as part of my googling. Sorry I forgot to mention this.

Does anyone else run into the issue where after an update it refuses to run? Maybe I am not updating correctly or something? Is there a place to see a start up log? This has become an every time I update HA it refuses to start up.

Please correct me if I’m being stupid but to update I always run

pip3 install virtualenv
cd ~/
python3 -m venv homeassistant
source homeassistant/bin/activate
pip3 install homeassistant
deactivate

When I first started using this, this was an okay way of doing the updates but now I spend multiple hours trying to get it back up and running about once a month.

I really appreciate any help.

Personally, I usually delete the installation (make sure your config is outside or backed up).

Since 2022.8, there is a bug in the requirements of HA.

You need to add pip3 install sqlalchemy fnvhash until they fix this.

launchctl unload /Users/server/Library/LaunchAgents/org.homeassistant.plist
rm -rf /Users/server/Steuerung/homeassistant

cd /Users/server/Steuerung
python3 -m venv homeassistant
source /Users/server/Steuerung/homeassistant/bin/activate

pip3 install --upgrade pip
pip3 install homeassistant
pip3 install sqlalchemy fnvhash

deactivate

launchctl load /Users/server/Library/LaunchAgents/org.homeassistant.plist

In your case this should be sufficient:

launchctl unload ~/Library/LaunchAgents/org.homeassistant.plist
cd ~/
source homeassistant/bin/activate
pip3 install --upgrade pip
pip3 install homeassistant
pip3 install sqlalchemy fnvhash
deactivate
launchctl load ~/Library/LaunchAgents/org.homeassistant.plist

Always back up before doing this.

1 Like

I ended up resolving it exactly that way. Thank you so much for the help! Just curious, I also haven’t gotten Bluetooth to work yet with the new version. Is there something that needs to be done? I haven’t looked into it much yet to be honest.

Not sure as I am not using it. But I guess it should be working as Apple is using a standard Bluetooth interface.

I am able to get bluetooth to work if I manually start it from the terminal (it is giving terminal permission to use bluetooth). Do you know what I should be giving bluetooth permissions? I tried .homeassistant and ha_agent.sh. I couldn’t grant org.homeassistant.plist access though.

Most likely you should give permission for this:

…homeassistant/bin/hass

Let us know if it works.

Unfortunately that didn’t work. I had even tried giving permission to everything in homeassistant/bin individually and still nothing. Im not sure if Macs Bluetooth permissions are recursive or not but I also tried giving permission to homeassistant folder and .homeassistant folder with still no luck.

Any other ideas? Or should I just get a usb bluetooth dongle to add this in?

Sorry, I have no experience with Bluetooth in HA.
But it might be worth a try. Although I find it weird that it doesn’t work out of the box.

Hopefully someone has more insight on this.

1 Like

I will continue messing with it. If I find the solution I will post.

Not sure what the issue was, updated my Mac to Ventura today and now it properly asked for bluetooth permissions.

Cool, thanks for reporting.

Couple things to note about 2022.11.0 (I also experienced this with 2022.10.5) and MacOS 13. From what I gathered there seems to be an issue when updating HA. I was getting the error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

This was resolved by just downloading Xcode on my Mac. Dumb but whatever.

After the update finished I ran into another issue, HA wouldn’t start and got this error from my home-assistant.log file:

Unable to load auth provider homeassistant: cannot import name '_bcrypt' from partially initialized module 'bcrypt' (most likely due to a circular import) (/Users/server/homeassistant/lib/python3.10/site-packages/bcrypt/__init__.py)

I was able to resolve this by using the bcrypt file from my homeassistant_old file. Not sure if this was the right move but my HA is up and running so I don’t care :laughing:

I’m not sure how common these errors will be but I figured I would post here on the off chance someone else has these issues.

1 Like

That’s look great thanks.

Does this version support the add-on ? (I assume you need to use docker instead?) I’m just worried about the migration
I’m also conscious with Z-Wave JS, I had to pair everything again a week ago when I migrated to UTM.

Also can you setup this with a standard user on MacOS or does it required admin account ?

Not sure what you mean by add-on, but you can install custom components. If you mean ZHA, yes that works.

I am not using Docker since there is no USB support on macOS.

Not sure about running as standard user.

1 Like

I had a weird issue that made HomeKit and other internet based services become unavailable after a restart of the Mac or the internet router.

This is fixed (for now) by adding a delay in the startup routine:

Add sleep 60 to:
~/.homeassistant/scripts/ha_agent.sh

#!/bin/bash
sleep 60
source /Users/server/homeassistant/bin/activate
/Users/server/homeassistant/bin/hass

Not sure why, but it works. :slight_smile:

If you don’t need that fix, you can remove this line.

This looks like the ideal solution for me but it has been some time since the last post. Is this method still working over recent HA and MacOS updates?

Yes, should still work.