Google 提供 SDK、工具和範例應用程式,協助您快速啟動 Cloud-to-cloud journey, whether you're integrating a simple switch or a complex AV receiver.
這些資源可以協助開發人員專注於開發能力和功能,同時減少處理基礎架構的心力。
範例與圖書館
我們的端對端範例可做為您整合作業的起點,或是說明如何建立新範例。且Google Home Graph API client libraries are available in a variety of languages.
工具
VS Code 的 Google Home 擴充功能
Google Home Extension for Visual Studio Code 可讓您直接與 Google Home 生態系統互動。例如,您可以輸入指令,例如「開啟我的燈泡」和Google Assistant will process your request in the cloud and send the command to the device.
在開發階段,請使用這項擴充功能來:
測試整合在「Google Home.」中的 Cloud-to-cloud 裝置
即時查看 Google Cloud 記錄,找出雙向的通訊資料,進而找出問題。依嚴重性和時間範圍篩選。
檢查記錄訊息的 JSON 內容。
以指令碼格式發出 Assistant 指令,協助您以可重複的方式加快測試速度。
SYNC 資料驗證工具
建議您使用同步處理資料驗證工具來驗證整合作業中的 SYNC 回應格式。這種做法可以減少測試程序的後續錯誤。
Google Home 遊樂場
在透過實體裝置完成開發作業前,Google Home Playground 很適合在 Google Home 生態系統中模擬裝置類型。
請在開發階段使用這項工具:
- 建立虛擬裝置並使用特性設定這些裝置,供 Google Home app (GHA). 使用
- 查看裝置在「Home Graph」的顯示方式。
- 測試裝置的次要使用者驗證。
Google Home 測試套件
使用 Google Home Test Suite 測試您的智慧型住宅整合,並確定其符合 Google Home 生態系統的認證和推出規定。
Home Graph 檢視者
Google Home Graph 是用來檢查特定使用者 Home Graph 中的裝置狀態。不用 API 就能直接驗證 Home Graph。