Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
utterances-bot opened this issue Jul 5, 2023 · 10 comments
Open

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

utterances-bot opened this issue Jul 5, 2023 · 10 comments

Comments

@utterances-bot
Copy link

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/

Copy link

t2889 commented Jul 5, 2023

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
Copy link
Owner

illixion commented Jul 5, 2023

@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:

  • If you have a Linux machine on your network, use USB/IP or ser2net to connect the dongle over the network to the Lima VM. Windows also has Serial over IP software options, but I believe most of them are paid;
  • Use Virtualbox in lieu of a physical machine, as it has good support for connecting USB devices to VMs.

Copy link

darcien commented Sep 9, 2023

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:

  • Seems like not all brew installation use /opt/homebrew/bin/<formula> path, mine is on /usr/local/opt/<formula>/bin/<bin_name>, e.g. /usr/local/opt/socket_vmnet/bin/socket_vmnet.
    Using brew info <formula> might help finding the path.
  • My network settings in HA is a blank page by default.
    I had to enable "Advanced Mode" in my HA profile to see the network settings page.

@illixion
Copy link
Owner

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

Copy link

plexcity11 commented Dec 4, 2023

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
Copy link
Owner

illixion commented Dec 5, 2023

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

Copy link

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.

Copy link

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

Copy link

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
Copy link
Owner

illixion commented Jan 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants