简体   繁体   中英

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.).

One specific problem is related to 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:

{
    '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). I was able to trigger the QUERY intent by saying "Is bypass on Window Sensor?" (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).

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.

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.

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?

You can file a bug on the public tracker and include the QUERYs you have attempted. Since the execution intents seem to work, it may just be a bug in the backend grammar that isn't triggering.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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