🏠

Home Assistantを使ってみる
March 23, 2025July 07, 2025
#Home Assistant#Develop

自宅の IoT 機器の操作や状態を確認するときにアプリで分断されており使いづらいため、 HomeAssistant というツールで統合できそうなので試してみた。

Home Assistant で気に入ったところ

  • 自宅に設置できる
  • OSS でありインテグレーションの開発が盛ん
  • ダッシュボード機能がある

Home Assistant を Incus で構築する

環境

  • Host Ubuntu24.04
  • Incus6.8
  • コンテナ OS Ubuntu24.04

サーバー構築

incus create images:ubuntu/24.04 homeassistant
incus start homeassistant
incus exec homeassistant -- bash
incus config device add homeassistant hass proxy listen=tcp:0.0.0.0:8123 connect=tcp:127.0.0.1:8123

サービス構築

Linux

Install Home Assistant on a Linux

Home Assistant

Linux
apt update
apt upgrade
apt install python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff6 libturbojpeg0-dev tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev
useradd -rm homeassistant
mkdir /srv/homeassistant
chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s
cd /srv/homeassistant
python3 -m venv .
source bin/activate
python3 -m pip install wheel
pip3 install homeassistant==2025.3.4
ERROR: Ignored the following versions that require a different python version: 2025.2.0 Requires-Python >=3.13.0; 2025.2.0b0 Requires-Python >=3.13.0; 2025.2.0b1 Requires-Python >=3.13.0; 2025.2.0b10 Requires-Python >=3.13.0; 2025.2.0b11 Requires-Python >=3.13.0; 2025.2.0b12 Requires-Python >=3.13.0; 2025.2.0b2 Requires-Python >=3.13.0; 2025.2.0b3 Requires-Python >=3.13.0; 2025.2.0b4 Requires-Python >=3.13.0; 2025.2.0b5 Requires-Python >=3.13.0; 2025.2.0b6 Requires-Python >=3.13.0; 2025.2.0b7 Requires-Python >=3.13.0; 2025.2.0b8 Requires-Python >=3.13.0; 2025.2.0b9 Requires-Python >=3.13.0; 2025.2.1 Requires-Python >=3.13.0; 2025.2.2 Requires-Python >=3.13.0; 2025.2.3 Requires-Python >=3.13.0; 2025.2.4 Requires-Python >=3.13.0; 2025.2.5 Requires-Python >=3.13.0; 2025.3.0 Requires-Python >=3.13.0; 2025.3.0b0 Requires-Python >=3.13.0; 2025.3.0b1 Requires-Python >=3.13.0; 2025.3.0b2 Requires-Python >=3.13.0; 2025.3.0b3 Requires-Python >=3.13.0; 2025.3.0b4 Requires-Python >=3.13.0; 2025.3.0b5 Requires-Python >=3.13.0; 2025.3.0b6 Requires-Python >=3.13.0; 2025.3.0b7 Requires-Python >=3.13.0; 2025.3.0b8 Requires-Python >=3.13.0; 2025.3.1 Requires-Python >=3.13.0; 2025.3.2 Requires-Python >=3.13.0; 2025.3.3 Requires-Python >=3.13.0; 2025.3.4 Requires-Python >=3.13.0; 2025.4.0b0 Requires-Python >=3.13.0; 2025.4.0b1 Requires-Python >=3.13.0; 2025.4.0b2 Requires-Python >=3.13.0; 2025.4.0b3 Requires-Python >=3.13.0; 2025.4.0b4 Requires-Python >=3.13.0; 2025.4.0b5 Requires-Python >=3.13.0
ERROR: Could not find a version that satisfies the requirement homeassistant==2025.3.4 (from versions: 0.7.0rc1, 0.7.0, 0.7.0.1, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.18.2, 0.19, 0.19.1, 0.19.2, 0.19.3, 0.19.4, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.21.2, 0.22.0, 0.22.1, 0.23.0, 0.23.1, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.26.1, 0.26.2, 0.26.3, 0.27.0, 0.27.1, 0.27.2, 0.28.0, 0.28.1, 0.28.2, 0.29.0, 0.29.1, 0.29.2, 0.29.3, 0.29.4, 0.29.5, 0.29.6, 0.29.7, 0.30.0, 0.30.1, 0.30.2, 0.31.0, 0.31.1, 0.32.0, 0.32.1, 0.32.2, 0.32.3, 0.32.4, 0.33.0, 0.33.1, 0.33.2, 0.33.3, 0.33.4, 0.34.0, 0.34.1, 0.34.2, 0.34.3, 0.34.4, 0.34.5, 0.35.0, 0.35.1, 0.35.2, 0.35.3, 0.36.0, 0.36.1, 0.37.0, 0.37.1, 0.38.0, 0.38.1, 0.38.2, 0.38.3, 0.38.4, 0.39.0, 0.39.1, 0.39.2, 0.39.3, 0.40.0, 0.40.1, 0.40.2, 0.41.0, 0.42.0, 0.42.1, 0.42.2, 0.42.3, 0.42.4, 0.43.0, 0.43.1, 0.43.2, 0.44.0, 0.44.1, 0.45.0, 0.45.1, 0.46.0, 0.46.1, 0.47.0, 0.47.1, 0.48.0, 0.48.1, 0.49.0, 0.49.1, 0.50.1, 0.50.2, 0.51.0, 0.51.1, 0.51.2, 0.52.0, 0.52.1, 0.53.0, 0.53.1, 0.54.0, 0.55.0, 0.55.1, 0.56.0, 0.56.1, 0.56.2, 0.57.0, 0.57.1, 0.57.2, 0.57.3, 0.58.0, 0.58.1, 0.59.0, 0.59.1, 0.59.2, 0.60.0, 0.60.1, 0.61.0, 0.61.1, 0.62.0, 0.62.1, 0.63.0, 0.63.1, 0.63.2, 0.63.3, 0.64.0, 0.64.1, 0.64.2, 0.64.3, 0.64.4b0, 0.65.0, 0.65.1, 0.65.2, 0.65.3, 0.65.4, 0.65.5, 0.65.6, 0.66.0b0, 0.66.0b1, 0.66.0b2, 0.66.0b3, 0.66.0, 0.66.1b0, 0.66.1, 0.67.0b0, 0.67.0b1, 0.67.0, 0.67.1, 0.68.0b0, 0.68.0b1, 0.68.0b2, 0.68.0, 0.68.1, 0.69.0b0, 0.69.0, 0.69.1, 0.70.0b0, 0.70.0b1, 0.70.0b2, 0.70.0b3, 0.70.0b4, 0.70.0b5, 0.70.0b6, 0.70.0b7, 0.70.0, 0.70.1, 0.71.0b0, 0.71.0, 0.72.0b0, 0.72.0b1, 0.72.0b2, 0.72.0b4, 0.72.0b5, 0.72.0b6, 0.72.0b7, 0.72.0b8, 0.72.0b9, 0.72.0, 0.72.1, 0.73.0b0, 0.73.0b1, 0.73.0b2, 0.73.0b3, 0.73.0b4, 0.73.0b5, 0.73.0b6, 0.73.0, 0.73.1, 0.73.2, 0.74.0b0, 0.74.0b2, 0.74.0b3, 0.74.0b4, 0.74.0, 0.74.1, 0.74.2, 0.75.0b0, 0.75.0b1, 0.75.0, 0.75.1, 0.75.2, 0.75.3, 0.76.0b0, 0.76.0b1, 0.76.0b2, 0.76.0b3, 0.76.0b4, 0.76.0b5, 0.76.0, 0.76.1, 0.76.2, 0.77.0b0, 0.77.0b1, 0.77.0b2, 0.77.0b3, 0.77.0b4, 0.77.0, 0.77.1, 0.77.2, 0.77.3, 0.78.0b0, 0.78.0b1, 0.78.0b2, 0.78.0b3, 0.78.0, 0.78.1, 0.78.2, 0.78.3, 0.79.0b0, 0.79.0b1, 0.79.0b2, 0.79.0b3, 0.79.0, 0.79.1, 0.79.2, 0.79.3, 0.80.0b0, 0.80.0b1, 0.80.0b2, 0.80.0b3, 0.80.0b4, 0.80.0b5, 0.80.0, 0.80.1, 0.80.2, 0.80.3, 0.81.0b0, 0.81.0b1, 0.81.0b2, 0.81.0, 0.81.1, 0.81.2, 0.81.3, 0.81.4, 0.81.5, 0.81.6, 0.82.0b0, 0.82.0b1, 0.82.0b2, 0.82.0b3, 0.82.0b4, 0.82.0, 0.82.1, 0.83.0b0, 0.83.0b1, 0.83.0b3, 0.83.0, 0.83.1, 0.83.2, 0.83.3, 0.84.0b0, 0.84.0b1, 0.84.0b2, 0.84.0b3, 0.84.0b4, 0.84.0, 0.84.1, 0.84.2, 0.84.3, 0.84.4, 0.84.5, 0.84.6, 0.85.0b0, 0.85.0b1, 0.85.0, 0.85.1, 0.86.0b0, 0.86.0b1, 0.86.0b2, 0.86.0b3, 0.86.0, 0.86.1, 0.86.2, 0.86.3, 0.86.4, 0.87.0b0, 0.87.0b1, 0.87.0b2, 0.87.0b3, 0.87.0b4, 0.87.0b5, 0.87.0b6, 0.87.0, 0.87.1, 0.88.0b0, 0.88.0b1, 0.88.0b2, 0.88.0b3, 0.88.0b4, 0.88.0, 0.88.1, 0.88.2, 0.89.0b0, 0.89.0b1, 0.89.0b2, 0.89.0b3, 0.89.0, 0.89.1, 0.89.2, 0.90.0b0, 0.90.0b1, 0.90.0b2, 0.90.0b3, 0.90.0b4, 0.90.0b5, 0.90.0b6, 0.90.0b7, 0.90.0, 0.90.1, 0.90.2, 0.91.0b0, 0.91.0b1, 0.91.0b2, 0.91.0b3, 0.91.0b4, 0.91.0b5, 0.91.0, 0.91.1, 0.91.2, 0.91.3, 0.91.4, 0.92.0b0, 0.92.0b1, 0.92.0b2, 0.92.0b3, 0.92.0, 0.92.1, 0.92.2, 0.93.0b0, 0.93.0b1, 0.93.0b2, 0.93.0b4, 0.93.0, 0.93.1, 0.93.2, 0.94.0b0, 0.94.0b1, 0.94.0b2, 0.94.0b3, 0.94.0b4, 0.94.0b5, 0.94.0b6, 0.94.0b7, 0.94.0b8, 0.94.0, 0.94.1, 0.94.2, 0.94.3, 0.94.4, 0.95.0b0, 0.95.0b1, 0.95.0b2, 0.95.0b3, 0.95.0b4, 0.95.0, 0.95.1, 0.95.2, 0.95.3, 0.95.4, 0.96.0b0, 0.96.0b1, 0.96.0b2, 0.96.0b3, 0.96.0b4, 0.96.0, 0.96.1, 0.96.2, 0.96.3, 0.96.4, 0.96.5, 0.97.0b0, 0.97.0b1, 0.97.0b2, 0.97.0b3, 0.97.0, 0.97.1, 0.97.2, 0.98.0b0, 0.98.0b1, 0.98.0b2, 0.98.0, 0.98.1, 0.98.2, 0.98.3, 0.98.4, 0.98.5, 0.99.0b0, 0.99.0b1, 0.99.0b2, 0.99.0b3, 0.99.0b4, 0.99.0, 0.99.1, 0.99.2, 0.99.3, 0.100.0b0, 0.100.0b1, 0.100.0b2, 0.100.0b3, 0.100.0, 0.100.1, 0.100.2, 0.100.3, 0.101.0b0, 0.101.0b1, 0.101.0b2, 0.101.0b3, 0.101.0b4, 0.101.0, 0.101.1, 0.101.2, 0.101.3, 0.102.0b0, 0.102.0b1, 0.102.0b2, 0.102.0b3, 0.102.0, 0.102.1, 0.102.2, 0.102.3, 0.103.0b0, 0.103.0b1, 0.103.0, 0.103.1, 0.103.2, 0.103.3, 0.103.4, 0.103.5, 0.103.6, 0.104.0b0, 0.104.0b1, 0.104.0b2, 0.104.0b3, 0.104.0b4, 0.104.0b5, 0.104.0, 0.104.1, 0.104.2, 0.104.3, 0.105.0b0, 0.105.0b5, 0.105.0b6, 0.105.0b7, 0.105.0, 0.105.1, 0.105.2, 0.105.3, 0.105.4, 0.105.5, 0.106.0b0, 0.106.0b5, 0.106.0, 0.106.1, 0.106.2, 0.106.3, 0.106.4, 0.106.5, 0.106.6, 0.107.0b0, 0.107.0b1, 0.107.0b2, 0.107.0b3, 0.107.0b4, 0.107.0b5, 0.107.0b8, 0.107.0, 0.107.1, 0.107.2, 0.107.3, 0.107.4, 0.107.5, 0.107.6, 0.107.7, 0.108.0b0, 0.108.0b1, 0.108.0b2, 0.108.0b3, 0.108.0b4, 0.108.0b5, 0.108.0b6, 0.108.0, 0.108.1, 0.108.2, 0.108.3, 0.108.4, 0.108.5, 0.108.6, 0.108.7, 0.108.8, 0.108.9, 0.109.0b0, 0.109.0b4, 0.109.0b5, 0.109.0, 0.109.1, 0.109.2, 0.109.3, 0.109.4, 0.109.5, 0.109.6, 0.110.0b0, 0.110.0b1, 0.110.0b2, 0.110.0b3, 0.110.0b4, 0.110.0b5, 0.110.0, 0.110.1, 0.110.2, 0.110.3, 0.110.4, 0.110.5, 0.110.6, 0.110.7, 0.111.0b0, 0.111.0b1, 0.111.0b2, 0.111.0b3, 0.111.0b4, 0.111.0b5, 0.111.0, 0.111.1, 0.111.2, 0.111.3, 0.111.4, 0.112.0b0, 0.112.0b1, 0.112.0b2, 0.112.0b3, 0.112.0b4, 0.112.0, 0.112.1, 0.112.2, 0.112.3, 0.112.4, 0.112.5, 0.113.0b0, 0.113.0b1, 0.113.0b2, 0.113.0b3, 0.113.0, 0.113.1, 0.113.2, 0.113.3, 0.114.0b0, 0.114.0b1, 0.114.0b2, 0.114.0b3, 0.114.0b4, 0.114.0, 0.114.1, 0.114.2, 0.114.3, 0.114.4, 0.115.0b0, 0.115.0b1, 0.115.0b2, 0.115.0b3, 0.115.0b4, 0.115.0b5, 0.115.0b6, 0.115.0b7, 0.115.0b8, 0.115.0b9, 0.115.0b10, 0.115.0b11, 0.115.0b12, 0.115.0, 0.115.1, 0.115.2, 0.115.3, 0.115.4, 0.115.5, 0.115.6, 0.116.0b0, 0.116.0b1, 0.116.0b2, 0.116.0b3, 0.116.0b4, 0.116.0b5, 0.116.0, 0.116.1, 0.116.2, 0.116.3, 0.116.4, 0.117.0b0, 0.117.0b1, 0.117.0b2, 0.117.0b3, 0.117.0b4, 0.117.0b5, 0.117.0b6, 0.117.0, 0.117.1, 0.117.2, 0.117.3, 0.117.4, 0.117.5, 0.117.6, 0.118.0b0, 0.118.0b1, 0.118.0b2, 0.118.0b3, 0.118.0, 0.118.1, 0.118.2, 0.118.3, 0.118.4, 0.118.5, 1.0.0b0, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0b4, 1.0.0b5, 1.0.0b6, 2020.12.0, 2020.12.1, 2020.12.2, 2021.1.0b0, 2021.1.0b1, 2021.1.0b2, 2021.1.0b3, 2021.1.0, 2021.1.1, 2021.1.2, 2021.1.3, 2021.1.4, 2021.1.5, 2021.2.0b0, 2021.2.0b1, 2021.2.0b2, 2021.2.0b3, 2021.2.0b4, 2021.2.0b5, 2021.2.0, 2021.2.1, 2021.2.2, 2021.2.3, 2021.3.0b0, 2021.3.0b1, 2021.3.0b2, 2021.3.0b3, 2021.3.0b4, 2021.3.0b5, 2021.3.0b6, 2021.3.0b7, 2021.3.0, 2021.3.1, 2021.3.2, 2021.3.3, 2021.3.4, 2021.4.0b0, 2021.4.0b1, 2021.4.0b2, 2021.4.0b3, 2021.4.0b4, 2021.4.0b5, 2021.4.0b6, 2021.4.0, 2021.4.1, 2021.4.2, 2021.4.3, 2021.4.4, 2021.4.5, 2021.4.6, 2021.5.0b0, 2021.5.0b1, 2021.5.0b2, 2021.5.0b3, 2021.5.0b4, 2021.5.0b5, 2021.5.0b6, 2021.5.0b7, 2021.5.0b8, 2021.5.0, 2021.5.1, 2021.5.2, 2021.5.3, 2021.5.4, 2021.5.5, 2021.6.0b0, 2021.6.0b1, 2021.6.0b2, 2021.6.0b3, 2021.6.0b4, 2021.6.0b5, 2021.6.0, 2021.6.1, 2021.6.2, 2021.6.3, 2021.6.4, 2021.6.5, 2021.6.6, 2021.7.0b0, 2021.7.0b1, 2021.7.0b2, 2021.7.0b3, 2021.7.0b4, 2021.7.0b5, 2021.7.0b6, 2021.7.0, 2021.7.1, 2021.7.2, 2021.7.3, 2021.7.4, 2021.8.0b0, 2021.8.0b1, 2021.8.0b2, 2021.8.0b3, 2021.8.0b4, 2021.8.0b5, 2021.8.0b6, 2021.8.0b7, 2021.8.0b8, 2021.8.0b9, 2021.8.0b10, 2021.8.0, 2021.8.1, 2021.8.2, 2021.8.3, 2021.8.4, 2021.8.5, 2021.8.6, 2021.8.7, 2021.8.8, 2021.9.0b0, 2021.9.0b1, 2021.9.0b2, 2021.9.0b3, 2021.9.0b4, 2021.9.0b5, 2021.9.0b6, 2021.9.0b7, 2021.9.0, 2021.9.1, 2021.9.2, 2021.9.3, 2021.9.4, 2021.9.5, 2021.9.6, 2021.9.7, 2021.10.0b0, 2021.10.0b1, 2021.10.0b2, 2021.10.0b3, 2021.10.0b4, 2021.10.0b5, 2021.10.0b6, 2021.10.0b7, 2021.10.0b9, 2021.10.0, 2021.10.1, 2021.10.2, 2021.10.3, 2021.10.4, 2021.10.5, 2021.10.6, 2021.10.7, 2021.11.0b0, 2021.11.0b1, 2021.11.0b2, 2021.11.0b3, 2021.11.0b4, 2021.11.0b5, 2021.11.0, 2021.11.1, 2021.11.2, 2021.11.3, 2021.11.4, 2021.11.5, 2021.12.0b0, 2021.12.0b1, 2021.12.0b2, 2021.12.0b3, 2021.12.0b4, 2021.12.0b5, 2021.12.0b6, 2021.12.0b7, 2021.12.0, 2021.12.1, 2021.12.2, 2021.12.3, 2021.12.4, 2021.12.5, 2021.12.6, 2021.12.7, 2021.12.8, 2021.12.9, 2021.12.10, 2022.2.0b0, 2022.2.0b1, 2022.2.0b2, 2022.2.0b3, 2022.2.0b4, 2022.2.0b5, 2022.2.0b6, 2022.2.0, 2022.2.1, 2022.2.2, 2022.2.3, 2022.2.4, 2022.2.5, 2022.2.6, 2022.2.7, 2022.2.8, 2022.2.9, 2022.3.0b0, 2022.3.0b1, 2022.3.0b2, 2022.3.0b3, 2022.3.0b4, 2022.3.0b5, 2022.3.0b6, 2022.3.0, 2022.3.1, 2022.3.2, 2022.3.3, 2022.3.4, 2022.3.5, 2022.3.6, 2022.3.7, 2022.3.8, 2022.4.0b0, 2022.4.0b1, 2022.4.0b2, 2022.4.0b3, 2022.4.0b4, 2022.4.0b5, 2022.4.0, 2022.4.1, 2022.4.2, 2022.4.3, 2022.4.4, 2022.4.5, 2022.4.6, 2022.4.7, 2022.5.0b0, 2022.5.0b1, 2022.5.0b2, 2022.5.0b3, 2022.5.0b4, 2022.5.0b5, 2022.5.0b6, 2022.5.0b7, 2022.5.0, 2022.5.1, 2022.5.2, 2022.5.3, 2022.5.4, 2022.5.5, 2022.6.0b0, 2022.6.0b1, 2022.6.0b2, 2022.6.0b3, 2022.6.0b4, 2022.6.0b5, 2022.6.0b6, 2022.6.0b7, 2022.6.0, 2022.6.1, 2022.6.2, 2022.6.3, 2022.6.4, 2022.6.5, 2022.6.6, 2022.6.7, 2022.7.0b0, 2022.7.0b1, 2022.7.0b2, 2022.7.0b3, 2022.7.0b4, 2022.7.0b5, 2022.7.0, 2022.7.1, 2022.7.2, 2022.7.3, 2022.7.4, 2022.7.5, 2022.7.6, 2022.7.7, 2022.8.0b0, 2022.8.0b1, 2022.8.0b2, 2022.8.0b3, 2022.8.0b4, 2022.8.0b5, 2022.8.0b6, 2022.8.0b7, 2022.8.0, 2022.8.1, 2022.8.2, 2022.8.3, 2022.8.4, 2022.8.5, 2022.8.6, 2022.8.7, 2022.9.0b0, 2022.9.0b1, 2022.9.0b2, 2022.9.0b3, 2022.9.0b4, 2022.9.0b5, 2022.9.0b6, 2022.9.0, 2022.9.1, 2022.9.2, 2022.9.3, 2022.9.4, 2022.9.5, 2022.9.6, 2022.9.7, 2022.10.0b0, 2022.10.0b1, 2022.10.0b2, 2022.10.0b3, 2022.10.0b4, 2022.10.0b5, 2022.10.0b6, 2022.10.0, 2022.10.1, 2022.10.2, 2022.10.3, 2022.10.4, 2022.10.5, 2022.11.0b0, 2022.11.0b1, 2022.11.0b2, 2022.11.0b3, 2022.11.0b4, 2022.11.0b5, 2022.11.0b6, 2022.11.0b7, 2022.11.0, 2022.11.1, 2022.11.2, 2022.11.3, 2022.11.4, 2022.11.5, 2022.12.0b0, 2022.12.0b1, 2022.12.0b2, 2022.12.0b3, 2022.12.0b4, 2022.12.0b5, 2022.12.0b6, 2022.12.0b7, 2022.12.0, 2022.12.1, 2022.12.2, 2022.12.3, 2022.12.4, 2022.12.5, 2022.12.6, 2022.12.7, 2022.12.8, 2022.12.9, 2023.1.0b0, 2023.1.0b1, 2023.1.0b2, 2023.1.0b3, 2023.1.0b4, 2023.1.0b5, 2023.1.0, 2023.1.1, 2023.1.2, 2023.1.3, 2023.1.4, 2023.1.5, 2023.1.6, 2023.1.7, 2023.2.0b0, 2023.2.0b1, 2023.2.0b2, 2023.2.0b3, 2023.2.0b4, 2023.2.0b5, 2023.2.0b6, 2023.2.0b7, 2023.2.0b8, 2023.2.0b9, 2023.2.0, 2023.2.1, 2023.2.2, 2023.2.3, 2023.2.4, 2023.2.5, 2023.3.0b0, 2023.3.0b1, 2023.3.0b2, 2023.3.0b3, 2023.3.0b4, 2023.3.0b5, 2023.3.0b6, 2023.3.0b7, 2023.3.0, 2023.3.1, 2023.3.2, 2023.3.3, 2023.3.4, 2023.3.5, 2023.3.6, 2023.4.0b0, 2023.4.0b1, 2023.4.0b2, 2023.4.0b3, 2023.4.0b4, 2023.4.0b5, 2023.4.0b6, 2023.4.0b7, 2023.4.0, 2023.4.1, 2023.4.2, 2023.4.3, 2023.4.4, 2023.4.5, 2023.4.6, 2023.5.0b0, 2023.5.0b1, 2023.5.0b2, 2023.5.0b3, 2023.5.0b4, 2023.5.0b5, 2023.5.0b6, 2023.5.0b7, 2023.5.0b8, 2023.5.0, 2023.5.1, 2023.5.2, 2023.5.3, 2023.5.4, 2023.6.0b0, 2023.6.0b1, 2023.6.0b2, 2023.6.0b3, 2023.6.0b4, 2023.6.0b5, 2023.6.0b6, 2023.6.0, 2023.6.1, 2023.6.2, 2023.6.3, 2023.7.0b0, 2023.7.0b1, 2023.7.0b2, 2023.7.0b3, 2023.7.0b4, 2023.7.0b5, 2023.7.0b6, 2023.7.0, 2023.7.1, 2023.7.2, 2023.7.3, 2023.8.0b0, 2023.8.0b1, 2023.8.0b2, 2023.8.0b3, 2023.8.0b4, 2023.8.0, 2023.8.1, 2023.8.2, 2023.8.3, 2023.8.4, 2023.9.0b0, 2023.9.0b1, 2023.9.0b2, 2023.9.0b3, 2023.9.0b4, 2023.9.0b5, 2023.9.0b6, 2023.9.0, 2023.9.1, 2023.9.2, 2023.9.3, 2023.10.0b0, 2023.10.0b1, 2023.10.0b2, 2023.10.0b3, 2023.10.0b4, 2023.10.0b6, 2023.10.0b7, 2023.10.0b9, 2023.10.0, 2023.10.1, 2023.10.2, 2023.10.3, 2023.10.4, 2023.10.5, 2023.11.0b0, 2023.11.0b1, 2023.11.0b2, 2023.11.0b3, 2023.11.0b4, 2023.11.0b5, 2023.11.0b6, 2023.11.0, 2023.11.1, 2023.11.2, 2023.11.3, 2023.12.0b0, 2023.12.0b1, 2023.12.0b2, 2023.12.0b3, 2023.12.0b4, 2023.12.0b5, 2023.12.0, 2023.12.1, 2023.12.2, 2023.12.3, 2023.12.4, 2024.1.0b0, 2024.1.0b1, 2024.1.0b2, 2024.1.0b3, 2024.1.0b4, 2024.1.0b5, 2024.1.0b6, 2024.1.0b7, 2024.1.0b8, 2024.1.0, 2024.1.1, 2024.1.2, 2024.1.3, 2024.1.4, 2024.1.5, 2024.1.6, 2024.2.0b0, 2024.2.0b1, 2024.2.0b2, 2024.2.0b3, 2024.2.0b4, 2024.2.0b5, 2024.2.0b6, 2024.2.0b7, 2024.2.0b8, 2024.2.0b9, 2024.2.0b10, 2024.2.0b11, 2024.2.0, 2024.2.1, 2024.2.2, 2024.2.3, 2024.2.4, 2024.2.5, 2024.3.0b0, 2024.3.0b1, 2024.3.0b2, 2024.3.0b3, 2024.3.0b4, 2024.3.0b5, 2024.3.0b6, 2024.3.0b7, 2024.3.0b8, 2024.3.0, 2024.3.1, 2024.3.2, 2024.3.3, 2024.4.0b0, 2024.4.0b1, 2024.4.0b2, 2024.4.0b3, 2024.4.0b4, 2024.4.0b5, 2024.4.0b6, 2024.4.0b7, 2024.4.0b8, 2024.4.0b9, 2024.4.0, 2024.4.1, 2024.4.2, 2024.4.3, 2024.4.4, 2024.5.0b0, 2024.5.0b1, 2024.5.0b2, 2024.5.0b3, 2024.5.0b4, 2024.5.0b5, 2024.5.0b6, 2024.5.0b7, 2024.5.0, 2024.5.1, 2024.5.2, 2024.5.3, 2024.5.4, 2024.5.5, 2024.6.0b0, 2024.6.0b1, 2024.6.0b2, 2024.6.0b3, 2024.6.0b4, 2024.6.0b5, 2024.6.0b6, 2024.6.0b7, 2024.6.0b8, 2024.6.0b9, 2024.6.0, 2024.6.1, 2024.6.2, 2024.6.3, 2024.6.4, 2024.7.0b0, 2024.7.0b1, 2024.7.0b2, 2024.7.0b3, 2024.7.0b4, 2024.7.0b5, 2024.7.0b6, 2024.7.0b7, 2024.7.0b8, 2024.7.0b9, 2024.7.0b10, 2024.7.0b11, 2024.7.0, 2024.7.1, 2024.7.2, 2024.7.3, 2024.7.4, 2024.8.0b0, 2024.8.0b1, 2024.8.0b2, 2024.8.0b3, 2024.8.0b4, 2024.8.0b5, 2024.8.0b6, 2024.8.0b7, 2024.8.0b8, 2024.8.0b9, 2024.8.0, 2024.8.1, 2024.8.2, 2024.8.3, 2024.9.0b0, 2024.9.0b1, 2024.9.0b2, 2024.9.0b3, 2024.9.0b4, 2024.9.0b5, 2024.9.0, 2024.9.1, 2024.9.2, 2024.9.3, 2024.10.0b0, 2024.10.0b1, 2024.10.0b2, 2024.10.0b3, 2024.10.0b4, 2024.10.0b5, 2024.10.0b6, 2024.10.0b7, 2024.10.0b8, 2024.10.0b9, 2024.10.0b10, 2024.10.0b11, 2024.10.0b12, 2024.10.0, 2024.10.1, 2024.10.2, 2024.10.3, 2024.10.4, 2024.11.0b0, 2024.11.0b1, 2024.11.0b2, 2024.11.0b3, 2024.11.0b4, 2024.11.0b5, 2024.11.0b6, 2024.11.0b7, 2024.11.0b8, 2024.11.0b9, 2024.11.0, 2024.11.1, 2024.11.2, 2024.11.3, 2024.12.0b0, 2024.12.0b1, 2024.12.0b2, 2024.12.0b3, 2024.12.0b4, 2024.12.0b5, 2024.12.0b6, 2024.12.0, 2024.12.1, 2024.12.2, 2024.12.3, 2024.12.4, 2024.12.5, 2025.1.0b0, 2025.1.0b1, 2025.1.0b2, 2025.1.0b3, 2025.1.0b4, 2025.1.0b5, 2025.1.0b6, 2025.1.0b7, 2025.1.0b8, 2025.1.0b9, 2025.1.0, 2025.1.1, 2025.1.2, 2025.1.3, 2025.1.4)
ERROR: No matching distribution found for homeassistant==2025.3.4

Python のバージョンが低いためインストールできなかった。 Python3.13 以上が必要とのこと Ubuntu24.04 のデフォルトは 3.12.3 だった。

$ python -V
Python 3.12.3

Python3.13 をインストールして再度 homeassistant をインストールする。

apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt install python3.13 python-3.13-venv
sudo -u homeassistant -H -s
cd /srv/homeassistant/
python3.13 -m venv .
source bin/activate
pip3 install homeassistant==2025.3.4
...
Building wheels for collected packages: ciso8601, lru-dict, fnvhash, PyRIC
  Building wheel for ciso8601 (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ciso8601 (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      /tmp/pip-build-env-4il72qdb/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      /tmp/pip-build-env-4il72qdb/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'tests_require'
        warnings.warn(msg)
      /tmp/pip-build-env-4il72qdb/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/ciso8601
      copying ciso8601/__init__.pyi -> build/lib.linux-x86_64-cpython-313/ciso8601
      copying ciso8601/py.typed -> build/lib.linux-x86_64-cpython-313/ciso8601
      running build_ext
      building 'ciso8601' extension
      creating build/temp.linux-x86_64-cpython-313
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -DCISO8601_VERSION=2.3.2 -DCISO8601_CACHING_ENABLED=1 -I/srv/homeassistant/include -I/usr/include/python3.13 -c isocalendar.c -o build/temp.linux-x86_64-cpython-313/isocalendar.o
      isocalendar.c:57:10: fatal error: Python.h: No such file or directory
         57 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ciso8601
  Building wheel for lru-dict (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for lru-dict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [68 lines of output]
      /tmp/pip-build-env-zucihvrb/overlay/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
      !!

              ********************************************************************************
              Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

              By 2026-Feb-18, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        corresp(dist, value, root_dir)
      /tmp/pip-build-env-zucihvrb/overlay/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        dist._finalize_license_expression()
      /tmp/pip-build-env-zucihvrb/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/lru
      copying src/lru/__init__.py -> build/lib.linux-x86_64-cpython-313/lru
      running egg_info
      writing src/lru_dict.egg-info/PKG-INFO
      writing dependency_links to src/lru_dict.egg-info/dependency_links.txt
      writing requirements to src/lru_dict.egg-info/requires.txt
      writing top-level names to src/lru_dict.egg-info/top_level.txt
      reading manifest file 'src/lru_dict.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'MANIFEST'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      adding license file 'LICENSE'
      writing manifest file 'src/lru_dict.egg-info/SOURCES.txt'
      copying src/lru/__init__.pyi -> build/lib.linux-x86_64-cpython-313/lru
      copying src/lru/py.typed -> build/lib.linux-x86_64-cpython-313/lru
      running build_ext
      building 'lru._lru' extension
      creating build/temp.linux-x86_64-cpython-313/src/lru
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -fwrapv -O2 -fPIC -I/srv/homeassistant/include -I/usr/include/python3.13 -c src/lru/_lru.c -o build/temp.linux-x86_64-cpython-313/src/lru/_lru.o
      src/lru/_lru.c:1:10: fatal error: Python.h: No such file or directory
          1 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lru-dict
  Building wheel for fnvhash (pyproject.toml) ... done
  Created wheel for fnvhash: filename=fnvhash-0.1.0-py3-none-any.whl size=2180 sha256=8e9c4a20ce6450dceaf2d7b47923ca375b8cf27169a794cc7a3425c881f48a9f
  Stored in directory: /home/homeassistant/.cache/pip/wheels/b4/11/13/f349ad04df7e01224db09470d3f79e74ab001ad2e2cdd4a731
  Building wheel for PyRIC (pyproject.toml) ... done
  Created wheel for PyRIC: filename=pyric-0.1.6.3-py2.py3-none-any.whl size=407975 sha256=ab404b0bd8fbd78f8d003b2dec73fd4cf47e1f96a4f03314f6f21b131eed852c
  Stored in directory: /home/homeassistant/.cache/pip/wheels/b4/9d/e8/a9ecfc2003f256579ac6b252c19a68ad41533502ef58e7e689
Successfully built fnvhash PyRIC
Failed to build ciso8601 lru-dict
ERROR: Failed to build installable wheels for some pyproject.toml based projects (ciso8601, lru-dict)

エラーが起こったためpython3.13-devをインストールして再度試す。

apt install python3.13-dev
sudo -u homeassistant -H -s
cd /srv/homeassistant/
python3.13 -m venv .
source bin/activate
pip3 install homeassistant==2025.3.4
hass
Unable to find configuration. Creating default one in /home/homeassistant/.homeassistant
2025-03-28 08:43:31.643 WARNING (MainThread) [aiohttp_fast_zlib] zlib_ng and isal are not available, falling back to zlib, performance will be degraded.

これで HomeAssistant が起動する。

自動起動設定

systemd で自動設定する。

この設定をすることで GUI の再起動が正常に動作するようになる。

/etc/systemd/system/[email protected]を作成して下記の様に設定する。

[Unit]
Description=Home Assistant
After=network-online.target

[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
RestartForceExitStatus=100

[Install]
WantedBy=multi-user.target
systemctl --system daemon-reload
systemctl enable home-assistant@homeassistant
systemctl start home-assistant@homeassistant

まとめ

Python のバージョンで少し躓いたものの比較的簡単にインストールできた。 今後手持ちのセンサーなどを追加して使用感などを確認していきたい。

参考

https://ubuntuhandbook.org/index.php/2024/02/install-python-3-13-ubuntu/

おしまい



LXD 6.2 から Incus 6.8 への移行で発生したエラーと復旧方法
December 26, 2024November 03, 2025

2023 年の終わりに LXD のポリシー変更によりプロジェクトが二分されることとなりました。 今年の春ごろから image のダウンロードなどもできなくなり使いづらい状態となってきたので Incus に乗り換えようと思った記録となります。 エラーを完全に治せなかったものの、コンテナの復旧はできました。 LXD…

Continue reading...
sakakinox

Written by sakakinox
Server enginier

Copyright © sakakinox.net 2021-2026.