-1

嘿,我是一名学生,对于一个项目,我们必须通过 API.ai(现在名为 dialogflow.com)为谷歌做一个代理。创建代理并不难,但是否有可能以某种意图询问用户的网络,找出他正在使用哪些打印机?我认为您可以通过履行来处理此问题,但我真的不明白如何使用 snmp 陷阱来做到这一点。是否可以捕获谷歌助手用户网络的数据?还是谷歌说不,我们不希望你扫描我们的用户网络?

4

1 回答 1

2

There are a number of things that made this impossible.

First - the Google Home device itself doesn't allow for local monitoring or control of anything. Although it does have "Smart Home" voice actions, these commands are all sent to a cloud server, and the local devices are responsible for getting their commands from the manufacturer's cloud server.

Second - Actions on Google primarily treats a device (the speaker or your phone) as a user interface device. With a few exceptions, it does not allow access to the hardware itself, so it can't access the networking stack directly, and can't access any SNMP operations.

Third - While commands with Dialogflow are sent to a fulfillment server, that server must be at a publicly accessible HTTPS server address, and everyone using your action will be hitting the same server. So you can't just access a service running on the user's local network. You could create a public service that identifies each user accessing it and forwards the command to something registered on their network, but you still need a way to establish that connection.

One possible workaround would be to have a local server collect SNMP information and save them to a cloud-based database, and then have your fulfillment service access the database to provide information you're querying. There are a lot of pitfalls in this scheme, however, and you'll need to make sure you take appropriate data security measures.

于 2018-05-05T10:40:05.637 回答