Kể từ ngày 13 tháng 6 năm 2023, Hành động trò chuyện không còn được dùng nữa. Để biết thêm thông tin, hãy xem phần Hành động trò chuyện ngừng hoạt động.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Để Trợ lý Google phản hồi các lệnh thích hợp với
thiết bị của bạn và ngữ cảnh cụ thể, Trợ lý cần thông tin về
thiết bị cụ thể. Bạn cung cấp thông tin này, bao gồm các trường như
loại thiết bị và nhà sản xuất làm mẫu thiết bị. Bạn có thể coi mô hình này là
một loại thiết bị chung -- chẳng hạn như đèn, loa hoặc rô-bốt đồ chơi.
Sau đó, Trợ lý có thể truy cập vào thông tin này và
được liên kết với
Dự án Actions Console.
Không có dự án nào khác có quyền truy cập vào thông tin về kiểu máy và thiết bị của bạn.
Sử dụng giao diện người dùng đăng ký
Sử dụng giao diện người dùng đăng ký trong Bảng điều khiển Actions
để đăng ký một mẫu thiết bị.
Nhấp vào nút ĐĂNG KÝ MÔ HÌNH.
Tạo mô hình
Điền vào tất cả các trường cho thiết bị của bạn. Chọn bất kỳ loại thiết bị nào, chẳng hạn như
Sáng.
Xem JSON mẫu thiết bị
tài liệu tham khảo
để biết thêm thông tin về các trường này.
Khi bạn hoàn tất, hãy nhấp vào ĐĂNG KÝ MÔ HÌNH.
Tải thông tin đăng nhập xuống
Tệp client_secret_<client-id>.json phải nằm trên thiết bị. Tệp này chứa
một mã ứng dụng khách và mật khẩu ứng dụng khách, nhưng không có mã truy cập. Sau đó, bạn sẽ chạy một
công cụ uỷ quyền của Google và tham chiếu tệp này để cấp quyền
Mẫu SDK Trợ lý để thực hiện truy vấn trên Trợ lý Google (xem OAuth 2.0
để biết thêm thông tin). Đừng đổi tên tệp này.
Tải tệp này xuống rồi chuyển tệp sang thiết bị. Nhấp vào TIẾP THEO.
Chỉ dành cho Raspberry Pi
Đảm bảo tệp này nằm trong /home/pi. Nếu bạn muốn tải tệp lên
với thiết bị, hãy làm như sau:
Mở một cửa sổ dòng lệnh mới. Chạy lệnh sau trong cửa sổ dòng lệnh mới này:
Sau đó, bạn sẽ chỉ định những khả năng mà thiết bị của bạn hỗ trợ
màn hình này. Tuy nhiên, hiện tại, hãy nhấp vào nút BỎ QUA.
Chỉnh sửa mô hình
Nếu bạn cần chỉnh sửa mô hình, hãy nhấp vào hàng của mô hình đó trong danh sách. Đừng quên nhấp vào LƯU
sau khi chỉnh sửa.
Nếu bạn cần tải tệp thông tin xác thực xuống một lần nữa, hãy nhấp vào dấu ba chấm. Bạn có thể
bạn cũng có thể xoá mô hình đó khỏi trình đơn này.
Những cách khác để đăng ký
Bạn cũng có thể sử dụng công cụ đăng ký
(có trong mẫu SDK Trợ lý Google) hoặc API REST
để đăng ký một mẫu thiết bị.
Bạn phải là Chủ sở hữu hoặc Người chỉnh sửa của một dự án cụ thể trên Bảng điều khiển Actions để đăng ký
mô hình cho nó. Thêm các vai trò này cho những người dùng khác trong Bảng điều khiển Cloud Platform – hãy xem
Tài liệu về IAM.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eDevice models provide the Google Assistant with necessary information about your device, such as type and manufacturer, to enable appropriate responses.\u003c/p\u003e\n"],["\u003cp\u003eYou can register your device model through the Actions Console, using a registration UI that requires prior project setup with device registration enabled.\u003c/p\u003e\n"],["\u003cp\u003eAfter registration, you'll need to download a credentials file containing a client ID and secret, placing it on your device for authorization purposes, particularly crucial for Raspberry Pi setups.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves specifying device traits, editing the model if needed, and utilizing alternative registration methods like the registration tool or REST API, all within the permissions of project Owners or Editors.\u003c/p\u003e\n"],["\u003cp\u003eOnce registered, the device model allows the Google Assistant to interact with your device according to its capabilities and context.\u003c/p\u003e\n"]]],["To enable the Google Assistant, register a device model in the Actions Console, providing details like device type and manufacturer. Click \"REGISTER MODEL,\" complete the required fields, and then save. Download the `client_secret_.json` file, which contains necessary credentials, and transfer it to the device, for example, to `/home/pi/` on a Raspberry Pi using `scp`. Later you will be able to edit the model, skip specifying traits and can download the credentials file.\n"],null,["# Register the Device Model\n\nIn order for the Google Assistant to respond to commands appropriate to your\ndevice and the given context, the Assistant needs information about your\nparticular device. You provide this information, which includes fields like\ndevice type and manufacturer, as a device model. You can think of this model as\na general class of device -- such as a light, speaker, or toy robot.\n\nThis information is then accessible to the Assistant and is\nassociated with your\n\nActions Console project.\n\nNo other projects have access to your model and device information.\n\nUse the registration UI\n-----------------------\n\nUse the registration UI in the [Actions Console](https://console.actions.google.com/)\nto register a device model.\n| **Note:** The registration UI will not appear if you did not click the **Device\n| registration** box when creating the project (see the previous step).\n\nClick the **REGISTER MODEL** button.\n\n### Create model\n\n1. Fill out all of the fields for your device. Select any device type, such as\n **Light**.\n\n See the device model JSON\n\n [reference](/assistant/sdk/reference/device-registration/model-and-instance-schemas#device_model_json)\n\n for more information on these fields.\n2. When you are finished, click **REGISTER MODEL**.\n\n### Download credentials\n\nThe `client_secret_\u003cclient-id\u003e.json` file must be located on the device. This file contains\na client ID and client secret, but no access token. Later, you will run an\nauthorization tool and reference this file in order to authorize the Google\nAssistant SDK sample to make Google Assistant queries (see the [OAuth 2.0](/identity/protocols/OAuth2)\ndocumentation for more information). Do not rename this file.\n\nDownload this file and transfer it to the device. Click **NEXT**.\n\n#### For the Raspberry Pi only\n\nMake sure this file is located in `/home/pi`. If you want to upload the file\nto the device, do the following:\n\n1. Open a new terminal window. Run the following command in this new terminal:\n\n **Note:** Do **not** run the following command in an SSH session connected to the device. This command transfers the JSON file from a directory on your development machine to the device. An SSH session cannot access your local directories. \n\n ```\n scp ~/Downloads/client_secret_client-id.json pi@raspberry-pi-ip-address:/home/pi/\n ``` \n\n ```\n password: password-for-device\n ```\n2. Close this terminal window.\n\n### Specify traits\n\nLater, you will specify the different abilities that your device supports on\nthis screen. But for now, click the **SKIP** button.\n\n### Edit the model\n\nIf you need to edit the model, click its row in the list. Make sure to click **SAVE**\nafter any edits.\n\nIf you need to download the credentials file again, click the ellipses. You can\ndelete the model from this menu as well.\n\nAlternative ways to register\n----------------------------\n\nYou can also use the [registration tool](/assistant/sdk/reference/device-registration/device-tool)\n(included with the Google Assistant SDK samples) or the [REST API](/assistant/sdk/reference/device-registration/register-device-manual)\nto register a device model.\n\nYou must be an Owner or Editor of a given Actions Console project to register\nmodels for it. Add these roles for other users in the Cloud Platform Console---see the\n[IAM documentation](https://cloud.google.com/iam/docs/granting-changing-revoking-access).\n\nNext step\n---------\n\n[Install the SDK and Sample Code](/assistant/sdk/guides/service/python/embed/install-sample)"]]