Home Assistant Voice Preview is an unusable mess.

Shawn Wang

Home Assistant Voice Preview는 도저히 쓸 수 없는 엉망진창이다

원문은 Shawn Wang님이 에 게재했습니다. 이 블로그 구독하기

최근 Home Assistant Voice를 하나 장만했다. 프로그래밍 가능한 Alexa라고 생각하니 정말 기대됐다.

첫 번째 문제 - HA Voice는 단독으로 동작하지 않는다. 별도의 Home Assistant 인스턴스가 필요하다.

이미지

좋아, 문제없다. 나름 기술적인 사람이니 해결할 수 있다. HA 설치 안내로 향했다.

Home Assistant 문제점

가장 먼저 하는 게 Home Assistant Green을 사라는 거다. 뭐, 이해한다. 관심은 없지만 돈은 벌어야지.

이미지

참고로 지금 구매 버튼이 작동 안 하는데 한번 확인해 보는 게 좋을 거다.

이미지

라즈베리 파이가 배송될 때까지 기다리고 싶진 않아서 계속 스크롤을 내렸다. 굴러다니는 맥이 4대 정도 있는데 그중 하나를 쓸 수 있을까? 오, 맥 가이드가 있네!

이미지

Mac에서 Home Assistant

Mac 페이지.

가장 먼저 하라는 게 “적절한 이미지”를 다운로드하라는 것이다. 왜 이게 Docker 이미지가 아닌 거지? 아니면 마운트할 수 있는 그런 거? 대신 VM 관련 헛소리가 필요하다고? 씨발, 나중에 알아보기로 했다. (나중에 알고 보니 VirtualBox는 특정 유형의 VM 하이퍼바이저였는데, 그땐 몰랐다. VirtualBox 다운로드 방법이라도 좀 적어두지...)

이미지

오픈소스잖아? 그냥 소스에서 바로 실행하면 안 되나? Home Assistant Core라는 다른 에디션이 있는 것 같다. 좋다.

이미지

흠. 최신 맥에는 apt-get이 없다.

이미지

괜찮다, brew를 쓰자. 설치는 된다. 좋다.

다음 단계: 계정 만들기.

이미지

뭔 개소리야? 이거 리눅스 가이드 아냐? 맥용으로 커스터마이징한 사람은 아무도 없나?

사실 이거 전부 리눅스 용어 투성이다.

이미지

다 집어치워.

다음으로 이걸 시도해 봤다: uv가 설치되어 있다고 가정하면:

# be in some folder you like
uv venv
uv pip install homeassistant==2025.1.2 --prerelease=allow
uv run hass
처음에 이걸 빌드하다가 문제가 생겼다. 알고 보니 "sudo softwareupdate --install "Command Line Tools for Xcode-16.2""를 실행해야 한단다, 그렇지 않으면 이런 에러가 난다
Unable to find configuration. Creating default one in /Users/shawnwang/.homeassistant
2025-01-19 16:33:27.267 WARNING (MainThread) [aiohttp_fast_zlib] zlib_ng and isal are not available, falling back to zlib, performance will be degraded.
2025-01-19 16:33:36.677 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package pyspeex-noise==1.0.2: × Failed to download and build `pyspeex-noise==1.0.2`
  ╰─▶ Build backend failed to build wheel through `build_wheel` (exit status: 1)
      [stdout]
      running bdist_wheel
      running build
      running build_py
      building 'speex_noise_cpp' extension
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 ...
      [stderr]
      /Users/shawnwang/.cache/uv/sdists-v6/pypi/pyspeex-noise/1.0.2/OiKAa5C3V4L1j77Pq6j5d/src/speex/preprocess.cc:921:14: warning: code will never be executed [-Wunreachable-code]
      Compiling with an SDK that doesn't seem to exist: /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk
      Please check your Xcode installation
      clang++: warning: no such sysroot directory: '/Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk'
      ld: library 'c++' not found
      clang++: error: linker command failed with exit code 1
      error: command '/usr/bin/clang++' failed with exit code 1
2025-01-19 16:34:07.135 ERROR (MainThread) [homeassistant.setup] Setup failed for 'cloud': Requirements for assist_pipeline not found: ['pyspeex-noise==1.0.2'].
2025-01-19 16:34:19.493 ERROR (MainThread) [homeassistant.setup] Error during setup of component conversation
Traceback (most recent call last):
  File "/Users/shawnwang/Desktop/Work/homeassistant/.venv/lib/python3.12/site-packages/homeassistant/setup.py", line 416, in _async_setup_component
    result = await task
  File "/Users/shawnwang/Desktop/Work/homeassistant/.venv/lib/python3.12/site-packages/homeassistant/components/conversation/__init__.py", line 246, in async_setup
    from homeassistant.components.assist_pipeline import (  # pylint: disable=import-outside-toplevel
  File "/Users/shawnwang/Desktop/Work/homeassistant/.venv/lib/python3.12/site-packages/homeassistant/components/assist_pipeline/pipeline.py", line 55, in <module>
    from .audio_enhancer import AudioEnhancer, EnhancedAudioChunk, MicroVadSpeexEnhancer
  File "/Users/shawnwang/Desktop/Work/homeassistant/.venv/lib/python3.12/site-packages/homeassistant/components/assist_pipeline/audio_enhancer.py", line 8, in <module>
    from pyspeex_noise import AudioProcessor
ModuleNotFoundError: No module named 'pyspeex_noise'
2025-01-19 16:34:19.497 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'assist_pipeline'. Setup failed for dependencies: ['conversation']
2025-01-19 16:34:19.497 ERROR (MainThread) [homeassistant.setup] Setup failed for 'assist_pipeline': Could not setup dependencies: conversation
2025-01-19 16:34:19.886 ERROR (MainThread) [homeassistant.setup] Setup failed for 'mobile_app': Requirements for assist_pipeline not found: ['pyspeex-noise==1.0.2'].
2025-01-19 16:34:19.886 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'default_config'. Setup failed for dependencies: ['assist_pipeline', 'cloud', 'conversation', 'mobile_app']
2025-01-19 16:34:19.886 ERROR (MainThread) [homeassistant.setup] Setup failed for 'default_config': Could not setup dependencies: assist_pipeline, cloud, conversation, mobile_app
2025-01-19 16:34:19.887 WARNING (MainThread) [homeassistant.bootstrap] Support for the running Python version 3.12.7 is deprecated and will be removed in Home Assistant 2025.2; Please upgrade Python to 3.13

이걸로 꽤 멀리 가긴 했다. 하지만 HA에 들어가는 뭔가 의존성 때문에 더 이상 진행할 수 없었다:

이미지

그래서 거기서 멈췄다. 로컬 설치가 늘 그렇듯 막다른 골목에 다다랐으니 이제 다시 VM 방식으로 돌아가기로 했다 (원칙상 쓰레기 같은 Xcode는 절대 설치할 생각이 없다).

Oracle VirtualBox

오라클 소유의 무언가를 쓰면서 기분 좋을 사람은 아무도 없다. VirtualBox를 설치하고 아까 다운로드한 .vdi 파일을 더블클릭해도.... 아무 일도 일어나지 않는다

이미지

물론 HA 페이지에 있는 설명은

이미지

VirtualBox 설정 페이지와는 아무런 관련이 없다

이미지

구글링을 해서야 vdi 파일을 로드하는 곳이 여기라는 걸 알았다

이미지

이미지

네트워크 옵션도 필요하다

이미지

그러고 나면 실행된다 (화면 제어/권한 설정을 위한 삽질을 마친 뒤에):

이미지

하지만 http://homeassistant.local:8123/에 접속해도 아무 반응이 없다. 전원을 끄려고 하니... 당연히 비치볼이 뜬다.

이미지

재시작.

어쨌든 기본 vdi에는 잘 알려진 버그들이 포함된 것 같은데, 게다가 지금은 로드해야 할 \EFI\BOOT\BOOTx64.efi 파일 자체가 아예 빠져 있다. 여기서 다운로드할 수 있는 파일을 찾았고, 공유 폴더를 통해 VM으로 가져올 수 있다는 걸 알게 됐다.

이미지

이걸로 좀 진전이 있었다...

이미지

하지만 여전히 막다른 길이었다.

조금 더 구글링해서 이걸 찾았다: https://community.home-assistant.io/t/unable-to-boot-home-assistant-in-virtual-machine-starup-nsh-error/220267/27?page=2

이미지

Docker로 Home Assistant

우연히 본 댓글 덕분에 이딴 걸 위한 Docker 컨테이너가 리눅스 문서 어딘가에 묻혀 있다는 걸 알게 됐고, 그래서 시도해 봤다..

이미지

이건 드디어 된다!!

이미지

모바일 앱을 HA 서버에 연결하기.

https://voice-pe.home-assistant.io/getting-started/ 에 따르면 HA Voice를 찾으려면 모바일 앱을 사용해야 한단다.

물론 그냥 네트워킹이 알아서 되길 기대하는데, 당연히 좆같이 안 된다

이미지

물론 여기서 Nabu Cloud를 팔아먹는다.

이미지

ngrok으로 터널을 만들어 봤지만 400 Bad Request 에러만 잔뜩 떴다. 결국 Nabu Cloud에 가입했지만, 전혀 기분이 좋지 않다. 오히려 이 모든 걸 집어 던져 불태워 버리고 싶은 마음이 더 든다.

이미지

원격 액세스가 활성화될 때까지 기다린 다음 링크(그래, 그 UI 링크)를 휴대폰에 복사한다

이미지

성공하면 이렇게 떠야 한다

이미지

이제 음성 차례

다시 https://voice-pe.home-assistant.io/getting-started/ 로 돌아가서

다행히 이건 광고한 대로 작동했다.

이미지

“authorization”을 요청하면 그냥 사진처럼 버튼을 누르라는 뜻이다

이미지

그때 이런 문제를 만난다 https://github.com/esphome/home-assistant-voice-pe/issues/265

좆됐다.

하지만 실패였다. 기기의 WLAN IP를 입력해야 한다. 포트를 따로 지정하지 않았다면 기기의 포트는 자동으로 6052가 된다.

Vibhu에게 부탁해 라우터 로그를 뒤져 연결된 HA Voice 기기의 IP를 확인했다. 192.168.x.x IP에 포트는 6053이었다 (댓글 작성자가 말한 6052가 아니었다). ESPHome에 그걸 입력하니 두 번째 시도에 됐다.

그리고 설정 마법사를 진행했는데... 물론 여기서 내 문제가 끝날 리가 없었다.

https://community.home-assistant.io/t/home-assistant-voice-pe-the-voice-assistant-is-unable-to-connect-to-home-assistant/821049

https://github.com/esphome/home-assistant-voice-pe/issues/288

이 설명이 가장 직접적으로 관련 있어 보였다 https://community.home-assistant.io/t/home-assistant-voice-pe-tls-certificate-verification-failed/815768/3

한 시간 정도 시도하다가 포기했다.

이 글은 muse-spark-1.2-contributor 모델을 사용해 번역했습니다.

댓글