简体   繁体   English

是否可以programmaticaly请求连接到谷歌主帐户的智能设备?

[英]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.

相关问题 是否可以在Google Smart Home中实现自定义意图? - Is it possible to implement custom intents in Google Smart Home? 谷歌智能家居体验上的行动? - Actions on Google smart home Experience? Dialogflow帐户链接 - 谷歌主页 - Dialogflow account linking - google home 如何在Google Home Smart Display上更改卡片标题的位置 - How to change the location of Card title on Google Home Smart Display 在Dialogflow履行服务中检索Google Smart Home事件 - Retrieve Google Smart Home events in Dialogflow fulfillment service 是否可以向谷歌家庭应用程序发送丰富的回复? - Is it possible to send rich responses to google home app? Google Home帐户关联(返回结果时出错。) - Google Home Account Linking (An error occurred in returning the result.) 有没有一种方法可以将Google项目上的操作切换为使用智能家居操作而不是dialogflow - Is there a way to switch an Actions on Google project to use smart home actions instead of dialogflow DialogFlow Google上的操作:无法完成通过Google Home应用程序的帐户链接 - DialogFlow Actions-on-google : Unable to complete the account linking through the google home app 释放Google Home应用程序后,是否可以使用dialogflow编辑意图? - Is it possible to edit intent with dialogflow after releasing the google home application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM