Google Smart Home Actions Toggle Trait for Horizontal & Vertical Swing - google-assistant

I am toggling horizontal swing and vertical swing in Hindi language, but assistant is not taking my command and always take me to a web page.
English Utterance: Start Horizontal Swing on Bedroom A/C. (working)
Hindi Utterance: बैडरूम एसी के हॉरिजॉन्टल स्विंग को चालू कर दो.(not working)
I have given all the possible commands in Hindi related to toggle but its not working. Please help me out from this.
Result : Command is to be executed when i am toggling Horizontal swing and vertical swing.
Below is my Google SYNC response:
{
"requestId": "11311483680465073646",
"payload": {
"agentUserId": "123",
"devices": [
{
"id": "stest240",
"name": {
"name": "Bedroom A/C",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
},
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
}
]
}
}

Related

Google Smart Home Intent Request For All AC's When Friendly Name is Air Conditioner(Hindi Language)

I have named my Smart AC as Air Conditioner and when i am trying to give Hindi command to start Air Conditioner(एयर कंडीशनर को चालू करो), google process the request and send me the EXECUTE intent request for all smart AC's linked to my account.
As you can see below SYNC response there are 5 devices whose Friendly Names are
Air Conditioner(labtest)
Bedroom A/C(stest240)
Kitchen A/C(stest98)
Room A/C(stest250)
Showroom A/C(stest236)
{
"requestId": "8348398861868564002",
"payload": {
"agentUserId": "1234",
"devices": [
{
"id": "stest98",
"name": {
"name": "Kitchen AC",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
},
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
},
{
"id": "stest250",
"name": {
"name": "Room AC",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
},
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
},
{
"id": "stest240",
"name": {
"name": "Bedroom A/C",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
},
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
},
{
"id": "stest236",
"name": {
"name": "Showroom Ac",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
},
{
"id": "labtest",
"name": {
"name": "Air Conditioner",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
}
]
}
}
]
}
}
Current Result:
Google EXECUTE INTENT Request for all devices when i am giving command एयर कंडीशनर को चालू करो.
{
"version": "2.0",
"routeKey": "$default",
"rawPath": "/",
"rawQueryString": "",
"body": "{"inputs":[{"context":{"locale_country":"IN","locale_language":"hi"},"intent":"action.devices.EXECUTE","payload":{"commands":[{"devices":[{"id":"stest250"},{"id":"stest240"},{"id":"stest98"},{"id":"stest236"},{"id":"labtest"}],"execution":[{"command":"action.devices.commands.OnOff","params":{"on":true}}]}]}}],"requestId":"7557367445885049606"}",
"isBase64Encoded": false
}
Expected Result:
Google EXECUTE INTENT Request for air conditioner device only when i am giving command एयर कंडीशनर को चालू करो.

Alexa home skill v3 ToggleController skill fails to find devices

I'm trying to use the Alexa Smart Home Skill ToggleController v3 interface to build a skill that will open and close my gate. I read the docs, and successfully implemented the sample light bulb tutorial from end to end. https://developer.amazon.com/en-US/docs/alexa/smarthome/smart-home-skill-tutorial.html
Everything worked fine. Then I created a new skill and tried to implement the ToggleController interface, mapping ON and OFF to Open and Close using semantics.
Account linking works fine
Lambda gets called with discover directive when I enable the skill on
my Alexa app
There are no errors in CloudWatch
Alexa Simulator calls the right directives and receives responses with no errors
Schema validates successfully
When I click discover devices, I get "No new devices found".
I checked all devices in the Alexa app and my device is not there.
Below is the discovery response message that my lambda returns - (from CloudWatch).
Does anyone know what I'm doing wrong?
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"messageId": "fedfbae4-0ec8-4b4e-81d1-c998bc0ee860",
"payloadVersion": "3"
},
"payload": {
"endpoints": [
{
"endpointId": "pleasant-view-gate",
"manufacturerName": "Ancient Geeks",
"description": "Smart Gate at Pleasant View Cottage",
"friendlyName": "Pleasant Gate",
"displayCategories": [
"OTHER"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.ToggleController",
"instance": "PleasantView.Gate",
"version": "3",
"properties": {
"supported": [
{
"name": "toggleState"
}
],
"proactivelyReported": false,
"retrievable": true
},
"capabilityResources": {
"friendlyNames": [
{
"#type": "text",
"value": {
"text": "Gate",
"locale": "en-US"
}
}
]
},
"semantics": {
"actionMappings": [
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Close"
],
"directive": {
"name": "TurnOff",
"payload": {}
}
},
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Open"
],
"directive": {
"name": "TurnOn",
"payload": {}
}
}
],
"stateMappings": [
{
"#type": "StatesToValue",
"states": [
"Alexa.States.Closed"
],
"value": "OFF"
},
{
"#type": "StatesToValue",
"states": [
"Alexa.States.Open"
],
"value": "ON"
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [
{
"name": "connectivity"
}
],
"proactivelyReported": false,
"retrievable": true
}
}
]
}
]
}
}
}

Alexa custom skill: getting FallbackIntent instead of validation prompt

I have an interaction model with a GetMenuIntent which I can invoke with "what's for {meal}". meal is a MealType custom slot with allowed values of "breakfast" and "lunch". I added validation on the meal slot in my GetMenuIntent to only allow those values defined in the slot type and it works great for those configured values.
However, after saving and building my model, when I put "what's for dinner" into the Utterance Profiler or the interactive tester, It ended up calling my FallbackIntent instead of reprompting for a correct value.
I feel like what I'm trying to do isn't really much different than Amazon's own example here.
Here's "whats for lunch" working correctly:
And here's "whats for dinner" ignoring my GetMenuIntent and calling FallbackIntent instead:
Here's my interaction model:
{
"interactionModel": {
"languageModel": {
"invocationName": "school menus",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.NavigateHomeIntent",
"samples": []
},
{
"name": "GetMenuIntent",
"slots": [
{
"name": "meal",
"type": "Meal"
},
{
"name": "date",
"type": "AMAZON.DATE"
}
],
"samples": [
"whats for {meal} {date}",
"what will you have for {meal} {date}",
"what is on the menu for {meal} {date}",
"what are we having for {meal} {date}",
"what we're having for {meal} {date}"
]
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
}
],
"types": [
{
"values": [
{
"name": {
"value": "lunch"
}
},
{
"name": {
"value": "breakfast"
}
}
],
"name": "Meal"
}
]
},
"dialog": {
"intents": [
{
"name": "GetMenuIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "meal",
"type": "Meal",
"elicitationRequired": false,
"confirmationRequired": false,
"prompts": {},
"validations": [
{
"type": "hasEntityResolutionMatch",
"prompt": "Slot.Validation.806855880612.19281662909.602239253259"
}
]
},
{
"name": "date",
"type": "AMAZON.DATE",
"elicitationRequired": false,
"confirmationRequired": false,
"prompts": {}
}
]
}
],
"delegationStrategy": "ALWAYS"
},
"prompts": [
{
"id": "Slot.Validation.806855880612.19281662909.602239253259",
"variations": [
{
"type": "PlainText",
"value": "Hmm, I don't know about that menu type. Please try again."
}
]
}
]
},
"version": "48"
}
Since this is 6 months old I assume you figured out by now that your interaction model only includes Lunch and Breakfast.

Some Modes on action.devices.traits.Modes does not seem to be working

I'm playing around with action.devices.traits.Modes trait, and it seems that I cannot get some Mode to work, though I'm 100% sure that I've used mode names exactly as in the documentation.
SYNC Response:
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"requestId": "15896565509066911859",
"payload": {
"agentUserId": "",
"devices": [
{
"id": "Washer",
"type": "action.devices.types.WASHER",
"traits": [
"action.devices.traits.Modes",
"action.devices.traits.OnOff"
],
"name": {
"defaultNames": [
"Washer"
],
"name": "Washer",
"nicknames": [
"Washer"
]
},
"willReportState": false,
"customData": {
"lookupOnExecute": true
},
"attributes": {
"availableModes": [
{
"name": "temperature",
"name_values": [
{
"name_synonym": [
"temperature"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Tap Cold",
"setting_values": [
{
"setting_synonym": [
"tap cold"
],
"lang": "en"
}
]
},
{
"setting_name": "Cold Warm",
"setting_values": [
{
"setting_synonym": [
"cold warm"
],
"lang": "en"
}
]
},
{
"setting_name": "Hot",
"setting_values": [
{
"setting_synonym": [
"hot"
],
"lang": "en"
}
]
},
{
"setting_name": "Extra Hot",
"setting_values": [
{
"setting_synonym": [
"extra hot"
],
"lang": "en"
}
]
}
],
"ordered": false
},
{
"name": "Cycle",
"name_values": [
{
"name_synonym": [
"cycle"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Low",
"setting_values": [
{
"setting_synonym": [
"low"
],
"lang": "en"
}
]
},
{
"setting_name": "Medium",
"setting_values": [
{
"setting_synonym": [
"medium"
],
"lang": "en"
}
]
},
{
"setting_name": "High",
"setting_values": [
{
"setting_synonym": [
"high"
],
"lang": "en"
}
]
}
],
"ordered": false
}
]
}
}
]
}
}
}
QUERY response:
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"requestId": "17335788264128789760",
"payload": {
"devices": {
"Washer": {
"online": true,
"currentModeSettings": {
"Cycle": "High",
"temperature": "Tap Cold"
},
"on": true
}
}
}
}
}
Why does Cycle query fail? I see Cycle mode in the documentation. Does it support only some settings? Does the case matter? High is also available, so what am I doing wrong?
And Interaction with Google Home:
While the Google Assistant is highly capable of detecting variations in speech while receiving voice commands, it is still a good practice to make the grammar more understandable and as mentioned in the comments. This is related to an issue in the usage of grammar while triggering the right intent, since a change in the way the question was asked solved the purpose.
For the answer to the question "how can I combine Two toggles (Bluetooth and Power Saving) into one trigger – e.g. "Turn on Power Saving and Bluetooth on Home Cinema?" asked in the comments – at the moment Smart Home doesn't allow two commands in a single prompt. For example, you cannot say "Hey Google, turn on my light and change the color". In order to do that you have to execute each command separately.

Support for ColorSetting trait on non-Light device types

Our hood supports a backlight which supports full RGB color change. The backlight on/off switch was implemented with a trigger, and we implemented the ColorSetting trait to change the color.
When trying to use Google Assistant to change the color however, we get the reply 'It looks like the device hasn't been set up yet'.
We tried changing the device type to 'Light', and the commands to change colors work flawlessly. Is the ColorSetting trait restricted to Light type only, and is there a workaround for this?
Thanks for your help
Edit: SYNC response for hood:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "userID",
"devices": [
{
"id": "HAID",
"type": "action.devices.types.HOOD",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.StartStop",
"action.devices.traits.Modes",
"action.devices.traits.FanSpeed",
"action.devices.traits.Toggles",
"action.devices.traits.ColorSetting"
],
"deviceInfo": {
"manufacturer": "MANUFACTURER",
"model": "MODEL",
"hwVersion": "",
"swVersion": ""
},
"name": {
"name": "Dunstabzugshaube",
"nicknames": [
"Dunstabzugshaube"
],
"defaultNames": [
"Dunstabzugshaube"
]
},
"willReportState": true,
"attributes": {
"pausable": false,
"availableModes": [
{
"name": "program",
"name_values": [
{
"name_synonym": [
"program"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Auto",
"setting_values": [
{
"lang": "en",
"setting_synonym": [
"auto",
"automatic"
]
}
]
},
{
"setting_name": "circulation",
"setting_values": [
{
"lang": "en",
"setting_synonym": [
"circulation",
"ventilation",
"airflow",
"air flow"
]
}
]
}
],
"ordered": false
}
],
"availableFanSpeeds": {
"speeds": [
{
"speed_name": "S1",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 1",
"Fan Stage 1",
"lowest",
"one"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 1",
"Lüfter Stufe 1",
"minimum",
"eins",
"Stufe 1"
]
}
]
},
{
"speed_name": "S2",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 2",
"Fan Stage 2",
"low",
"two"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 2",
"Lüfter Stufe 2",
"niedrig",
"zwei",
"Stufe 2"
]
}
]
},
{
"speed_name": "S3",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 3",
"Fan Stage 3",
"medium",
"three"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 3",
"Lüfter Stufe 3",
"mittel",
"drei",
"Stufe 3"
]
}
]
}
],
"ordered": true
},
"reversible": false,
"colorModel": "rgb",
"commandOnlyColorSetting": true,
"availableToggles": [
{
"name": "Light",
"name_values": [
{
"name_synonym": [
"light"
],
"lang": "en"
}
]
},
{
"name": "backlight",
"name_values": [
{
"name_synonym": [
"backlight",
"mood light"
],
"lang": "en"
},
{
"name_synonym": [
"Hintergrundbeleuchtung",
"Stimmungslicht"
],
"lang": "de"
}
]
}
]
}
}
]
}
}
Best,
Frank
Your sync response provided above looks correct. Your concern about the command working flawlessly when you set the device type as LIGHT is because LIGHT does have a recommended trait as ColorSetting. To clarify your concern further, some device types do have better support for certain types of relevant grammar/language, which might explain why ColorSetting works better when the device type is set to light.
Google constantly works on the NLU (Natural Language Understanding) algorithms, so this grammar issue would be resolved by now and the ColorSetting trait should now be widely accessible to more devices.
More information about the HOOD and LIGHT device types and their associated traits along with sync, execute and query responses can be found here:
https://developers.google.com/assistant/smarthome/guides/hood
https://developers.google.com/assistant/smarthome/guides/light

Resources