好的,首先,这里的主要思想是在到达时自动控制一些灯开关。我住在一个会混淆gps的森林地带,所以我对图雅等的到达功能并不像预期的那个样可靠。他们有时确实工作,但我需要它是可靠的
所以计划是安装GoogleAssistantSDK并让textinput正常工作。下载并安装了一切,做了谷歌云平台的事情,一切都很好。我可以在cmd中键入“关闭卧室灯”,卧室灯将关闭。现在,这很好用,别误会我,我很可能会根据需要调整它。但这需要启动一个交互式控制台,然后实际键入我想问的短语
这个问题的解决方案是,如果我可以用类似的东西查询textinput
py -m googlesamples.assistant.grpc.textinput --device-id "insert_device_id" --device-model-id "insert_device_model_id" --textquery "turn off the bedroom light"
这样我就不必启动交互式提示符并手动退出。我想只能够发送文本到助手,而不需要与谷歌助手进行任何交互
最终目标是使用我的电脑ping我的手机静态ip地址,并通过pc上的谷歌助手打开设备/灯
首先,这是一个基于sample source code的替代方案:
虽然完全没有经过测试,但希望你能理解
相关问题 更多 >
编程相关推荐