Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

189.4. ha 命令

189.4.1. 检查版本

			
neo@MacBook-Pro-M2 ~> curl -s https://version.home-assistant.io/stable.json
{
  "channel": "stable",
  "supervisor": "2023.07.1",
  "homeassistant": {
    "default": "2023.7.2",
    "qemux86": "2023.7.2",
    "qemux86-64": "2023.7.2",
    "qemuarm": "2023.7.2",
    "qemuarm-64": "2023.7.2",
    "generic-x86-64": "2023.7.2",
    "intel-nuc": "2023.7.2",
    "khadas-vim3": "2023.7.2",
    "raspberrypi": "2023.7.2",
    "raspberrypi2": "2023.7.2",
    "raspberrypi3": "2023.7.2",
    "raspberrypi3-64": "2023.7.2",
    "raspberrypi4": "2023.7.2",
    "raspberrypi4-64": "2023.7.2",
    "yellow": "2023.7.2",
    "tinker": "2023.7.2",
    "odroid-c2": "2023.7.2",
    "odroid-c4": "2023.7.2",
    "odroid-m1": "2023.7.2",
    "odroid-n2": "2023.7.2",
    "odroid-xu": "2023.7.2"
  },
  "hassos": {
    "ova": "10.3",
    "rpi2": "10.3",
    "rpi3": "10.3",
    "rpi3-64": "10.3",
    "rpi4": "10.3",
    "rpi4-64": "10.3",
    "yellow": "10.3",
    "tinker": "10.3",
    "odroid-c2": "10.3",
    "odroid-c4": "10.3",
    "odroid-m1": "10.3",
    "odroid-n2": "10.3",
    "odroid-xu4": "10.3",
    "generic-x86-64": "10.3",
    "generic-aarch64": "10.3",
    "khadas-vim3": "10.3"
  },
  "hassos-upgrade": {
    "9": "9.5",
    "8": "8.5",
    "7": "7.6",
    "6": "6.6",
    "5": "5.13",
    "4": "4.20",
    "3": "3.13"
  },
  "ota": "https://github.com/home-assistant/operating-system/releases/download/{version}/{os_name}_{board}-{version}.raucb",
  "cli": "2023.06.0",
  "dns": "2023.06.2",
  "audio": "2023.06.0",
  "multicast": "2023.06.2",
  "observer": "2023.06.0",
  "image": {
    "core": "homeassistant/{machine}-homeassistant",
    "supervisor": "homeassistant/{arch}-hassio-supervisor",
    "cli": "homeassistant/{arch}-hassio-cli",
    "audio": "homeassistant/{arch}-hassio-audio",
    "dns": "homeassistant/{arch}-hassio-dns",
    "observer": "homeassistant/{arch}-hassio-observer",
    "multicast": "homeassistant/{arch}-hassio-multicast"
  },
  "images": {
    "core": "ghcr.io/home-assistant/{machine}-homeassistant",
    "supervisor": "ghcr.io/home-assistant/{arch}-hassio-supervisor",
    "cli": "ghcr.io/home-assistant/{arch}-hassio-cli",
    "audio": "ghcr.io/home-assistant/{arch}-hassio-audio",
    "dns": "ghcr.io/home-assistant/{arch}-hassio-dns",
    "observer": "ghcr.io/home-assistant/{arch}-hassio-observer",
    "multicast": "ghcr.io/home-assistant/{arch}-hassio-multicast"
  }
}			
			
			

189.4.2. network

			 
root@homeassistant:~# ha network info
docker:
  address: 172.30.32.0/23
  dns: 172.30.32.3
  gateway: 172.30.32.1
  interface: hassio
host_internet: false
interfaces:
- connected: true
  enabled: true
  interface: eth0
  ipv4:
	address:
	- 192.168.30.126/24
	gateway: 192.168.30.1
	method: auto
	nameservers:
	- 202.96.134.133
	- 114.114.114.114
	ready: true
  ipv6:
	address:
	- fe80::aefb:5aa3:1dff:71af/64
	gateway: null
	method: disabled
	nameservers: []
	ready: true
  primary: true
  type: ethernet
  vlan: null
  wifi: null
supervisor_internet: false    
	
			
			 
root@homeassistant:~# ha network info | grep internet
host_internet: false
supervisor_internet: false    
			
			

189.4.3. 修改 DNS

	  		 
ha dns options --servers dns://8.8.8.8      
	  		
			

189.4.4. supervisor 管理

			
root@homeassistant:~# ha supervisor available-updates
available_updates:
- panel_path: /update-available/core
  update_type: core
  version_latest: 2023.7.2
- icon: /addons/a0d7b954_nodered/icon
  name: Node-RED
  panel_path: /update-available/a0d7b954_nodered
  update_type: addon
  version_latest: 14.4.0			
			
			

189.4.5. core

			
root@homeassistant:~# ha core update
Error: 'HomeAssistantCore.update' blocked from execution, no host internet connection

root@homeassistant:~# ha jobs info
ignore_conditions: []

root@homeassistant:~# ha jobs options --ignore-conditions internet_host
Command completed successfully.

root@homeassistant:~# ha jobs info
ignore_conditions:
- internet_host

root@homeassistant:~# ha core update			
			
			

189.4.6. jobs

			
ha jobs options --ignore-conditions internet_host			
ha jobs options --ignore-conditions healthy