[英]Is possible to programmaticaly request smart devices connected to google home account?
I'm trying to develop an Android app that can request the smart devices connected to a google home account, check the state of those devices and change some of them, like turn on or off, is this possible programmatically? 我正在尝试开发一个Android应用程序,可以请求连接到谷歌主帐户的智能设备,检查这些设备的状态并更改其中的一些,如打开或关闭,这可能是以编程方式吗?
i was trying to build some custom Actions with Google Actions SDK, the problem is that Actions SDK only works with Google Assistant commands, so either Actions o Dialogflow are not options 我试图使用Google Actions SDK构建一些自定义操作,问题是Actions SDK仅适用于Google智能助理命令,因此操作o对话框流量不是选项
Basically what i need is to "control" or send commands programmatically to query devices states and be able to change those states(i just need to turn on or off) 基本上我需要的是“控制”或以编程方式发送命令以查询设备状态并能够更改这些状态(我只需要打开或关闭)
没有第三方开发人员没有API可以从其他提供商访问用户的设备。
You can use Dialogflow for this! 您可以使用Dialogflow! If you create intents, you find at the bottom of the page an option " Fulfillment Enable webook call for this intent ".
如果您创建意图,则可以在页面底部找到“ Fulfillment Enable webook call for this intent ”选项。 I routed the intents to a PHP script on my web space.
我将意图发送到我的网络空间上的PHP脚本。 The server must be a server in the Internet (not the local net of your Google-Home) and must be accessible via HTTPS.
服务器必须是Internet中的服务器(不是Google-Home的本地网络),并且必须可通过HTTPS访问。 Basically you get the parameter as JSON and you have to answer with JSON structured data.
基本上你将参数作为JSON获得,你必须回答JSON结构化数据。
Update: I uploaded my code https://github.com/Limag/aiplayer 更新:我上传了我的代码https://github.com/Limag/aiplayer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.