fbpx
Tuesday, June 6, 2023

Các lệnh cơ bản trong Home Assistant

Bài viết này với mục đích ghi lại các lệnh thường dùng trên Home Assistant các phiên bản. Trên dòng lệnh SSH, bạn có thể sử dụng lệnh ha để lấy nhật ký, kiểm tra chi tiết về phần cứng được kết nối và nhiều hơn nữa.

HOME ASSISTANT

ha core check
ha core info
ha core logs
ha core options
ha core rebuild
ha core restart
ha core start
ha core stats
ha core stop
ha core update

Bài viết trích lại các lệnh cần thiết từ link chính thức của Home Assistant.

SUPERVISOR

ha supervisor info
ha supervisor logs
ha supervisor reload
ha supervisor update

HOST

ha host reboot
ha host shutdown
ha host update

HARDWARE

ha hardware info
ha hardware audio

VÍ DỤ:

Để cập nhật Home Assistant lên một phiên bản cụ thể, sử dụng lệnh:

ha core update --version x.y.z

Thay thế x.y.z bằng phiên bản mong muốn như –version 2023.4.2

Bạn có thể có mô tả chi tiết hơn về khả năng của CLI bằng cách gõ lệnh ha help:

The Home Assistant CLI is a small and simple command line utility that allows
you to control and configure different aspects of Home Assistant

Usage:
ha [command]

Available Commands:
addons Install, update, remove and configure Home Assistant add-ons
audio Audio device handling.
authentication Authentication for Home Assistant users.
backups Create, restore and remove backups
banner Prints the CLI Home Assistant banner along with some useful information
cli Get information, update or configure the Home Assistant cli backend
core Provides control of the Home Assistant Core
dns Get information, update or configure the Home Assistant DNS server
docker Docker backend specific for info and OCI configuration
hardware Provides hardware information about your system
help Help about any command
host Control the host/system that Home Assistant is running on
info Provides a general Home Assistant information overview
jobs Get information and manage running jobs
multicast Get information, update or configure the Home Assistant Multicast
network Network specific for updating, info and configuration imports
observer Get information, update or configure the Home Assistant observer
os Operating System specific for updating, info and configuration imports
resolution Resolution center of Supervisor, show issues and suggest solutions
supervisor Monitor, control and configure the Home Assistant Supervisor

Flags:
--api-token string Home Assistant Supervisor API token
--config string Optional config file (default is $HOME/.homeassistant.yaml)
--endpoint string Endpoint for Home Assistant Supervisor (default is 'supervisor')
-h, --help help for ha
--log-level string Log level (defaults to Warn)
--no-progress Disable the progress spinner
--raw-json Output raw JSON from the API

Use "ha [command] --help" for more information about a command.

FEATURED ARTICLES

[Series Photography] Tất tần tật về nhiếp ảnh kỳ 1 –...

0
Hello, để nói là tất tần tật thì có vể thật sự quá chủ quan phải không nào? Nhưng những bài viết về chủ...

NEW ARTICLES

Kiến Thức Đầu Tư Chứng Khoán Cơ Bản Dành Cho Người Mới – Phần...

0
Kiến Thức Đầu Tư Chứng Khoán Cơ Bản sẽ giúp các bạn tóm gọn nhanh và hiểu rõ hơn về Thị trường chứng khoán ở Việt Nam. I. Giới thiệu...

Top trang web Domain Authority cao trên 70 cho SEO (Cập nhật)

0
Một content writer bạn hẳn phải thường tìm các trang có Domain Authority cao. Vậy Domain Authority cao có lợi ích gì? và tại sao chúng ta lại cần...

Tối ưu hóa 100 điểm SEO bài viết với Rank Math

0
Việc tối ưu hóa 100 điểm SEO bài viết trở nên rất quan trọng với bất kỳ Content Writer nào. Trong bài này, mình sẽ hướng dẫn cho bạn...

Top 25 điểm đến du lịch nổi tiếng nhất thế giới

0
Trang web du lịch nổi tiếng TripAdvisor đã công bố danh sách top 25 điểm đến du lịch nổi tiếng hàng đầu thế giới. Bảng xếp hạng dựa trên đánh giá bình...

Hướng dẫn chi tiết chuyển tiền về Việt Nam bằng Transferwise

0
Việc sống ở nước ngoài làm việc cũng có thể để dành được chút tiền và bạn muốn chuyển tiền về Việt Nam. Vậy hiện nay có cách nào...

Hướng dẫn gỡ Plugin WordPress hoàn toàn

0
Khi bạn cài đặt WordPress, thường một trong những điều đầu tiên bạn làm là cài đặt các plugin. Khi trang web và kỹ năng của bạn phát triển,...

Hướng dẫn cài Plugin WordPress – Cụ thể từng bước

0
Sau khi cài đặt Wordpress thì việc tiếp theo là theme và plugin cần thiết. Vậy trong bài viết này Ngọc sẽ hướng dẫn các bạn cài Plugin Wordpress...

Top 10 con đường đẹp nhất Paris

0
Paris có hệ thống với hơn 6,100 con đường lớn nhỏ. Vậy có bao giờ bạn nghĩ mình sẽ dạo qua hết cơ số đường đó chưa? Hãy tưởng...

ABOUT CALEPENTURE

Ngọc tốt nghiệp MBA Digital Marketing and Innovation Management tại Pháp. Mong muốn rằng tạo ra chiếc blog này để mọi người có thể cảm thấy vui vẻ hơn trên con đường thiên di của mình.

OUR SERVICES

spot_img

Lastest Post

Categories

Must Read

DONATE

Nếu bạn thấy trang blog mình bổ ích.
Hãy bấm donate bên dưới để mình có thêm kinh phí duy trì nhé!

Hoặc quét mã QR sau