Skip to content

Instantly share code, notes, and snippets.

  • Select an option

  • Save pulipulichen/a9d13d2aa4f1c9be75ee104863e8c2f9 to your computer and use it in GitHub Desktop.

Select an option

Save pulipulichen/a9d13d2aa4f1c9be75ee104863e8c2f9 to your computer and use it in GitHub Desktop.
Android,Cloudflare,Home Assistant
看看網頁版全文 ⇨ 用Cloudflare Tunnel的內網穿透來連接Home Assistant的Google助理 : Using Cloudflare Tunnel for Internal Network Penetration to Connect Home Assistant to Google Assistant
https://blog.pulipuli.info/2025/10/using-cloudflare-tunnel-for-internal-network-penetration-to-connect-home-assistant-to-google-assistant.html
如果要讓Google助理操作Home Assistant所連結的設備,那麼必須要有能夠連上Home Assistant的公開HTTPS網址才行。
由於原本我用的Telebit發生問題,所以我花了一些時間找尋替代方案。
這篇就做個記錄吧。
To allow Google Assistant to control devices connected to Home Assistant, a public HTTPS address that can connect to Home Assistant is required. Since my original Telebit had issues, I spent some time looking for alternatives. This is just a record of that.。
----
# 網路架構 / Network Architecture。
在開始講解之前,我們要先釐清一下本篇文章所要著重的重點。
上圖的左半邊是Google助理連結Home Assistant操作智慧裝置的主要途徑。
具體來說,我們在Android手機呼叫Google助理時,它背後會去操作Google Home應用程式裡面連結的裝置。
Google Home的連結是透過我們在Google Cloud Platform (簡稱GCP)設定好Home Assistant的整合方式來連到我們區域網路裡面的Home Assistant,以此操作跟Home Assistant相連的智慧裝置,例如智慧燈泡。
如果設定完成的話,我們就能夠用語音指令來控制家裡的智慧燈泡。
舉例來說,我們可以直接用語音控制來發送指令:「OK Google,關閉客廳燈光。
」然後我們就能聽到Google助理回覆類似「好的,客廳燈光已關閉」的訊息,此時Home Assistant連接的智慧燈泡就會關閉。
然而上述的操作是在已經設定完成的前提下才能進行。
而這背後的設定才是真正複雜的地方,也是本篇文章所要講述的重點。
我所在的網路環境並沒有公開IP,甚至連DDNS都沒辦法設定。
如果要在外面連線到本地網路,就必須仰賴內網穿透、虛擬區網等技術。
而這次為了要讓外面的GCP連接到本地網路的Home Assistant,Cloudflare Tunnel方案就成了我這次的選擇。
----
繼續閱讀 ⇨ 用Cloudflare Tunnel的內網穿透來連接Home Assistant的Google助理 : Using Cloudflare Tunnel for Internal Network Penetration to Connect Home Assistant to Google Assistant
https://blog.pulipuli.info/2025/10/using-cloudflare-tunnel-for-internal-network-penetration-to-connect-home-assistant-to-google-assistant.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment