[英]How do you write a Google Action that posts to an API on the local network
I'm just starting out writing Google Actions for some home automation projects.我刚刚开始为一些家庭自动化项目编写 Google Actions。 I can't seem to find information on how to write an action that will POST to an API on the local network.
我似乎无法找到有关如何编写将 POST 到本地网络上的 API 的操作的信息。 I don't want to go outside the firewall to automate devices and services located on the local LAN.
我不想走出防火墙来自动化位于本地 LAN 上的设备和服务。 I have provided an image of what I'm looking to do.
我已经提供了我想要做的事情的图像。
You can't do this.你不能这样做。 The Google Home device doesn't (generally) have access to the local network and aside from basic voice processing, your Actions run in the cloud rather than the local device itself.
Google Home 设备(通常)无法访问本地网络,除了基本的语音处理之外,您的操作在云中运行,而不是本地设备本身。
Most devices that appear to act locally all contact a cloud-based service to do what they want.大多数似乎在本地运行的设备都联系基于云的服务来做他们想做的事。 This allows your Assistant to act on them, even when the Assistant device (such as your phone) isn't on the LAN.
这允许您的 Google 助理对它们采取行动,即使 Google 助理设备(例如您的手机)不在 LAN 上也是如此。
Your options are pretty narrow:您的选择非常狭窄:
If you use Google Smart Home actions you can use:Local Execution如果您使用 Google 智能家居操作,您可以使用:本地执行
I do not know if they plan to extend this to Dialog Flow type actions.我不知道他们是否打算将其扩展到 Dialog Flow 类型的操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.