illixion / blog.illixion.com

0 stars 0 forks source link

2023/04/colima-home-assistant/ #7

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Home Assistant on M1 Macs, the proper way - Ixion's blog

How to set up Home Assistant on M1 Macs using Colima and Docker containers, without breaking discovery

https://blog.illixion.com/2023/04/colima-home-assistant/

t2889 commented 1 year ago

This guide is great, got it set up without any issues.

Can I pass through a USB device to the container, such as a Conbee or Aeotec ZWave stick? This isn't possible with Docker Desktop on Macs. The Colima documentation doesn't mention USB support, but QEMU docs suggest it's possible.

illixion commented 1 year ago

@t2889 Thanks!

Can I pass through a USB device to the container, such as a Conbee or Aeotec ZWave stick? This isn't possible with Docker Desktop on Macs. The Colima documentation doesn't mention USB support, but QEMU docs suggest it's possible.

This is theoretically possible [1] [2], but it's not a built-in feature and I believe also requires root access. A few alternative solution that I could think of:

darcien commented 10 months ago

Thank you for writing this up! I successfully set up AirGradient + this using old MacBook thanks to this post.

I found 2 things while following the steps:

illixion commented 8 months ago

Glad to hear this worked for you @darcien, and thank you for the corrections, I've updated the article

plexcity11 commented 7 months ago

I'm stuck.

~/.lima/_config/networks.yaml : I can't find this location on my mac after doing all the steps outlined above it. Instead I see: ~/.colima/_lima/_config/networks.yaml.

Is this the same thing? When I open that file, I do not see any options or preset configuration for "paths:".

Instead I see:

# DO NOT EDIT!
# This file would be replaced by Colima on startup.

networks:
  user-v2:
    mode: user-v2
    gateway: 192.168.X.X
    netmask: 255.255.255.0

Please advise.

illixion commented 7 months ago

@plexcity11 Forgot to mention that if the files or folders don’t exist, you need to create them first

plexcity11 commented 7 months ago

Solved the above. I was doing research and found that this folder "~/.lima/_config/" is created AFTER running the terminal command "limactl start". It kicked off a bunch of processes that created this folder and now I can see what you have outlined above. For some reason, following your steps did not create this folder. Not sure why. Running Apple M1 Pro on Ventura 13.2.1. I am now able to move forward.

heijligers commented 6 months ago

I don't see any ip in the adress field.. colima -v list PROFILE STATUS ARCH CPUS MEMORY DISK RUNTIME ADDRESS default Running aarch64 2 2GiB 15GiB docker

kelvinlkh commented 6 months ago

Thanks for guidance and I found that there's no address after following all the steps..I tried to verify any step missed but seems all are fine. And I could access the HA portal using my current Mac mini address with port 8123. But however in the network page, the lima0 adapter going missing and I can't discover the devices yet.

% colima list PROFILE STATUS ARCH CPUS MEMORY DISK RUNTIME ADDRESS default Running aarch64 2 2GiB 60GiB docker

illixion commented 6 months ago

I believe you should be able to access it by using http://homeassistant.local:8123 as the URL, due to using bridged networking it doesn't show up in colima list. Alternatively, you can also check the DHCP lease list on your router if the link doesn't work.

Also, if anyone is interested in connecting a USB serial dongle to Home Assistant, I've since discovered that ser2net works on macOS, so it can be configured with the help of this guide and this ser2net configuration:

connection: &con01
    accepter: tcp,20108
    enable: on
    options:
        kickolduser: true
    connector: serialdev(nouucplock),/dev/tty.usbmodem1201,115200n81,local