简体   繁体   English

谷歌智能家居切换特质神秘话语

[英]Google Smart Home Toggles Trait mysterious utterances

I'm struggling to complete the development for a SmartHome action on our security panels, involving different trait implementations (including ArmDisarm, Power, Thermostats, etc.).我正在努力在我们的安全面板上完成 SmartHome 操作的开发,涉及不同的特征实现(包括 ArmDisarm、Power、Thermostats 等)。

One specific problem is related to Toggles Trait.一个具体问题与 Toggles Trait 有关。 I need to accept commands to enable or disable intrusion sensor bypass/exclusion.我需要接受命令以启用或禁用入侵传感器绕过/排除。

I've added to the SYNC response the following block, for instance, for a window sensor in the kitchen:我在 SYNC 响应中添加了以下块,例如,厨房中的 window 传感器:

{
    'id': '...some device id...',
    'name': {'name': 'Window Sensor'},
    'roomHint': 'Kitchen',
    'type': 'action.devices.types.SENSOR',
    'traits': 'action.devices.traits.Toggles',
    'willReportState': true,
    'attributes': {
        'commandOnlyToggles': false,
        'queryOnlyToggles': false,
        'availableToggles': [
            {
                'name': 'bypass',
                'name_values': {
                    { 'name_synonym': ['bypass', 'bypassed', 'exclusion'}, 'lang': 'en'],
                    { 'name_synonym': ['escluso', 'bypass', 'esclusa', 'esclusione'], 'lang': 'it'}
                },
            }
        ]
    }
}

I was able to trigger the EXECUTE intent by saying "Turn on bypass on Window Sensor" (although very unnatural).我可以通过说“打开 Window 传感器的旁路”来触发执行意图(尽管非常不自然)。 I was able to trigger the QUERY intent by saying "Is bypass on Window Sensor?"我可以通过说“Window 传感器是否绕过?”来触发 QUERY 意图。 (even more unnatural). (更不自然)。

These two utterances where found somewhere in a remote corner of a blog.这两个话语是在博客的一个偏远角落的某个地方找到的。

My problem is with Italian language (and also other western EU languages such as French/Spanish/German).我的问题是意大利语(以及其他西方欧盟语言,如法语/西班牙语/德语)。

The EXECUTE Intent seems to be triggered by this utterance (I bet no Italian guy will ever say anything like that): "Attiva escluso su Sensore Finestra" (in this example the name provided in the SYNC request was translated from "Window Sensor" to "Sensore Finestra" when running in the context of an Italian linked account). EXECUTE Intent 似乎是由这句话触发的(我敢打赌没有意大利人会说这样的话):“Attiva escluso su Sensore Finestra”(在本例中,SYNC 请求中提供的名称从“Window Sensor”翻译为“Sensore Finestra”在意大利关联帐户的上下文中运行时)。

However I was not able to find the utterance for the QUERY request, I've tried everything that could make some sense, but the QUERY intent never gets triggered, and the assistant redirects me to a simple search on the web.但是我无法找到 QUERY 请求的表达,我已经尝试了所有可能有意义的方法,但从未触发 QUERY 意图,并且助手将我重定向到 web 上的简单搜索。

Why is there such a mistery over utterances?为什么口语有这么大的谜团? The sample English utterances in assistant docs are very limited, and most of the times it's difficult to guess their counterpart in specific languages;助理文档中的示例英语话语非常有限,而且大多数时候很难猜出它们在特定语言中的对应词; furthermore no one from AOG has ever been able to give me any piece of information on this topic.此外,AOG 的任何人都无法向我提供有关此主题的任何信息。

It's been more than a year now for me, trying to create a reference guide for utterances to be included in our device user manual, but still with no luck.对我来说已经一年多了,试图为我们的设备用户手册中包含的话语创建一个参考指南,但仍然没有运气。

Can any one of you point me to some reference?你们中的任何人都可以给我一些参考吗? Or is there anything wrong with my SYNC data?还是我的 SYNC 数据有什么问题?

You can file a bug on the public tracker and include the QUERYs you have attempted.您可以在公共跟踪器上提交错误并包含您尝试过的 QUERY。 Since the execution intents seem to work, it may just be a bug in the backend grammar that isn't triggering.由于执行意图似乎有效,因此可能只是后端语法中的一个错误未触发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM